From 045c0e388a2fb8bb3bf6dd7d8e5d3f1855acdc20 Mon Sep 17 00:00:00 2001 From: Stavros Kois <47820033+stavros-k@users.noreply.github.com> Date: Wed, 16 Oct 2024 20:50:40 +0300 Subject: [PATCH 01/13] library: fix healthcheck (#662) * library: fix healthcheck * update lib * prune * single line * dont exit, but return. * update permissions scritp * remove hash * use built in healthchecks for immich * bring in changes from #663 * fix actual-budget healthcheck * correctly grep the response * fix joplin healthcheck * remove hash * fix https actual budget --- ix-dev/community/actual-budget/app.yaml | 6 +- .../templates/docker-compose.yaml | 2 +- .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../healthchecks.py | 7 +- .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4}/permissions.py | 6 +- .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/community/adguard-home/app.yaml | 6 +- .../templates/docker-compose.yaml | 2 +- .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4}/healthchecks.py | 7 +- .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4}/permissions.py | 6 +- .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/community/audiobookshelf/app.yaml | 6 +- .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4}/healthchecks.py | 7 +- .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4}/permissions.py | 6 +- .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/community/autobrr/app.yaml | 6 +- .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../healthchecks.py | 7 +- .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4}/permissions.py | 6 +- .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/community/bazarr/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/community/briefkasten/app.yaml | 6 +- .../briefkasten/templates/docker-compose.yaml | 2 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/community/castopod/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/community/chia/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/community/clamav/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/community/cloudflared/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/community/dashy/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/community/ddns-updater/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 .../{v1_0_23 => v1_0_24}/__init__.py | 0 .../{v1_0_23 => v1_0_24}/config.py | 2 +- ix-dev/community/deluge/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/community/distribution/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/community/dockge/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/community/drawio/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/community/filebrowser/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/community/firefly-iii/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/community/flame/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/community/freshrss/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/community/frigate/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/community/fscrawler/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/community/gitea/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/community/grafana/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/community/handbrake/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/community/homarr/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/community/homepage/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/community/homer/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/community/immich/app.yaml | 6 +- .../immich/templates/docker-compose.yaml | 4 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/community/invidious/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/community/ipfs/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/community/jellyfin/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/community/jellyseerr/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/community/jenkins/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/community/joplin/app.yaml | 6 +- .../joplin/templates/docker-compose.yaml | 2 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/community/kapowarr/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/community/kavita/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/community/komga/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/community/lidarr/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/community/linkding/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/community/listmonk/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/community/logseq/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/community/mealie/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/community/metube/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/community/minecraft/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/community/mineos/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/community/mumble/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/community/n8n/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/community/navidrome/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/community/netbootxyz/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/community/nginx-proxy-manager/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/community/node-red/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/community/odoo/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/community/omada-controller/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/community/organizr/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/community/overseerr/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/community/palworld/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/community/paperless-ngx/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/community/passbolt/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/community/pgadmin/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/community/pigallery2/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/community/piwigo/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/community/planka/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/community/plex-auto-languages/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/community/portainer/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/community/prowlarr/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/community/qbittorrent/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/community/radarr/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/community/readarr/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/community/recyclarr/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/community/redis/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/community/roundcube/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/community/rsyncd/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/community/rust-desk/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/community/sabnzbd/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/community/searxng/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/community/sftpgo/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/community/sonarr/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/community/tailscale/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 .../tailscale/{v1_1_14 => v1_1_15}/util.py | 2 +- ix-dev/community/tautulli/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/community/tdarr/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/community/terraria/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/community/tftpd-hpa/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/community/tiny-media-manager/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/community/transmission/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/community/twofactor-auth/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/community/unifi-controller/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 .../community/unifi-protect-backup/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/community/vaultwarden/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/community/vikunja/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/community/webdav/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/community/whoogle/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/community/wordpress/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/community/zerotier/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/enterprise/minio/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 .../minio/{v1_1_6 => v1_1_7}/__init__.py | 0 .../minio/{v1_1_6 => v1_1_7}/data.py | 2 +- ix-dev/enterprise/syncthing/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/stable/collabora/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/stable/diskoverdata/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/stable/elastic-search/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/stable/emby/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/stable/home-assistant/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/stable/ix-app/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/stable/minio/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/stable/netdata/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/stable/nextcloud/app.yaml | 9 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/stable/photoprism/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/stable/pihole/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/stable/plex/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/stable/prometheus/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/stable/storj/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/stable/syncthing/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 ix-dev/stable/wg-easy/app.yaml | 6 +- .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{base_v1_1_3 => base_v1_1_4}/__init__.py | 0 .../environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/mariadb.py | 0 .../{base_v1_1_3 => base_v1_1_4}/metadata.py | 0 .../{base_v1_1_3 => base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../{base_v1_1_3 => base_v1_1_4}/ports.py | 0 .../{base_v1_1_3 => base_v1_1_4}/postgres.py | 0 .../{base_v1_1_3 => base_v1_1_4}/redis.py | 0 .../{base_v1_1_3 => base_v1_1_4}/resources.py | 0 .../{base_v1_1_3 => base_v1_1_4}/security.py | 0 .../{base_v1_1_3 => base_v1_1_4}/storage.py | 0 .../{base_v1_1_3 => base_v1_1_4}/utils.py | 0 library/1.1.3/healthchecks.py | 121 --------------- library/1.1.3/permissions.py | 139 ------------------ library/{1.1.3 => 1.1.4}/__init__.py | 0 library/{1.1.3 => 1.1.4}/environment.py | 0 library/1.1.4/healthchecks.py | 120 +++++++++++++++ library/{1.1.3 => 1.1.4}/mariadb.py | 0 library/{1.1.3 => 1.1.4}/metadata.py | 0 library/{1.1.3 => 1.1.4}/network.py | 0 library/1.1.4/permissions.py | 139 ++++++++++++++++++ library/{1.1.3 => 1.1.4}/ports.py | 0 library/{1.1.3 => 1.1.4}/postgres.py | 0 library/{1.1.3 => 1.1.4}/redis.py | 0 library/{1.1.3 => 1.1.4}/resources.py | 0 library/{1.1.3 => 1.1.4}/security.py | 0 library/{1.1.3 => 1.1.4}/storage.py | 0 library/{1.1.3 => 1.1.4}/utils.py | 0 library/hashes.yaml | 2 +- 1923 files changed, 28602 insertions(+), 28716 deletions(-) rename ix-dev/community/actual-budget/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/actual-budget/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) rename ix-dev/community/actual-budget/templates/library/{base_v1_1_3 => base_v1_1_4}/healthchecks.py (92%) rename ix-dev/community/actual-budget/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/actual-budget/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/actual-budget/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) rename ix-dev/community/{audiobookshelf/templates/library/base_v1_1_3 => actual-budget/templates/library/base_v1_1_4}/permissions.py (98%) rename ix-dev/community/actual-budget/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/actual-budget/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/actual-budget/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/actual-budget/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/actual-budget/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/actual-budget/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/actual-budget/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) rename ix-dev/community/adguard-home/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/adguard-home/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) rename ix-dev/community/{audiobookshelf/templates/library/base_v1_1_3 => adguard-home/templates/library/base_v1_1_4}/healthchecks.py (92%) rename ix-dev/community/adguard-home/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/adguard-home/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/adguard-home/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) rename ix-dev/community/{actual-budget/templates/library/base_v1_1_3 => adguard-home/templates/library/base_v1_1_4}/permissions.py (98%) rename ix-dev/community/adguard-home/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/adguard-home/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/adguard-home/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/adguard-home/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/adguard-home/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/adguard-home/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/adguard-home/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) rename ix-dev/community/audiobookshelf/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/audiobookshelf/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) rename ix-dev/community/{adguard-home/templates/library/base_v1_1_3 => audiobookshelf/templates/library/base_v1_1_4}/healthchecks.py (92%) rename ix-dev/community/audiobookshelf/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/audiobookshelf/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/audiobookshelf/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) rename ix-dev/community/{autobrr/templates/library/base_v1_1_3 => audiobookshelf/templates/library/base_v1_1_4}/permissions.py (98%) rename ix-dev/community/audiobookshelf/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/audiobookshelf/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/audiobookshelf/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/audiobookshelf/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/audiobookshelf/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/audiobookshelf/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/audiobookshelf/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) rename ix-dev/community/autobrr/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/autobrr/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) rename ix-dev/community/autobrr/templates/library/{base_v1_1_3 => base_v1_1_4}/healthchecks.py (92%) rename ix-dev/community/autobrr/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/autobrr/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/autobrr/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) rename ix-dev/community/{adguard-home/templates/library/base_v1_1_3 => autobrr/templates/library/base_v1_1_4}/permissions.py (98%) rename ix-dev/community/autobrr/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/autobrr/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/autobrr/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/autobrr/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/autobrr/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/autobrr/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/autobrr/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/community/bazarr/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/community/bazarr/templates/library/base_v1_1_3/permissions.py rename ix-dev/community/bazarr/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/bazarr/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/community/bazarr/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/community/bazarr/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/bazarr/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/bazarr/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/community/bazarr/templates/library/base_v1_1_4/permissions.py rename ix-dev/community/bazarr/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/bazarr/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/bazarr/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/bazarr/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/bazarr/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/bazarr/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/bazarr/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/community/briefkasten/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/community/briefkasten/templates/library/base_v1_1_3/permissions.py rename ix-dev/community/briefkasten/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/briefkasten/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/community/briefkasten/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/community/briefkasten/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/briefkasten/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/briefkasten/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/community/briefkasten/templates/library/base_v1_1_4/permissions.py rename ix-dev/community/briefkasten/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/briefkasten/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/briefkasten/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/briefkasten/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/briefkasten/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/briefkasten/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/briefkasten/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/community/castopod/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/community/castopod/templates/library/base_v1_1_3/permissions.py rename ix-dev/community/castopod/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/castopod/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/community/castopod/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/community/castopod/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/castopod/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/castopod/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/community/castopod/templates/library/base_v1_1_4/permissions.py rename ix-dev/community/castopod/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/castopod/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/castopod/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/castopod/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/castopod/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/castopod/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/castopod/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/community/chia/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/community/chia/templates/library/base_v1_1_3/permissions.py rename ix-dev/community/chia/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/chia/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/community/chia/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/community/chia/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/chia/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/chia/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/community/chia/templates/library/base_v1_1_4/permissions.py rename ix-dev/community/chia/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/chia/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/chia/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/chia/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/chia/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/chia/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/chia/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/community/clamav/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/community/clamav/templates/library/base_v1_1_3/permissions.py rename ix-dev/community/clamav/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/clamav/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/community/clamav/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/community/clamav/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/clamav/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/clamav/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/community/clamav/templates/library/base_v1_1_4/permissions.py rename ix-dev/community/clamav/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/clamav/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/clamav/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/clamav/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/clamav/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/clamav/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/clamav/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/community/cloudflared/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/community/cloudflared/templates/library/base_v1_1_3/permissions.py rename ix-dev/community/cloudflared/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/cloudflared/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/community/cloudflared/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/community/cloudflared/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/cloudflared/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/cloudflared/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/community/cloudflared/templates/library/base_v1_1_4/permissions.py rename ix-dev/community/cloudflared/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/cloudflared/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/cloudflared/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/cloudflared/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/cloudflared/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/cloudflared/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/cloudflared/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/community/dashy/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/community/dashy/templates/library/base_v1_1_3/permissions.py rename ix-dev/community/dashy/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/dashy/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/community/dashy/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/community/dashy/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/dashy/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/dashy/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/community/dashy/templates/library/base_v1_1_4/permissions.py rename ix-dev/community/dashy/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/dashy/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/dashy/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/dashy/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/dashy/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/dashy/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/dashy/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/community/ddns-updater/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/community/ddns-updater/templates/library/base_v1_1_3/permissions.py rename ix-dev/community/ddns-updater/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/ddns-updater/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/community/ddns-updater/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/community/ddns-updater/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/ddns-updater/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/ddns-updater/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/community/ddns-updater/templates/library/base_v1_1_4/permissions.py rename ix-dev/community/ddns-updater/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/ddns-updater/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/ddns-updater/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/ddns-updater/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/ddns-updater/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/ddns-updater/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/ddns-updater/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) rename ix-dev/community/ddns-updater/templates/library/community/ddns-updater/{v1_0_23 => v1_0_24}/__init__.py (100%) rename ix-dev/community/ddns-updater/templates/library/community/ddns-updater/{v1_0_23 => v1_0_24}/config.py (99%) delete mode 100644 ix-dev/community/deluge/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/community/deluge/templates/library/base_v1_1_3/permissions.py rename ix-dev/community/deluge/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/deluge/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/community/deluge/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/community/deluge/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/deluge/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/deluge/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/community/deluge/templates/library/base_v1_1_4/permissions.py rename ix-dev/community/deluge/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/deluge/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/deluge/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/deluge/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/deluge/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/deluge/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/deluge/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/community/distribution/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/community/distribution/templates/library/base_v1_1_3/permissions.py rename ix-dev/community/distribution/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/distribution/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/community/distribution/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/community/distribution/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/distribution/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/distribution/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/community/distribution/templates/library/base_v1_1_4/permissions.py rename ix-dev/community/distribution/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/distribution/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/distribution/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/distribution/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/distribution/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/distribution/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/distribution/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/community/dockge/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/community/dockge/templates/library/base_v1_1_3/permissions.py rename ix-dev/community/dockge/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/dockge/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/community/dockge/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/community/dockge/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/dockge/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/dockge/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/community/dockge/templates/library/base_v1_1_4/permissions.py rename ix-dev/community/dockge/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/dockge/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/dockge/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/dockge/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/dockge/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/dockge/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/dockge/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/community/drawio/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/community/drawio/templates/library/base_v1_1_3/permissions.py rename ix-dev/community/drawio/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/drawio/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/community/drawio/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/community/drawio/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/drawio/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/drawio/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/community/drawio/templates/library/base_v1_1_4/permissions.py rename ix-dev/community/drawio/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/drawio/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/drawio/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/drawio/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/drawio/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/drawio/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/drawio/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/community/filebrowser/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/community/filebrowser/templates/library/base_v1_1_3/permissions.py rename ix-dev/community/filebrowser/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/filebrowser/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/community/filebrowser/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/community/filebrowser/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/filebrowser/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/filebrowser/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/community/filebrowser/templates/library/base_v1_1_4/permissions.py rename ix-dev/community/filebrowser/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/filebrowser/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/filebrowser/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/filebrowser/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/filebrowser/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/filebrowser/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/filebrowser/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/community/firefly-iii/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/community/firefly-iii/templates/library/base_v1_1_3/permissions.py rename ix-dev/community/firefly-iii/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/firefly-iii/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/community/firefly-iii/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/community/firefly-iii/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/firefly-iii/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/firefly-iii/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/community/firefly-iii/templates/library/base_v1_1_4/permissions.py rename ix-dev/community/firefly-iii/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/firefly-iii/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/firefly-iii/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/firefly-iii/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/firefly-iii/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/firefly-iii/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/firefly-iii/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/community/flame/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/community/flame/templates/library/base_v1_1_3/permissions.py rename ix-dev/community/flame/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/flame/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/community/flame/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/community/flame/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/flame/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/flame/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/community/flame/templates/library/base_v1_1_4/permissions.py rename ix-dev/community/flame/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/flame/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/flame/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/flame/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/flame/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/flame/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/flame/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/community/freshrss/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/community/freshrss/templates/library/base_v1_1_3/permissions.py rename ix-dev/community/freshrss/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/freshrss/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/community/freshrss/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/community/freshrss/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/freshrss/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/freshrss/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/community/freshrss/templates/library/base_v1_1_4/permissions.py rename ix-dev/community/freshrss/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/freshrss/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/freshrss/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/freshrss/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/freshrss/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/freshrss/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/freshrss/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/community/frigate/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/community/frigate/templates/library/base_v1_1_3/permissions.py rename ix-dev/community/frigate/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/frigate/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/community/frigate/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/community/frigate/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/frigate/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/frigate/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/community/frigate/templates/library/base_v1_1_4/permissions.py rename ix-dev/community/frigate/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/frigate/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/frigate/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/frigate/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/frigate/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/frigate/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/frigate/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/community/fscrawler/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/community/fscrawler/templates/library/base_v1_1_3/permissions.py rename ix-dev/community/fscrawler/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/fscrawler/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/community/fscrawler/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/community/fscrawler/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/fscrawler/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/fscrawler/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/community/fscrawler/templates/library/base_v1_1_4/permissions.py rename ix-dev/community/fscrawler/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/fscrawler/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/fscrawler/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/fscrawler/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/fscrawler/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/fscrawler/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/fscrawler/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/community/gitea/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/community/gitea/templates/library/base_v1_1_3/permissions.py rename ix-dev/community/gitea/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/gitea/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/community/gitea/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/community/gitea/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/gitea/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/gitea/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/community/gitea/templates/library/base_v1_1_4/permissions.py rename ix-dev/community/gitea/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/gitea/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/gitea/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/gitea/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/gitea/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/gitea/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/gitea/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/community/grafana/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/community/grafana/templates/library/base_v1_1_3/permissions.py rename ix-dev/community/grafana/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/grafana/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/community/grafana/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/community/grafana/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/grafana/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/grafana/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/community/grafana/templates/library/base_v1_1_4/permissions.py rename ix-dev/community/grafana/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/grafana/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/grafana/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/grafana/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/grafana/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/grafana/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/grafana/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/community/handbrake/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/community/handbrake/templates/library/base_v1_1_3/permissions.py rename ix-dev/community/handbrake/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/handbrake/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/community/handbrake/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/community/handbrake/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/handbrake/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/handbrake/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/community/handbrake/templates/library/base_v1_1_4/permissions.py rename ix-dev/community/handbrake/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/handbrake/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/handbrake/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/handbrake/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/handbrake/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/handbrake/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/handbrake/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/community/homarr/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/community/homarr/templates/library/base_v1_1_3/permissions.py rename ix-dev/community/homarr/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/homarr/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/community/homarr/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/community/homarr/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/homarr/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/homarr/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/community/homarr/templates/library/base_v1_1_4/permissions.py rename ix-dev/community/homarr/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/homarr/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/homarr/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/homarr/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/homarr/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/homarr/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/homarr/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/community/homepage/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/community/homepage/templates/library/base_v1_1_3/permissions.py rename ix-dev/community/homepage/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/homepage/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/community/homepage/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/community/homepage/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/homepage/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/homepage/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/community/homepage/templates/library/base_v1_1_4/permissions.py rename ix-dev/community/homepage/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/homepage/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/homepage/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/homepage/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/homepage/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/homepage/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/homepage/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/community/homer/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/community/homer/templates/library/base_v1_1_3/permissions.py rename ix-dev/community/homer/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/homer/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/community/homer/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/community/homer/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/homer/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/homer/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/community/homer/templates/library/base_v1_1_4/permissions.py rename ix-dev/community/homer/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/homer/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/homer/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/homer/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/homer/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/homer/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/homer/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/community/immich/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/community/immich/templates/library/base_v1_1_3/permissions.py rename ix-dev/community/immich/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/immich/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/community/immich/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/community/immich/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/immich/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/immich/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/community/immich/templates/library/base_v1_1_4/permissions.py rename ix-dev/community/immich/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/immich/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/immich/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/immich/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/immich/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/immich/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/immich/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/community/invidious/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/community/invidious/templates/library/base_v1_1_3/permissions.py rename ix-dev/community/invidious/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/invidious/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/community/invidious/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/community/invidious/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/invidious/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/invidious/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/community/invidious/templates/library/base_v1_1_4/permissions.py rename ix-dev/community/invidious/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/invidious/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/invidious/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/invidious/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/invidious/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/invidious/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/invidious/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/community/ipfs/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/community/ipfs/templates/library/base_v1_1_3/permissions.py rename ix-dev/community/ipfs/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/ipfs/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/community/ipfs/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/community/ipfs/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/ipfs/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/ipfs/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/community/ipfs/templates/library/base_v1_1_4/permissions.py rename ix-dev/community/ipfs/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/ipfs/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/ipfs/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/ipfs/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/ipfs/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/ipfs/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/ipfs/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/community/jellyfin/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/community/jellyfin/templates/library/base_v1_1_3/permissions.py rename ix-dev/community/jellyfin/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/jellyfin/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/community/jellyfin/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/community/jellyfin/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/jellyfin/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/jellyfin/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/community/jellyfin/templates/library/base_v1_1_4/permissions.py rename ix-dev/community/jellyfin/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/jellyfin/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/jellyfin/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/jellyfin/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/jellyfin/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/jellyfin/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/jellyfin/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/community/jellyseerr/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/community/jellyseerr/templates/library/base_v1_1_3/permissions.py rename ix-dev/community/jellyseerr/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/jellyseerr/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/community/jellyseerr/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/community/jellyseerr/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/jellyseerr/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/jellyseerr/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/community/jellyseerr/templates/library/base_v1_1_4/permissions.py rename ix-dev/community/jellyseerr/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/jellyseerr/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/jellyseerr/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/jellyseerr/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/jellyseerr/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/jellyseerr/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/jellyseerr/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/community/jenkins/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/community/jenkins/templates/library/base_v1_1_3/permissions.py rename ix-dev/community/jenkins/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/jenkins/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/community/jenkins/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/community/jenkins/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/jenkins/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/jenkins/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/community/jenkins/templates/library/base_v1_1_4/permissions.py rename ix-dev/community/jenkins/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/jenkins/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/jenkins/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/jenkins/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/jenkins/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/jenkins/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/jenkins/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/community/joplin/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/community/joplin/templates/library/base_v1_1_3/permissions.py rename ix-dev/community/joplin/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/joplin/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/community/joplin/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/community/joplin/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/joplin/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/joplin/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/community/joplin/templates/library/base_v1_1_4/permissions.py rename ix-dev/community/joplin/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/joplin/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/joplin/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/joplin/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/joplin/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/joplin/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/joplin/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/community/kapowarr/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/community/kapowarr/templates/library/base_v1_1_3/permissions.py rename ix-dev/community/kapowarr/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/kapowarr/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/community/kapowarr/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/community/kapowarr/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/kapowarr/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/kapowarr/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/community/kapowarr/templates/library/base_v1_1_4/permissions.py rename ix-dev/community/kapowarr/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/kapowarr/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/kapowarr/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/kapowarr/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/kapowarr/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/kapowarr/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/kapowarr/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/community/kavita/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/community/kavita/templates/library/base_v1_1_3/permissions.py rename ix-dev/community/kavita/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/kavita/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/community/kavita/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/community/kavita/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/kavita/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/kavita/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/community/kavita/templates/library/base_v1_1_4/permissions.py rename ix-dev/community/kavita/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/kavita/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/kavita/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/kavita/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/kavita/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/kavita/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/kavita/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/community/komga/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/community/komga/templates/library/base_v1_1_3/permissions.py rename ix-dev/community/komga/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/komga/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/community/komga/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/community/komga/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/komga/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/komga/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/community/komga/templates/library/base_v1_1_4/permissions.py rename ix-dev/community/komga/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/komga/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/komga/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/komga/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/komga/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/komga/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/komga/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/community/lidarr/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/community/lidarr/templates/library/base_v1_1_3/permissions.py rename ix-dev/community/lidarr/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/lidarr/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/community/lidarr/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/community/lidarr/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/lidarr/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/lidarr/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/community/lidarr/templates/library/base_v1_1_4/permissions.py rename ix-dev/community/lidarr/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/lidarr/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/lidarr/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/lidarr/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/lidarr/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/lidarr/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/lidarr/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/community/linkding/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/community/linkding/templates/library/base_v1_1_3/permissions.py rename ix-dev/community/linkding/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/linkding/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/community/linkding/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/community/linkding/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/linkding/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/linkding/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/community/linkding/templates/library/base_v1_1_4/permissions.py rename ix-dev/community/linkding/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/linkding/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/linkding/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/linkding/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/linkding/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/linkding/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/linkding/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/community/listmonk/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/community/listmonk/templates/library/base_v1_1_3/permissions.py rename ix-dev/community/listmonk/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/listmonk/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/community/listmonk/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/community/listmonk/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/listmonk/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/listmonk/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/community/listmonk/templates/library/base_v1_1_4/permissions.py rename ix-dev/community/listmonk/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/listmonk/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/listmonk/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/listmonk/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/listmonk/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/listmonk/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/listmonk/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/community/logseq/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/community/logseq/templates/library/base_v1_1_3/permissions.py rename ix-dev/community/logseq/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/logseq/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/community/logseq/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/community/logseq/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/logseq/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/logseq/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/community/logseq/templates/library/base_v1_1_4/permissions.py rename ix-dev/community/logseq/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/logseq/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/logseq/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/logseq/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/logseq/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/logseq/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/logseq/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/community/mealie/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/community/mealie/templates/library/base_v1_1_3/permissions.py rename ix-dev/community/mealie/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/mealie/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/community/mealie/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/community/mealie/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/mealie/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/mealie/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/community/mealie/templates/library/base_v1_1_4/permissions.py rename ix-dev/community/mealie/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/mealie/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/mealie/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/mealie/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/mealie/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/mealie/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/mealie/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/community/metube/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/community/metube/templates/library/base_v1_1_3/permissions.py rename ix-dev/community/metube/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/metube/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/community/metube/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/community/metube/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/metube/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/metube/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/community/metube/templates/library/base_v1_1_4/permissions.py rename ix-dev/community/metube/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/metube/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/metube/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/metube/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/metube/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/metube/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/metube/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/community/minecraft/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/community/minecraft/templates/library/base_v1_1_3/permissions.py rename ix-dev/community/minecraft/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/minecraft/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/community/minecraft/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/community/minecraft/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/minecraft/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/minecraft/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/community/minecraft/templates/library/base_v1_1_4/permissions.py rename ix-dev/community/minecraft/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/minecraft/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/minecraft/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/minecraft/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/minecraft/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/minecraft/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/minecraft/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/community/mineos/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/community/mineos/templates/library/base_v1_1_3/permissions.py rename ix-dev/community/mineos/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/mineos/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/community/mineos/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/community/mineos/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/mineos/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/mineos/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/community/mineos/templates/library/base_v1_1_4/permissions.py rename ix-dev/community/mineos/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/mineos/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/mineos/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/mineos/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/mineos/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/mineos/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/mineos/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/community/mumble/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/community/mumble/templates/library/base_v1_1_3/permissions.py rename ix-dev/community/mumble/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/mumble/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/community/mumble/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/community/mumble/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/mumble/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/mumble/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/community/mumble/templates/library/base_v1_1_4/permissions.py rename ix-dev/community/mumble/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/mumble/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/mumble/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/mumble/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/mumble/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/mumble/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/mumble/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/community/n8n/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/community/n8n/templates/library/base_v1_1_3/permissions.py rename ix-dev/community/n8n/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/n8n/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/community/n8n/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/community/n8n/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/n8n/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/n8n/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/community/n8n/templates/library/base_v1_1_4/permissions.py rename ix-dev/community/n8n/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/n8n/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/n8n/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/n8n/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/n8n/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/n8n/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/n8n/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/community/navidrome/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/community/navidrome/templates/library/base_v1_1_3/permissions.py rename ix-dev/community/navidrome/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/navidrome/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/community/navidrome/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/community/navidrome/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/navidrome/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/navidrome/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/community/navidrome/templates/library/base_v1_1_4/permissions.py rename ix-dev/community/navidrome/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/navidrome/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/navidrome/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/navidrome/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/navidrome/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/navidrome/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/navidrome/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/community/netbootxyz/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/community/netbootxyz/templates/library/base_v1_1_3/permissions.py rename ix-dev/community/netbootxyz/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/netbootxyz/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/community/netbootxyz/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/community/netbootxyz/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/netbootxyz/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/netbootxyz/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/community/netbootxyz/templates/library/base_v1_1_4/permissions.py rename ix-dev/community/netbootxyz/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/netbootxyz/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/netbootxyz/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/netbootxyz/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/netbootxyz/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/netbootxyz/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/netbootxyz/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/community/nginx-proxy-manager/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/community/nginx-proxy-manager/templates/library/base_v1_1_3/permissions.py rename ix-dev/community/nginx-proxy-manager/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/nginx-proxy-manager/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/community/nginx-proxy-manager/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/community/nginx-proxy-manager/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/nginx-proxy-manager/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/nginx-proxy-manager/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/community/nginx-proxy-manager/templates/library/base_v1_1_4/permissions.py rename ix-dev/community/nginx-proxy-manager/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/nginx-proxy-manager/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/nginx-proxy-manager/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/nginx-proxy-manager/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/nginx-proxy-manager/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/nginx-proxy-manager/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/nginx-proxy-manager/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/community/node-red/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/community/node-red/templates/library/base_v1_1_3/permissions.py rename ix-dev/community/node-red/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/node-red/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/community/node-red/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/community/node-red/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/node-red/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/node-red/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/community/node-red/templates/library/base_v1_1_4/permissions.py rename ix-dev/community/node-red/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/node-red/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/node-red/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/node-red/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/node-red/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/node-red/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/node-red/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/community/odoo/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/community/odoo/templates/library/base_v1_1_3/permissions.py rename ix-dev/community/odoo/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/odoo/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/community/odoo/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/community/odoo/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/odoo/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/odoo/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/community/odoo/templates/library/base_v1_1_4/permissions.py rename ix-dev/community/odoo/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/odoo/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/odoo/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/odoo/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/odoo/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/odoo/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/odoo/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/community/omada-controller/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/community/omada-controller/templates/library/base_v1_1_3/permissions.py rename ix-dev/community/omada-controller/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/omada-controller/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/community/omada-controller/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/community/omada-controller/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/omada-controller/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/omada-controller/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/community/omada-controller/templates/library/base_v1_1_4/permissions.py rename ix-dev/community/omada-controller/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/omada-controller/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/omada-controller/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/omada-controller/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/omada-controller/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/omada-controller/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/omada-controller/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/community/organizr/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/community/organizr/templates/library/base_v1_1_3/permissions.py rename ix-dev/community/organizr/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/organizr/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/community/organizr/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/community/organizr/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/organizr/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/organizr/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/community/organizr/templates/library/base_v1_1_4/permissions.py rename ix-dev/community/organizr/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/organizr/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/organizr/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/organizr/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/organizr/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/organizr/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/organizr/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/community/overseerr/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/community/overseerr/templates/library/base_v1_1_3/permissions.py rename ix-dev/community/overseerr/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/overseerr/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/community/overseerr/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/community/overseerr/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/overseerr/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/overseerr/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/community/overseerr/templates/library/base_v1_1_4/permissions.py rename ix-dev/community/overseerr/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/overseerr/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/overseerr/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/overseerr/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/overseerr/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/overseerr/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/overseerr/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/community/palworld/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/community/palworld/templates/library/base_v1_1_3/permissions.py rename ix-dev/community/palworld/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/palworld/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/community/palworld/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/community/palworld/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/palworld/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/palworld/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/community/palworld/templates/library/base_v1_1_4/permissions.py rename ix-dev/community/palworld/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/palworld/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/palworld/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/palworld/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/palworld/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/palworld/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/palworld/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/community/paperless-ngx/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/community/paperless-ngx/templates/library/base_v1_1_3/permissions.py rename ix-dev/community/paperless-ngx/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/paperless-ngx/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/community/paperless-ngx/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/community/paperless-ngx/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/paperless-ngx/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/paperless-ngx/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/community/paperless-ngx/templates/library/base_v1_1_4/permissions.py rename ix-dev/community/paperless-ngx/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/paperless-ngx/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/paperless-ngx/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/paperless-ngx/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/paperless-ngx/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/paperless-ngx/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/paperless-ngx/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/community/passbolt/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/community/passbolt/templates/library/base_v1_1_3/permissions.py rename ix-dev/community/passbolt/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/passbolt/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/community/passbolt/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/community/passbolt/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/passbolt/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/passbolt/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/community/passbolt/templates/library/base_v1_1_4/permissions.py rename ix-dev/community/passbolt/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/passbolt/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/passbolt/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/passbolt/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/passbolt/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/passbolt/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/passbolt/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/community/pgadmin/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/community/pgadmin/templates/library/base_v1_1_3/permissions.py rename ix-dev/community/pgadmin/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/pgadmin/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/community/pgadmin/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/community/pgadmin/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/pgadmin/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/pgadmin/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/community/pgadmin/templates/library/base_v1_1_4/permissions.py rename ix-dev/community/pgadmin/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/pgadmin/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/pgadmin/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/pgadmin/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/pgadmin/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/pgadmin/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/pgadmin/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/community/pigallery2/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/community/pigallery2/templates/library/base_v1_1_3/permissions.py rename ix-dev/community/pigallery2/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/pigallery2/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/community/pigallery2/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/community/pigallery2/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/pigallery2/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/pigallery2/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/community/pigallery2/templates/library/base_v1_1_4/permissions.py rename ix-dev/community/pigallery2/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/pigallery2/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/pigallery2/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/pigallery2/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/pigallery2/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/pigallery2/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/pigallery2/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/community/piwigo/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/community/piwigo/templates/library/base_v1_1_3/permissions.py rename ix-dev/community/piwigo/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/piwigo/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/community/piwigo/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/community/piwigo/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/piwigo/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/piwigo/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/community/piwigo/templates/library/base_v1_1_4/permissions.py rename ix-dev/community/piwigo/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/piwigo/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/piwigo/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/piwigo/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/piwigo/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/piwigo/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/piwigo/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/community/planka/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/community/planka/templates/library/base_v1_1_3/permissions.py rename ix-dev/community/planka/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/planka/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/community/planka/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/community/planka/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/planka/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/planka/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/community/planka/templates/library/base_v1_1_4/permissions.py rename ix-dev/community/planka/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/planka/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/planka/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/planka/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/planka/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/planka/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/planka/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/community/plex-auto-languages/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/community/plex-auto-languages/templates/library/base_v1_1_3/permissions.py rename ix-dev/community/plex-auto-languages/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/plex-auto-languages/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/community/plex-auto-languages/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/community/plex-auto-languages/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/plex-auto-languages/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/plex-auto-languages/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/community/plex-auto-languages/templates/library/base_v1_1_4/permissions.py rename ix-dev/community/plex-auto-languages/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/plex-auto-languages/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/plex-auto-languages/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/plex-auto-languages/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/plex-auto-languages/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/plex-auto-languages/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/plex-auto-languages/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/community/portainer/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/community/portainer/templates/library/base_v1_1_3/permissions.py rename ix-dev/community/portainer/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/portainer/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/community/portainer/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/community/portainer/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/portainer/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/portainer/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/community/portainer/templates/library/base_v1_1_4/permissions.py rename ix-dev/community/portainer/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/portainer/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/portainer/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/portainer/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/portainer/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/portainer/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/portainer/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/community/prowlarr/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/community/prowlarr/templates/library/base_v1_1_3/permissions.py rename ix-dev/community/prowlarr/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/prowlarr/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/community/prowlarr/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/community/prowlarr/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/prowlarr/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/prowlarr/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/community/prowlarr/templates/library/base_v1_1_4/permissions.py rename ix-dev/community/prowlarr/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/prowlarr/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/prowlarr/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/prowlarr/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/prowlarr/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/prowlarr/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/prowlarr/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/community/qbittorrent/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/community/qbittorrent/templates/library/base_v1_1_3/permissions.py rename ix-dev/community/qbittorrent/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/qbittorrent/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/community/qbittorrent/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/community/qbittorrent/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/qbittorrent/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/qbittorrent/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/community/qbittorrent/templates/library/base_v1_1_4/permissions.py rename ix-dev/community/qbittorrent/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/qbittorrent/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/qbittorrent/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/qbittorrent/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/qbittorrent/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/qbittorrent/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/qbittorrent/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/community/radarr/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/community/radarr/templates/library/base_v1_1_3/permissions.py rename ix-dev/community/radarr/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/radarr/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/community/radarr/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/community/radarr/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/radarr/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/radarr/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/community/radarr/templates/library/base_v1_1_4/permissions.py rename ix-dev/community/radarr/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/radarr/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/radarr/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/radarr/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/radarr/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/radarr/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/radarr/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/community/readarr/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/community/readarr/templates/library/base_v1_1_3/permissions.py rename ix-dev/community/readarr/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/readarr/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/community/readarr/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/community/readarr/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/readarr/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/readarr/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/community/readarr/templates/library/base_v1_1_4/permissions.py rename ix-dev/community/readarr/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/readarr/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/readarr/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/readarr/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/readarr/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/readarr/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/readarr/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/community/recyclarr/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/community/recyclarr/templates/library/base_v1_1_3/permissions.py rename ix-dev/community/recyclarr/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/recyclarr/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/community/recyclarr/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/community/recyclarr/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/recyclarr/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/recyclarr/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/community/recyclarr/templates/library/base_v1_1_4/permissions.py rename ix-dev/community/recyclarr/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/recyclarr/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/recyclarr/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/recyclarr/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/recyclarr/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/recyclarr/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/recyclarr/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/community/redis/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/community/redis/templates/library/base_v1_1_3/permissions.py rename ix-dev/community/redis/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/redis/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/community/redis/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/community/redis/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/redis/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/redis/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/community/redis/templates/library/base_v1_1_4/permissions.py rename ix-dev/community/redis/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/redis/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/redis/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/redis/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/redis/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/redis/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/redis/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/community/roundcube/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/community/roundcube/templates/library/base_v1_1_3/permissions.py rename ix-dev/community/roundcube/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/roundcube/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/community/roundcube/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/community/roundcube/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/roundcube/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/roundcube/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/community/roundcube/templates/library/base_v1_1_4/permissions.py rename ix-dev/community/roundcube/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/roundcube/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/roundcube/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/roundcube/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/roundcube/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/roundcube/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/roundcube/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/community/rsyncd/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/community/rsyncd/templates/library/base_v1_1_3/permissions.py rename ix-dev/community/rsyncd/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/rsyncd/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/community/rsyncd/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/community/rsyncd/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/rsyncd/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/rsyncd/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/community/rsyncd/templates/library/base_v1_1_4/permissions.py rename ix-dev/community/rsyncd/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/rsyncd/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/rsyncd/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/rsyncd/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/rsyncd/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/rsyncd/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/rsyncd/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/community/rust-desk/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/community/rust-desk/templates/library/base_v1_1_3/permissions.py rename ix-dev/community/rust-desk/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/rust-desk/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/community/rust-desk/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/community/rust-desk/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/rust-desk/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/rust-desk/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/community/rust-desk/templates/library/base_v1_1_4/permissions.py rename ix-dev/community/rust-desk/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/rust-desk/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/rust-desk/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/rust-desk/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/rust-desk/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/rust-desk/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/rust-desk/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/community/sabnzbd/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/community/sabnzbd/templates/library/base_v1_1_3/permissions.py rename ix-dev/community/sabnzbd/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/sabnzbd/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/community/sabnzbd/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/community/sabnzbd/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/sabnzbd/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/sabnzbd/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/community/sabnzbd/templates/library/base_v1_1_4/permissions.py rename ix-dev/community/sabnzbd/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/sabnzbd/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/sabnzbd/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/sabnzbd/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/sabnzbd/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/sabnzbd/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/sabnzbd/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/community/searxng/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/community/searxng/templates/library/base_v1_1_3/permissions.py rename ix-dev/community/searxng/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/searxng/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/community/searxng/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/community/searxng/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/searxng/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/searxng/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/community/searxng/templates/library/base_v1_1_4/permissions.py rename ix-dev/community/searxng/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/searxng/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/searxng/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/searxng/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/searxng/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/searxng/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/searxng/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/community/sftpgo/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/community/sftpgo/templates/library/base_v1_1_3/permissions.py rename ix-dev/community/sftpgo/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/sftpgo/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/community/sftpgo/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/community/sftpgo/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/sftpgo/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/sftpgo/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/community/sftpgo/templates/library/base_v1_1_4/permissions.py rename ix-dev/community/sftpgo/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/sftpgo/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/sftpgo/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/sftpgo/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/sftpgo/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/sftpgo/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/sftpgo/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/community/sonarr/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/community/sonarr/templates/library/base_v1_1_3/permissions.py rename ix-dev/community/sonarr/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/sonarr/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/community/sonarr/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/community/sonarr/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/sonarr/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/sonarr/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/community/sonarr/templates/library/base_v1_1_4/permissions.py rename ix-dev/community/sonarr/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/sonarr/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/sonarr/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/sonarr/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/sonarr/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/sonarr/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/sonarr/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/community/tailscale/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/community/tailscale/templates/library/base_v1_1_3/permissions.py rename ix-dev/community/tailscale/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/tailscale/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/community/tailscale/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/community/tailscale/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/tailscale/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/tailscale/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/community/tailscale/templates/library/base_v1_1_4/permissions.py rename ix-dev/community/tailscale/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/tailscale/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/tailscale/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/tailscale/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/tailscale/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/tailscale/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/tailscale/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) rename ix-dev/community/tailscale/templates/library/community/tailscale/{v1_1_14 => v1_1_15}/util.py (93%) delete mode 100644 ix-dev/community/tautulli/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/community/tautulli/templates/library/base_v1_1_3/permissions.py rename ix-dev/community/tautulli/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/tautulli/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/community/tautulli/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/community/tautulli/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/tautulli/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/tautulli/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/community/tautulli/templates/library/base_v1_1_4/permissions.py rename ix-dev/community/tautulli/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/tautulli/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/tautulli/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/tautulli/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/tautulli/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/tautulli/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/tautulli/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/community/tdarr/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/community/tdarr/templates/library/base_v1_1_3/permissions.py rename ix-dev/community/tdarr/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/tdarr/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/community/tdarr/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/community/tdarr/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/tdarr/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/tdarr/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/community/tdarr/templates/library/base_v1_1_4/permissions.py rename ix-dev/community/tdarr/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/tdarr/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/tdarr/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/tdarr/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/tdarr/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/tdarr/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/tdarr/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/community/terraria/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/community/terraria/templates/library/base_v1_1_3/permissions.py rename ix-dev/community/terraria/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/terraria/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/community/terraria/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/community/terraria/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/terraria/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/terraria/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/community/terraria/templates/library/base_v1_1_4/permissions.py rename ix-dev/community/terraria/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/terraria/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/terraria/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/terraria/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/terraria/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/terraria/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/terraria/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/community/tftpd-hpa/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/community/tftpd-hpa/templates/library/base_v1_1_3/permissions.py rename ix-dev/community/tftpd-hpa/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/tftpd-hpa/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/community/tftpd-hpa/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/community/tftpd-hpa/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/tftpd-hpa/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/tftpd-hpa/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/community/tftpd-hpa/templates/library/base_v1_1_4/permissions.py rename ix-dev/community/tftpd-hpa/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/tftpd-hpa/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/tftpd-hpa/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/tftpd-hpa/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/tftpd-hpa/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/tftpd-hpa/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/tftpd-hpa/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/community/tiny-media-manager/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/community/tiny-media-manager/templates/library/base_v1_1_3/permissions.py rename ix-dev/community/tiny-media-manager/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/tiny-media-manager/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/community/tiny-media-manager/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/community/tiny-media-manager/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/tiny-media-manager/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/tiny-media-manager/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/community/tiny-media-manager/templates/library/base_v1_1_4/permissions.py rename ix-dev/community/tiny-media-manager/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/tiny-media-manager/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/tiny-media-manager/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/tiny-media-manager/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/tiny-media-manager/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/tiny-media-manager/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/tiny-media-manager/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/community/transmission/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/community/transmission/templates/library/base_v1_1_3/permissions.py rename ix-dev/community/transmission/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/transmission/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/community/transmission/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/community/transmission/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/transmission/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/transmission/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/community/transmission/templates/library/base_v1_1_4/permissions.py rename ix-dev/community/transmission/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/transmission/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/transmission/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/transmission/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/transmission/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/transmission/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/transmission/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/community/twofactor-auth/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/community/twofactor-auth/templates/library/base_v1_1_3/permissions.py rename ix-dev/community/twofactor-auth/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/twofactor-auth/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/community/twofactor-auth/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/community/twofactor-auth/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/twofactor-auth/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/twofactor-auth/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/community/twofactor-auth/templates/library/base_v1_1_4/permissions.py rename ix-dev/community/twofactor-auth/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/twofactor-auth/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/twofactor-auth/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/twofactor-auth/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/twofactor-auth/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/twofactor-auth/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/twofactor-auth/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/community/unifi-controller/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/community/unifi-controller/templates/library/base_v1_1_3/permissions.py rename ix-dev/community/unifi-controller/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/unifi-controller/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/community/unifi-controller/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/community/unifi-controller/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/unifi-controller/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/unifi-controller/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/community/unifi-controller/templates/library/base_v1_1_4/permissions.py rename ix-dev/community/unifi-controller/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/unifi-controller/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/unifi-controller/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/unifi-controller/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/unifi-controller/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/unifi-controller/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/unifi-controller/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/community/unifi-protect-backup/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/community/unifi-protect-backup/templates/library/base_v1_1_3/permissions.py rename ix-dev/community/unifi-protect-backup/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/unifi-protect-backup/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/community/unifi-protect-backup/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/community/unifi-protect-backup/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/unifi-protect-backup/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/unifi-protect-backup/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/community/unifi-protect-backup/templates/library/base_v1_1_4/permissions.py rename ix-dev/community/unifi-protect-backup/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/unifi-protect-backup/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/unifi-protect-backup/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/unifi-protect-backup/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/unifi-protect-backup/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/unifi-protect-backup/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/unifi-protect-backup/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/community/vaultwarden/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/community/vaultwarden/templates/library/base_v1_1_3/permissions.py rename ix-dev/community/vaultwarden/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/vaultwarden/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/community/vaultwarden/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/community/vaultwarden/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/vaultwarden/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/vaultwarden/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/community/vaultwarden/templates/library/base_v1_1_4/permissions.py rename ix-dev/community/vaultwarden/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/vaultwarden/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/vaultwarden/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/vaultwarden/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/vaultwarden/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/vaultwarden/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/vaultwarden/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/community/vikunja/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/community/vikunja/templates/library/base_v1_1_3/permissions.py rename ix-dev/community/vikunja/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/vikunja/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/community/vikunja/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/community/vikunja/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/vikunja/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/vikunja/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/community/vikunja/templates/library/base_v1_1_4/permissions.py rename ix-dev/community/vikunja/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/vikunja/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/vikunja/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/vikunja/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/vikunja/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/vikunja/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/vikunja/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/community/webdav/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/community/webdav/templates/library/base_v1_1_3/permissions.py rename ix-dev/community/webdav/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/webdav/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/community/webdav/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/community/webdav/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/webdav/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/webdav/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/community/webdav/templates/library/base_v1_1_4/permissions.py rename ix-dev/community/webdav/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/webdav/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/webdav/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/webdav/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/webdav/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/webdav/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/webdav/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/community/whoogle/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/community/whoogle/templates/library/base_v1_1_3/permissions.py rename ix-dev/community/whoogle/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/whoogle/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/community/whoogle/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/community/whoogle/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/whoogle/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/whoogle/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/community/whoogle/templates/library/base_v1_1_4/permissions.py rename ix-dev/community/whoogle/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/whoogle/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/whoogle/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/whoogle/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/whoogle/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/whoogle/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/whoogle/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/community/wordpress/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/community/wordpress/templates/library/base_v1_1_3/permissions.py rename ix-dev/community/wordpress/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/wordpress/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/community/wordpress/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/community/wordpress/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/wordpress/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/wordpress/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/community/wordpress/templates/library/base_v1_1_4/permissions.py rename ix-dev/community/wordpress/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/wordpress/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/wordpress/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/wordpress/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/wordpress/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/wordpress/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/wordpress/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/community/zerotier/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/community/zerotier/templates/library/base_v1_1_3/permissions.py rename ix-dev/community/zerotier/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/community/zerotier/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/community/zerotier/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/community/zerotier/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/community/zerotier/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/community/zerotier/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/community/zerotier/templates/library/base_v1_1_4/permissions.py rename ix-dev/community/zerotier/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/community/zerotier/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/community/zerotier/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/community/zerotier/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/community/zerotier/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/community/zerotier/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/community/zerotier/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/enterprise/minio/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/enterprise/minio/templates/library/base_v1_1_3/permissions.py rename ix-dev/enterprise/minio/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/enterprise/minio/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/enterprise/minio/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/enterprise/minio/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/enterprise/minio/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/enterprise/minio/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/enterprise/minio/templates/library/base_v1_1_4/permissions.py rename ix-dev/enterprise/minio/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/enterprise/minio/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/enterprise/minio/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/enterprise/minio/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/enterprise/minio/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/enterprise/minio/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/enterprise/minio/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) rename ix-dev/enterprise/minio/templates/library/enterprise/minio/{v1_1_6 => v1_1_7}/__init__.py (100%) rename ix-dev/enterprise/minio/templates/library/enterprise/minio/{v1_1_6 => v1_1_7}/data.py (98%) delete mode 100644 ix-dev/enterprise/syncthing/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/enterprise/syncthing/templates/library/base_v1_1_3/permissions.py rename ix-dev/enterprise/syncthing/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/enterprise/syncthing/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/enterprise/syncthing/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/enterprise/syncthing/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/enterprise/syncthing/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/enterprise/syncthing/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/enterprise/syncthing/templates/library/base_v1_1_4/permissions.py rename ix-dev/enterprise/syncthing/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/enterprise/syncthing/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/enterprise/syncthing/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/enterprise/syncthing/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/enterprise/syncthing/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/enterprise/syncthing/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/enterprise/syncthing/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/stable/collabora/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/stable/collabora/templates/library/base_v1_1_3/permissions.py rename ix-dev/stable/collabora/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/stable/collabora/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/stable/collabora/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/stable/collabora/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/stable/collabora/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/stable/collabora/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/stable/collabora/templates/library/base_v1_1_4/permissions.py rename ix-dev/stable/collabora/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/stable/collabora/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/stable/collabora/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/stable/collabora/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/stable/collabora/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/stable/collabora/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/stable/collabora/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/stable/diskoverdata/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/stable/diskoverdata/templates/library/base_v1_1_3/permissions.py rename ix-dev/stable/diskoverdata/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/stable/diskoverdata/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/stable/diskoverdata/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/stable/diskoverdata/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/stable/diskoverdata/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/stable/diskoverdata/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/stable/diskoverdata/templates/library/base_v1_1_4/permissions.py rename ix-dev/stable/diskoverdata/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/stable/diskoverdata/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/stable/diskoverdata/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/stable/diskoverdata/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/stable/diskoverdata/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/stable/diskoverdata/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/stable/diskoverdata/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/stable/elastic-search/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/stable/elastic-search/templates/library/base_v1_1_3/permissions.py rename ix-dev/stable/elastic-search/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/stable/elastic-search/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/stable/elastic-search/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/stable/elastic-search/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/stable/elastic-search/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/stable/elastic-search/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/stable/elastic-search/templates/library/base_v1_1_4/permissions.py rename ix-dev/stable/elastic-search/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/stable/elastic-search/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/stable/elastic-search/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/stable/elastic-search/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/stable/elastic-search/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/stable/elastic-search/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/stable/elastic-search/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/stable/emby/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/stable/emby/templates/library/base_v1_1_3/permissions.py rename ix-dev/stable/emby/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/stable/emby/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/stable/emby/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/stable/emby/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/stable/emby/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/stable/emby/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/stable/emby/templates/library/base_v1_1_4/permissions.py rename ix-dev/stable/emby/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/stable/emby/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/stable/emby/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/stable/emby/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/stable/emby/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/stable/emby/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/stable/emby/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/stable/home-assistant/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/stable/home-assistant/templates/library/base_v1_1_3/permissions.py rename ix-dev/stable/home-assistant/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/stable/home-assistant/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/stable/home-assistant/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/stable/home-assistant/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/stable/home-assistant/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/stable/home-assistant/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/stable/home-assistant/templates/library/base_v1_1_4/permissions.py rename ix-dev/stable/home-assistant/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/stable/home-assistant/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/stable/home-assistant/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/stable/home-assistant/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/stable/home-assistant/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/stable/home-assistant/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/stable/home-assistant/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/stable/ix-app/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/stable/ix-app/templates/library/base_v1_1_3/permissions.py rename ix-dev/stable/ix-app/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/stable/ix-app/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/stable/ix-app/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/stable/ix-app/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/stable/ix-app/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/stable/ix-app/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/stable/ix-app/templates/library/base_v1_1_4/permissions.py rename ix-dev/stable/ix-app/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/stable/ix-app/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/stable/ix-app/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/stable/ix-app/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/stable/ix-app/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/stable/ix-app/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/stable/ix-app/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/stable/minio/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/stable/minio/templates/library/base_v1_1_3/permissions.py rename ix-dev/stable/minio/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/stable/minio/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/stable/minio/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/stable/minio/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/stable/minio/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/stable/minio/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/stable/minio/templates/library/base_v1_1_4/permissions.py rename ix-dev/stable/minio/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/stable/minio/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/stable/minio/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/stable/minio/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/stable/minio/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/stable/minio/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/stable/minio/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/stable/netdata/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/stable/netdata/templates/library/base_v1_1_3/permissions.py rename ix-dev/stable/netdata/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/stable/netdata/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/stable/netdata/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/stable/netdata/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/stable/netdata/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/stable/netdata/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/stable/netdata/templates/library/base_v1_1_4/permissions.py rename ix-dev/stable/netdata/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/stable/netdata/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/stable/netdata/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/stable/netdata/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/stable/netdata/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/stable/netdata/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/stable/netdata/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/stable/nextcloud/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/stable/nextcloud/templates/library/base_v1_1_3/permissions.py rename ix-dev/stable/nextcloud/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/stable/nextcloud/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/stable/nextcloud/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/stable/nextcloud/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/stable/nextcloud/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/stable/nextcloud/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/stable/nextcloud/templates/library/base_v1_1_4/permissions.py rename ix-dev/stable/nextcloud/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/stable/nextcloud/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/stable/nextcloud/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/stable/nextcloud/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/stable/nextcloud/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/stable/nextcloud/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/stable/nextcloud/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/stable/photoprism/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/stable/photoprism/templates/library/base_v1_1_3/permissions.py rename ix-dev/stable/photoprism/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/stable/photoprism/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/stable/photoprism/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/stable/photoprism/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/stable/photoprism/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/stable/photoprism/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/stable/photoprism/templates/library/base_v1_1_4/permissions.py rename ix-dev/stable/photoprism/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/stable/photoprism/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/stable/photoprism/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/stable/photoprism/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/stable/photoprism/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/stable/photoprism/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/stable/photoprism/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/stable/pihole/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/stable/pihole/templates/library/base_v1_1_3/permissions.py rename ix-dev/stable/pihole/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/stable/pihole/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/stable/pihole/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/stable/pihole/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/stable/pihole/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/stable/pihole/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/stable/pihole/templates/library/base_v1_1_4/permissions.py rename ix-dev/stable/pihole/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/stable/pihole/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/stable/pihole/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/stable/pihole/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/stable/pihole/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/stable/pihole/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/stable/pihole/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/stable/plex/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/stable/plex/templates/library/base_v1_1_3/permissions.py rename ix-dev/stable/plex/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/stable/plex/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/stable/plex/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/stable/plex/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/stable/plex/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/stable/plex/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/stable/plex/templates/library/base_v1_1_4/permissions.py rename ix-dev/stable/plex/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/stable/plex/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/stable/plex/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/stable/plex/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/stable/plex/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/stable/plex/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/stable/plex/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/stable/prometheus/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/stable/prometheus/templates/library/base_v1_1_3/permissions.py rename ix-dev/stable/prometheus/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/stable/prometheus/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/stable/prometheus/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/stable/prometheus/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/stable/prometheus/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/stable/prometheus/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/stable/prometheus/templates/library/base_v1_1_4/permissions.py rename ix-dev/stable/prometheus/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/stable/prometheus/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/stable/prometheus/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/stable/prometheus/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/stable/prometheus/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/stable/prometheus/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/stable/prometheus/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/stable/storj/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/stable/storj/templates/library/base_v1_1_3/permissions.py rename ix-dev/stable/storj/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/stable/storj/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/stable/storj/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/stable/storj/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/stable/storj/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/stable/storj/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/stable/storj/templates/library/base_v1_1_4/permissions.py rename ix-dev/stable/storj/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/stable/storj/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/stable/storj/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/stable/storj/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/stable/storj/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/stable/storj/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/stable/storj/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/stable/syncthing/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/stable/syncthing/templates/library/base_v1_1_3/permissions.py rename ix-dev/stable/syncthing/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/stable/syncthing/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/stable/syncthing/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/stable/syncthing/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/stable/syncthing/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/stable/syncthing/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/stable/syncthing/templates/library/base_v1_1_4/permissions.py rename ix-dev/stable/syncthing/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/stable/syncthing/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/stable/syncthing/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/stable/syncthing/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/stable/syncthing/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/stable/syncthing/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/stable/syncthing/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 ix-dev/stable/wg-easy/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 ix-dev/stable/wg-easy/templates/library/base_v1_1_3/permissions.py rename ix-dev/stable/wg-easy/templates/library/{base_v1_1_3 => base_v1_1_4}/__init__.py (100%) rename ix-dev/stable/wg-easy/templates/library/{base_v1_1_3 => base_v1_1_4}/environment.py (100%) create mode 100644 ix-dev/stable/wg-easy/templates/library/base_v1_1_4/healthchecks.py rename ix-dev/stable/wg-easy/templates/library/{base_v1_1_3 => base_v1_1_4}/mariadb.py (100%) rename ix-dev/stable/wg-easy/templates/library/{base_v1_1_3 => base_v1_1_4}/metadata.py (100%) rename ix-dev/stable/wg-easy/templates/library/{base_v1_1_3 => base_v1_1_4}/network.py (100%) create mode 100644 ix-dev/stable/wg-easy/templates/library/base_v1_1_4/permissions.py rename ix-dev/stable/wg-easy/templates/library/{base_v1_1_3 => base_v1_1_4}/ports.py (100%) rename ix-dev/stable/wg-easy/templates/library/{base_v1_1_3 => base_v1_1_4}/postgres.py (100%) rename ix-dev/stable/wg-easy/templates/library/{base_v1_1_3 => base_v1_1_4}/redis.py (100%) rename ix-dev/stable/wg-easy/templates/library/{base_v1_1_3 => base_v1_1_4}/resources.py (100%) rename ix-dev/stable/wg-easy/templates/library/{base_v1_1_3 => base_v1_1_4}/security.py (100%) rename ix-dev/stable/wg-easy/templates/library/{base_v1_1_3 => base_v1_1_4}/storage.py (100%) rename ix-dev/stable/wg-easy/templates/library/{base_v1_1_3 => base_v1_1_4}/utils.py (100%) delete mode 100644 library/1.1.3/healthchecks.py delete mode 100644 library/1.1.3/permissions.py rename library/{1.1.3 => 1.1.4}/__init__.py (100%) rename library/{1.1.3 => 1.1.4}/environment.py (100%) create mode 100644 library/1.1.4/healthchecks.py rename library/{1.1.3 => 1.1.4}/mariadb.py (100%) rename library/{1.1.3 => 1.1.4}/metadata.py (100%) rename library/{1.1.3 => 1.1.4}/network.py (100%) create mode 100644 library/1.1.4/permissions.py rename library/{1.1.3 => 1.1.4}/ports.py (100%) rename library/{1.1.3 => 1.1.4}/postgres.py (100%) rename library/{1.1.3 => 1.1.4}/redis.py (100%) rename library/{1.1.3 => 1.1.4}/resources.py (100%) rename library/{1.1.3 => 1.1.4}/security.py (100%) rename library/{1.1.3 => 1.1.4}/storage.py (100%) rename library/{1.1.3 => 1.1.4}/utils.py (100%) diff --git a/ix-dev/community/actual-budget/app.yaml b/ix-dev/community/actual-budget/app.yaml index 99f80ee686..da8b9200ea 100644 --- a/ix-dev/community/actual-budget/app.yaml +++ b/ix-dev/community/actual-budget/app.yaml @@ -10,8 +10,8 @@ icon: https://media.sys.truenas.net/apps/actual-budget/icons/icon.png keywords: - finance - budget -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -33,4 +33,4 @@ sources: - https://hub.docker.com/r/actualbudget/actual-server title: Actual Budget train: community -version: 1.1.12 +version: 1.1.13 diff --git a/ix-dev/community/actual-budget/templates/docker-compose.yaml b/ix-dev/community/actual-budget/templates/docker-compose.yaml index 4c17f83ffc..acaacce96d 100644 --- a/ix-dev/community/actual-budget/templates/docker-compose.yaml +++ b/ix-dev/community/actual-budget/templates/docker-compose.yaml @@ -64,7 +64,7 @@ services: {% if values.network.dns_opts %} dns_opt: {{ ix_lib.base.network.dns_opts(values.network.dns_opts) | tojson }} {% endif %} - {% set test = ix_lib.base.healthchecks.http_test(path="/health", port=values.network.web_port) %} + {% set test = "NODE_TLS_REJECT_UNAUTHORIZED=0 npm run health-check" %} healthcheck: {{ ix_lib.base.healthchecks.check_health(test) | tojson }} {% set app_env = { "ACTUAL_PORT": values.network.web_port, diff --git a/ix-dev/community/actual-budget/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/actual-budget/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/actual-budget/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/actual-budget/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/actual-budget/templates/library/base_v1_1_3/environment.py b/ix-dev/community/actual-budget/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/actual-budget/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/actual-budget/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/actual-budget/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/actual-budget/templates/library/base_v1_1_4/healthchecks.py similarity index 92% rename from ix-dev/community/actual-budget/templates/library/base_v1_1_3/healthchecks.py rename to ix-dev/community/actual-budget/templates/library/base_v1_1_4/healthchecks.py index 09f8ac53fd..cc98270d1d 100644 --- a/ix-dev/community/actual-budget/templates/library/base_v1_1_3/healthchecks.py +++ b/ix-dev/community/actual-budget/templates/library/base_v1_1_4/healthchecks.py @@ -95,10 +95,9 @@ def http_test(port, path, config=None): host = config.get("host", "127.0.0.1") - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa def netcat_test(port, config=None): diff --git a/ix-dev/community/actual-budget/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/actual-budget/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/actual-budget/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/actual-budget/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/actual-budget/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/actual-budget/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/actual-budget/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/actual-budget/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/actual-budget/templates/library/base_v1_1_3/network.py b/ix-dev/community/actual-budget/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/actual-budget/templates/library/base_v1_1_3/network.py rename to ix-dev/community/actual-budget/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/audiobookshelf/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/actual-budget/templates/library/base_v1_1_4/permissions.py similarity index 98% rename from ix-dev/community/audiobookshelf/templates/library/base_v1_1_3/permissions.py rename to ix-dev/community/actual-budget/templates/library/base_v1_1_4/permissions.py index 7d98983af6..1ce6e60ca1 100644 --- a/ix-dev/community/audiobookshelf/templates/library/base_v1_1_3/permissions.py +++ b/ix-dev/community/actual-budget/templates/library/base_v1_1_4/permissions.py @@ -70,12 +70,12 @@ def process_dir_shell_func(): if [ -z "$$dir" ]; then echo "Path is empty, skipping..." - exit 0 + return 0 fi if [ ! -d "$$dir" ]; then echo "Path [$$dir] does is not a directory, skipping..." - exit 0 + return 0 fi if [ "$$is_temporary" = "true" ]; then @@ -86,7 +86,7 @@ def process_dir_shell_func(): if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then echo "Path [$$dir] is not empty, skipping..." - exit 0 + return 0 fi echo "Current Ownership and Permissions on [$$dir]:" diff --git a/ix-dev/community/actual-budget/templates/library/base_v1_1_3/ports.py b/ix-dev/community/actual-budget/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/actual-budget/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/actual-budget/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/actual-budget/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/actual-budget/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/actual-budget/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/actual-budget/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/actual-budget/templates/library/base_v1_1_3/redis.py b/ix-dev/community/actual-budget/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/actual-budget/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/actual-budget/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/actual-budget/templates/library/base_v1_1_3/resources.py b/ix-dev/community/actual-budget/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/actual-budget/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/actual-budget/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/actual-budget/templates/library/base_v1_1_3/security.py b/ix-dev/community/actual-budget/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/actual-budget/templates/library/base_v1_1_3/security.py rename to ix-dev/community/actual-budget/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/actual-budget/templates/library/base_v1_1_3/storage.py b/ix-dev/community/actual-budget/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/actual-budget/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/actual-budget/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/actual-budget/templates/library/base_v1_1_3/utils.py b/ix-dev/community/actual-budget/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/actual-budget/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/actual-budget/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/adguard-home/app.yaml b/ix-dev/community/adguard-home/app.yaml index 70dc200215..d653369b6c 100644 --- a/ix-dev/community/adguard-home/app.yaml +++ b/ix-dev/community/adguard-home/app.yaml @@ -18,8 +18,8 @@ icon: https://media.sys.truenas.net/apps/adguard-home/icons/icon.svg keywords: - dns - adblock -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -40,4 +40,4 @@ sources: - https://hub.docker.com/r/adguard/adguardhome title: AdGuard Home train: community -version: 1.0.21 +version: 1.0.22 diff --git a/ix-dev/community/adguard-home/templates/docker-compose.yaml b/ix-dev/community/adguard-home/templates/docker-compose.yaml index b179fa3472..a05d314666 100644 --- a/ix-dev/community/adguard-home/templates/docker-compose.yaml +++ b/ix-dev/community/adguard-home/templates/docker-compose.yaml @@ -49,7 +49,7 @@ services: {% if values.network.dns_opts %} dns_opt: {{ ix_lib.base.network.dns_opts(values.network.dns_opts) | tojson }} {% endif %} - {% set test = ix_lib.base.healthchecks.wget_test(port=values.network.web_port, path="/health-check", config={"scheme": "https" if values.adguard.use_https_probe else "http"}) %} + {% set test = ix_lib.base.healthchecks.wget_test(port=values.network.web_port, path="/", config={"scheme": "https" if values.adguard.use_https_probe else "http"}) %} healthcheck: {{ ix_lib.base.healthchecks.check_health(test) | tojson }} environment: {{ ix_lib.base.environment.envs(app={}, user=values.adguard.additional_envs,values=values) | tojson }} {% if not values.network.host_network and not values.network.dhcp_enabled %} diff --git a/ix-dev/community/adguard-home/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/adguard-home/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/adguard-home/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/adguard-home/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/adguard-home/templates/library/base_v1_1_3/environment.py b/ix-dev/community/adguard-home/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/adguard-home/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/adguard-home/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/audiobookshelf/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/adguard-home/templates/library/base_v1_1_4/healthchecks.py similarity index 92% rename from ix-dev/community/audiobookshelf/templates/library/base_v1_1_3/healthchecks.py rename to ix-dev/community/adguard-home/templates/library/base_v1_1_4/healthchecks.py index 09f8ac53fd..cc98270d1d 100644 --- a/ix-dev/community/audiobookshelf/templates/library/base_v1_1_3/healthchecks.py +++ b/ix-dev/community/adguard-home/templates/library/base_v1_1_4/healthchecks.py @@ -95,10 +95,9 @@ def http_test(port, path, config=None): host = config.get("host", "127.0.0.1") - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa def netcat_test(port, config=None): diff --git a/ix-dev/community/adguard-home/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/adguard-home/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/adguard-home/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/adguard-home/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/adguard-home/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/adguard-home/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/adguard-home/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/adguard-home/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/adguard-home/templates/library/base_v1_1_3/network.py b/ix-dev/community/adguard-home/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/adguard-home/templates/library/base_v1_1_3/network.py rename to ix-dev/community/adguard-home/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/actual-budget/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/adguard-home/templates/library/base_v1_1_4/permissions.py similarity index 98% rename from ix-dev/community/actual-budget/templates/library/base_v1_1_3/permissions.py rename to ix-dev/community/adguard-home/templates/library/base_v1_1_4/permissions.py index 7d98983af6..1ce6e60ca1 100644 --- a/ix-dev/community/actual-budget/templates/library/base_v1_1_3/permissions.py +++ b/ix-dev/community/adguard-home/templates/library/base_v1_1_4/permissions.py @@ -70,12 +70,12 @@ def process_dir_shell_func(): if [ -z "$$dir" ]; then echo "Path is empty, skipping..." - exit 0 + return 0 fi if [ ! -d "$$dir" ]; then echo "Path [$$dir] does is not a directory, skipping..." - exit 0 + return 0 fi if [ "$$is_temporary" = "true" ]; then @@ -86,7 +86,7 @@ def process_dir_shell_func(): if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then echo "Path [$$dir] is not empty, skipping..." - exit 0 + return 0 fi echo "Current Ownership and Permissions on [$$dir]:" diff --git a/ix-dev/community/adguard-home/templates/library/base_v1_1_3/ports.py b/ix-dev/community/adguard-home/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/adguard-home/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/adguard-home/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/adguard-home/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/adguard-home/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/adguard-home/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/adguard-home/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/adguard-home/templates/library/base_v1_1_3/redis.py b/ix-dev/community/adguard-home/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/adguard-home/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/adguard-home/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/adguard-home/templates/library/base_v1_1_3/resources.py b/ix-dev/community/adguard-home/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/adguard-home/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/adguard-home/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/adguard-home/templates/library/base_v1_1_3/security.py b/ix-dev/community/adguard-home/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/adguard-home/templates/library/base_v1_1_3/security.py rename to ix-dev/community/adguard-home/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/adguard-home/templates/library/base_v1_1_3/storage.py b/ix-dev/community/adguard-home/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/adguard-home/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/adguard-home/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/adguard-home/templates/library/base_v1_1_3/utils.py b/ix-dev/community/adguard-home/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/adguard-home/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/adguard-home/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/audiobookshelf/app.yaml b/ix-dev/community/audiobookshelf/app.yaml index 29a7d316b3..5aab58c295 100644 --- a/ix-dev/community/audiobookshelf/app.yaml +++ b/ix-dev/community/audiobookshelf/app.yaml @@ -9,8 +9,8 @@ icon: https://media.sys.truenas.net/apps/audiobookshelf/icons/icon.svg keywords: - media - audiobook -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -33,4 +33,4 @@ sources: - https://github.com/advplyr/audiobookshelf title: Audiobookshelf train: community -version: 1.2.13 +version: 1.2.14 diff --git a/ix-dev/community/audiobookshelf/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/audiobookshelf/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/audiobookshelf/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/audiobookshelf/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/audiobookshelf/templates/library/base_v1_1_3/environment.py b/ix-dev/community/audiobookshelf/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/audiobookshelf/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/audiobookshelf/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/adguard-home/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/audiobookshelf/templates/library/base_v1_1_4/healthchecks.py similarity index 92% rename from ix-dev/community/adguard-home/templates/library/base_v1_1_3/healthchecks.py rename to ix-dev/community/audiobookshelf/templates/library/base_v1_1_4/healthchecks.py index 09f8ac53fd..cc98270d1d 100644 --- a/ix-dev/community/adguard-home/templates/library/base_v1_1_3/healthchecks.py +++ b/ix-dev/community/audiobookshelf/templates/library/base_v1_1_4/healthchecks.py @@ -95,10 +95,9 @@ def http_test(port, path, config=None): host = config.get("host", "127.0.0.1") - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa def netcat_test(port, config=None): diff --git a/ix-dev/community/audiobookshelf/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/audiobookshelf/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/audiobookshelf/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/audiobookshelf/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/audiobookshelf/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/audiobookshelf/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/audiobookshelf/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/audiobookshelf/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/audiobookshelf/templates/library/base_v1_1_3/network.py b/ix-dev/community/audiobookshelf/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/audiobookshelf/templates/library/base_v1_1_3/network.py rename to ix-dev/community/audiobookshelf/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/autobrr/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/audiobookshelf/templates/library/base_v1_1_4/permissions.py similarity index 98% rename from ix-dev/community/autobrr/templates/library/base_v1_1_3/permissions.py rename to ix-dev/community/audiobookshelf/templates/library/base_v1_1_4/permissions.py index 7d98983af6..1ce6e60ca1 100644 --- a/ix-dev/community/autobrr/templates/library/base_v1_1_3/permissions.py +++ b/ix-dev/community/audiobookshelf/templates/library/base_v1_1_4/permissions.py @@ -70,12 +70,12 @@ def process_dir_shell_func(): if [ -z "$$dir" ]; then echo "Path is empty, skipping..." - exit 0 + return 0 fi if [ ! -d "$$dir" ]; then echo "Path [$$dir] does is not a directory, skipping..." - exit 0 + return 0 fi if [ "$$is_temporary" = "true" ]; then @@ -86,7 +86,7 @@ def process_dir_shell_func(): if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then echo "Path [$$dir] is not empty, skipping..." - exit 0 + return 0 fi echo "Current Ownership and Permissions on [$$dir]:" diff --git a/ix-dev/community/audiobookshelf/templates/library/base_v1_1_3/ports.py b/ix-dev/community/audiobookshelf/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/audiobookshelf/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/audiobookshelf/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/audiobookshelf/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/audiobookshelf/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/audiobookshelf/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/audiobookshelf/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/audiobookshelf/templates/library/base_v1_1_3/redis.py b/ix-dev/community/audiobookshelf/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/audiobookshelf/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/audiobookshelf/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/audiobookshelf/templates/library/base_v1_1_3/resources.py b/ix-dev/community/audiobookshelf/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/audiobookshelf/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/audiobookshelf/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/audiobookshelf/templates/library/base_v1_1_3/security.py b/ix-dev/community/audiobookshelf/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/audiobookshelf/templates/library/base_v1_1_3/security.py rename to ix-dev/community/audiobookshelf/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/audiobookshelf/templates/library/base_v1_1_3/storage.py b/ix-dev/community/audiobookshelf/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/audiobookshelf/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/audiobookshelf/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/audiobookshelf/templates/library/base_v1_1_3/utils.py b/ix-dev/community/audiobookshelf/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/audiobookshelf/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/audiobookshelf/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/autobrr/app.yaml b/ix-dev/community/autobrr/app.yaml index 9991351820..e28be7bae6 100644 --- a/ix-dev/community/autobrr/app.yaml +++ b/ix-dev/community/autobrr/app.yaml @@ -10,8 +10,8 @@ keywords: - media - torrent - usenet -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -31,4 +31,4 @@ sources: - https://github.com/autobrr/autobrr title: Autobrr train: community -version: 1.1.13 +version: 1.1.14 diff --git a/ix-dev/community/autobrr/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/autobrr/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/autobrr/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/autobrr/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/autobrr/templates/library/base_v1_1_3/environment.py b/ix-dev/community/autobrr/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/autobrr/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/autobrr/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/autobrr/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/autobrr/templates/library/base_v1_1_4/healthchecks.py similarity index 92% rename from ix-dev/community/autobrr/templates/library/base_v1_1_3/healthchecks.py rename to ix-dev/community/autobrr/templates/library/base_v1_1_4/healthchecks.py index 09f8ac53fd..cc98270d1d 100644 --- a/ix-dev/community/autobrr/templates/library/base_v1_1_3/healthchecks.py +++ b/ix-dev/community/autobrr/templates/library/base_v1_1_4/healthchecks.py @@ -95,10 +95,9 @@ def http_test(port, path, config=None): host = config.get("host", "127.0.0.1") - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa def netcat_test(port, config=None): diff --git a/ix-dev/community/autobrr/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/autobrr/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/autobrr/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/autobrr/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/autobrr/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/autobrr/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/autobrr/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/autobrr/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/autobrr/templates/library/base_v1_1_3/network.py b/ix-dev/community/autobrr/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/autobrr/templates/library/base_v1_1_3/network.py rename to ix-dev/community/autobrr/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/adguard-home/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/autobrr/templates/library/base_v1_1_4/permissions.py similarity index 98% rename from ix-dev/community/adguard-home/templates/library/base_v1_1_3/permissions.py rename to ix-dev/community/autobrr/templates/library/base_v1_1_4/permissions.py index 7d98983af6..1ce6e60ca1 100644 --- a/ix-dev/community/adguard-home/templates/library/base_v1_1_3/permissions.py +++ b/ix-dev/community/autobrr/templates/library/base_v1_1_4/permissions.py @@ -70,12 +70,12 @@ def process_dir_shell_func(): if [ -z "$$dir" ]; then echo "Path is empty, skipping..." - exit 0 + return 0 fi if [ ! -d "$$dir" ]; then echo "Path [$$dir] does is not a directory, skipping..." - exit 0 + return 0 fi if [ "$$is_temporary" = "true" ]; then @@ -86,7 +86,7 @@ def process_dir_shell_func(): if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then echo "Path [$$dir] is not empty, skipping..." - exit 0 + return 0 fi echo "Current Ownership and Permissions on [$$dir]:" diff --git a/ix-dev/community/autobrr/templates/library/base_v1_1_3/ports.py b/ix-dev/community/autobrr/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/autobrr/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/autobrr/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/autobrr/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/autobrr/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/autobrr/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/autobrr/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/autobrr/templates/library/base_v1_1_3/redis.py b/ix-dev/community/autobrr/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/autobrr/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/autobrr/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/autobrr/templates/library/base_v1_1_3/resources.py b/ix-dev/community/autobrr/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/autobrr/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/autobrr/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/autobrr/templates/library/base_v1_1_3/security.py b/ix-dev/community/autobrr/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/autobrr/templates/library/base_v1_1_3/security.py rename to ix-dev/community/autobrr/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/autobrr/templates/library/base_v1_1_3/storage.py b/ix-dev/community/autobrr/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/autobrr/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/autobrr/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/autobrr/templates/library/base_v1_1_3/utils.py b/ix-dev/community/autobrr/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/autobrr/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/autobrr/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/bazarr/app.yaml b/ix-dev/community/bazarr/app.yaml index f4353208c6..4722d7f18c 100644 --- a/ix-dev/community/bazarr/app.yaml +++ b/ix-dev/community/bazarr/app.yaml @@ -10,8 +10,8 @@ icon: https://media.sys.truenas.net/apps/bazarr/icons/icon.png keywords: - media - subtitles -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -31,4 +31,4 @@ sources: - https://github.com/morpheus65535/bazarr title: Bazarr train: community -version: 1.0.21 +version: 1.0.22 diff --git a/ix-dev/community/bazarr/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/bazarr/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/community/bazarr/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/bazarr/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/bazarr/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/community/bazarr/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/community/bazarr/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/bazarr/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/bazarr/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/bazarr/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/bazarr/templates/library/base_v1_1_3/environment.py b/ix-dev/community/bazarr/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/bazarr/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/bazarr/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/bazarr/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/community/bazarr/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/community/bazarr/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/bazarr/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/bazarr/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/bazarr/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/bazarr/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/bazarr/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/bazarr/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/bazarr/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/bazarr/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/bazarr/templates/library/base_v1_1_3/network.py b/ix-dev/community/bazarr/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/bazarr/templates/library/base_v1_1_3/network.py rename to ix-dev/community/bazarr/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/bazarr/templates/library/base_v1_1_4/permissions.py b/ix-dev/community/bazarr/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/community/bazarr/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/community/bazarr/templates/library/base_v1_1_3/ports.py b/ix-dev/community/bazarr/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/bazarr/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/bazarr/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/bazarr/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/bazarr/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/bazarr/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/bazarr/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/bazarr/templates/library/base_v1_1_3/redis.py b/ix-dev/community/bazarr/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/bazarr/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/bazarr/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/bazarr/templates/library/base_v1_1_3/resources.py b/ix-dev/community/bazarr/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/bazarr/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/bazarr/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/bazarr/templates/library/base_v1_1_3/security.py b/ix-dev/community/bazarr/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/bazarr/templates/library/base_v1_1_3/security.py rename to ix-dev/community/bazarr/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/bazarr/templates/library/base_v1_1_3/storage.py b/ix-dev/community/bazarr/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/bazarr/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/bazarr/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/bazarr/templates/library/base_v1_1_3/utils.py b/ix-dev/community/bazarr/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/bazarr/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/bazarr/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/briefkasten/app.yaml b/ix-dev/community/briefkasten/app.yaml index 5019fb0ccd..f53301049c 100644 --- a/ix-dev/community/briefkasten/app.yaml +++ b/ix-dev/community/briefkasten/app.yaml @@ -8,8 +8,8 @@ host_mounts: [] icon: https://media.sys.truenas.net/apps/briefkasten/icons/icon.svg keywords: - bookmark -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -35,4 +35,4 @@ sources: - https://docs.briefkastenhq.com/ title: Briefkasten train: community -version: 1.0.18 +version: 1.0.19 diff --git a/ix-dev/community/briefkasten/templates/docker-compose.yaml b/ix-dev/community/briefkasten/templates/docker-compose.yaml index fc8d71145b..8112d6c2dd 100644 --- a/ix-dev/community/briefkasten/templates/docker-compose.yaml +++ b/ix-dev/community/briefkasten/templates/docker-compose.yaml @@ -117,7 +117,7 @@ services: {% if values.network.dns_opts %} dns_opt: {{ ix_lib.base.network.dns_opts(values.network.dns_opts) | tojson }} {% endif %} - {% set test = ix_lib.base.healthchecks.http_test(port=values.network.web_port, path="/") %} + {% set test = ix_lib.base.healthchecks.tcp_test(port=values.network.web_port) %} healthcheck: {{ ix_lib.base.healthchecks.check_health(test) | tojson }} environment: {{ ix_lib.base.environment.envs(app=app_env, user=values.briefkasten.additional_envs, values=values) | tojson }} ports: diff --git a/ix-dev/community/briefkasten/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/briefkasten/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/community/briefkasten/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/briefkasten/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/briefkasten/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/community/briefkasten/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/community/briefkasten/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/briefkasten/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/briefkasten/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/briefkasten/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/briefkasten/templates/library/base_v1_1_3/environment.py b/ix-dev/community/briefkasten/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/briefkasten/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/briefkasten/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/briefkasten/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/community/briefkasten/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/community/briefkasten/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/briefkasten/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/briefkasten/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/briefkasten/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/briefkasten/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/briefkasten/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/briefkasten/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/briefkasten/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/briefkasten/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/briefkasten/templates/library/base_v1_1_3/network.py b/ix-dev/community/briefkasten/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/briefkasten/templates/library/base_v1_1_3/network.py rename to ix-dev/community/briefkasten/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/briefkasten/templates/library/base_v1_1_4/permissions.py b/ix-dev/community/briefkasten/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/community/briefkasten/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/community/briefkasten/templates/library/base_v1_1_3/ports.py b/ix-dev/community/briefkasten/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/briefkasten/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/briefkasten/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/briefkasten/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/briefkasten/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/briefkasten/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/briefkasten/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/briefkasten/templates/library/base_v1_1_3/redis.py b/ix-dev/community/briefkasten/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/briefkasten/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/briefkasten/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/briefkasten/templates/library/base_v1_1_3/resources.py b/ix-dev/community/briefkasten/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/briefkasten/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/briefkasten/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/briefkasten/templates/library/base_v1_1_3/security.py b/ix-dev/community/briefkasten/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/briefkasten/templates/library/base_v1_1_3/security.py rename to ix-dev/community/briefkasten/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/briefkasten/templates/library/base_v1_1_3/storage.py b/ix-dev/community/briefkasten/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/briefkasten/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/briefkasten/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/briefkasten/templates/library/base_v1_1_3/utils.py b/ix-dev/community/briefkasten/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/briefkasten/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/briefkasten/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/castopod/app.yaml b/ix-dev/community/castopod/app.yaml index 03a7a39ed1..90868bbbcb 100644 --- a/ix-dev/community/castopod/app.yaml +++ b/ix-dev/community/castopod/app.yaml @@ -19,8 +19,8 @@ host_mounts: [] icon: https://media.sys.truenas.net/apps/castopod/icons/icon.svg keywords: - podcast -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -49,4 +49,4 @@ sources: - https://code.castopod.org/adaures/castopod title: Castopod train: community -version: 1.0.8 +version: 1.0.9 diff --git a/ix-dev/community/castopod/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/castopod/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/community/castopod/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/castopod/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/castopod/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/community/castopod/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/community/castopod/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/castopod/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/castopod/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/castopod/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/castopod/templates/library/base_v1_1_3/environment.py b/ix-dev/community/castopod/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/castopod/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/castopod/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/castopod/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/community/castopod/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/community/castopod/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/castopod/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/castopod/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/castopod/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/castopod/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/castopod/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/castopod/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/castopod/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/castopod/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/castopod/templates/library/base_v1_1_3/network.py b/ix-dev/community/castopod/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/castopod/templates/library/base_v1_1_3/network.py rename to ix-dev/community/castopod/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/castopod/templates/library/base_v1_1_4/permissions.py b/ix-dev/community/castopod/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/community/castopod/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/community/castopod/templates/library/base_v1_1_3/ports.py b/ix-dev/community/castopod/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/castopod/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/castopod/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/castopod/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/castopod/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/castopod/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/castopod/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/castopod/templates/library/base_v1_1_3/redis.py b/ix-dev/community/castopod/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/castopod/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/castopod/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/castopod/templates/library/base_v1_1_3/resources.py b/ix-dev/community/castopod/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/castopod/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/castopod/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/castopod/templates/library/base_v1_1_3/security.py b/ix-dev/community/castopod/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/castopod/templates/library/base_v1_1_3/security.py rename to ix-dev/community/castopod/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/castopod/templates/library/base_v1_1_3/storage.py b/ix-dev/community/castopod/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/castopod/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/castopod/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/castopod/templates/library/base_v1_1_3/utils.py b/ix-dev/community/castopod/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/castopod/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/castopod/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/chia/app.yaml b/ix-dev/community/chia/app.yaml index 5745c4f909..fd80fa31d7 100644 --- a/ix-dev/community/chia/app.yaml +++ b/ix-dev/community/chia/app.yaml @@ -11,8 +11,8 @@ keywords: - blockchain - hard-drive - chia -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -30,4 +30,4 @@ sources: - https://www.chia.net/ title: Chia train: community -version: 1.0.14 +version: 1.0.15 diff --git a/ix-dev/community/chia/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/chia/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/community/chia/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/chia/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/chia/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/community/chia/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/community/chia/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/chia/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/chia/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/chia/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/chia/templates/library/base_v1_1_3/environment.py b/ix-dev/community/chia/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/chia/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/chia/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/chia/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/community/chia/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/community/chia/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/chia/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/chia/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/chia/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/chia/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/chia/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/chia/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/chia/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/chia/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/chia/templates/library/base_v1_1_3/network.py b/ix-dev/community/chia/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/chia/templates/library/base_v1_1_3/network.py rename to ix-dev/community/chia/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/chia/templates/library/base_v1_1_4/permissions.py b/ix-dev/community/chia/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/community/chia/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/community/chia/templates/library/base_v1_1_3/ports.py b/ix-dev/community/chia/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/chia/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/chia/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/chia/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/chia/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/chia/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/chia/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/chia/templates/library/base_v1_1_3/redis.py b/ix-dev/community/chia/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/chia/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/chia/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/chia/templates/library/base_v1_1_3/resources.py b/ix-dev/community/chia/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/chia/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/chia/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/chia/templates/library/base_v1_1_3/security.py b/ix-dev/community/chia/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/chia/templates/library/base_v1_1_3/security.py rename to ix-dev/community/chia/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/chia/templates/library/base_v1_1_3/storage.py b/ix-dev/community/chia/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/chia/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/chia/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/chia/templates/library/base_v1_1_3/utils.py b/ix-dev/community/chia/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/chia/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/chia/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/clamav/app.yaml b/ix-dev/community/clamav/app.yaml index 711fe456c1..3aa0d9ea1c 100644 --- a/ix-dev/community/clamav/app.yaml +++ b/ix-dev/community/clamav/app.yaml @@ -19,8 +19,8 @@ icon: https://media.sys.truenas.net/apps/clamav/icons/icon.png keywords: - anti-virus - clamav -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -38,4 +38,4 @@ sources: - https://www.clamav.net/ title: ClamAV train: community -version: 1.1.9 +version: 1.1.10 diff --git a/ix-dev/community/clamav/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/clamav/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/community/clamav/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/clamav/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/clamav/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/community/clamav/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/community/clamav/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/clamav/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/clamav/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/clamav/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/clamav/templates/library/base_v1_1_3/environment.py b/ix-dev/community/clamav/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/clamav/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/clamav/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/clamav/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/community/clamav/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/community/clamav/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/clamav/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/clamav/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/clamav/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/clamav/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/clamav/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/clamav/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/clamav/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/clamav/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/clamav/templates/library/base_v1_1_3/network.py b/ix-dev/community/clamav/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/clamav/templates/library/base_v1_1_3/network.py rename to ix-dev/community/clamav/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/clamav/templates/library/base_v1_1_4/permissions.py b/ix-dev/community/clamav/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/community/clamav/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/community/clamav/templates/library/base_v1_1_3/ports.py b/ix-dev/community/clamav/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/clamav/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/clamav/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/clamav/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/clamav/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/clamav/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/clamav/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/clamav/templates/library/base_v1_1_3/redis.py b/ix-dev/community/clamav/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/clamav/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/clamav/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/clamav/templates/library/base_v1_1_3/resources.py b/ix-dev/community/clamav/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/clamav/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/clamav/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/clamav/templates/library/base_v1_1_3/security.py b/ix-dev/community/clamav/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/clamav/templates/library/base_v1_1_3/security.py rename to ix-dev/community/clamav/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/clamav/templates/library/base_v1_1_3/storage.py b/ix-dev/community/clamav/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/clamav/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/clamav/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/clamav/templates/library/base_v1_1_3/utils.py b/ix-dev/community/clamav/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/clamav/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/clamav/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/cloudflared/app.yaml b/ix-dev/community/cloudflared/app.yaml index b33aa9985f..cd5621b48c 100644 --- a/ix-dev/community/cloudflared/app.yaml +++ b/ix-dev/community/cloudflared/app.yaml @@ -11,8 +11,8 @@ keywords: - network - cloudflare - tunnel -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -30,4 +30,4 @@ sources: - https://hub.docker.com/r/cloudflare/cloudflared title: Cloudflared train: community -version: 1.1.12 +version: 1.1.13 diff --git a/ix-dev/community/cloudflared/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/cloudflared/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/community/cloudflared/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/cloudflared/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/cloudflared/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/community/cloudflared/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/community/cloudflared/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/cloudflared/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/cloudflared/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/cloudflared/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/cloudflared/templates/library/base_v1_1_3/environment.py b/ix-dev/community/cloudflared/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/cloudflared/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/cloudflared/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/cloudflared/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/community/cloudflared/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/community/cloudflared/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/cloudflared/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/cloudflared/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/cloudflared/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/cloudflared/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/cloudflared/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/cloudflared/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/cloudflared/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/cloudflared/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/cloudflared/templates/library/base_v1_1_3/network.py b/ix-dev/community/cloudflared/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/cloudflared/templates/library/base_v1_1_3/network.py rename to ix-dev/community/cloudflared/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/cloudflared/templates/library/base_v1_1_4/permissions.py b/ix-dev/community/cloudflared/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/community/cloudflared/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/community/cloudflared/templates/library/base_v1_1_3/ports.py b/ix-dev/community/cloudflared/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/cloudflared/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/cloudflared/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/cloudflared/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/cloudflared/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/cloudflared/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/cloudflared/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/cloudflared/templates/library/base_v1_1_3/redis.py b/ix-dev/community/cloudflared/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/cloudflared/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/cloudflared/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/cloudflared/templates/library/base_v1_1_3/resources.py b/ix-dev/community/cloudflared/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/cloudflared/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/cloudflared/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/cloudflared/templates/library/base_v1_1_3/security.py b/ix-dev/community/cloudflared/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/cloudflared/templates/library/base_v1_1_3/security.py rename to ix-dev/community/cloudflared/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/cloudflared/templates/library/base_v1_1_3/storage.py b/ix-dev/community/cloudflared/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/cloudflared/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/cloudflared/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/cloudflared/templates/library/base_v1_1_3/utils.py b/ix-dev/community/cloudflared/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/cloudflared/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/cloudflared/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/dashy/app.yaml b/ix-dev/community/dashy/app.yaml index 415005a47c..80164b5ebc 100644 --- a/ix-dev/community/dashy/app.yaml +++ b/ix-dev/community/dashy/app.yaml @@ -8,8 +8,8 @@ host_mounts: [] icon: https://media.sys.truenas.net/apps/dashy/icons/icon.png keywords: - dashboard -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -29,4 +29,4 @@ sources: - https://github.com/lissy93/dashy title: Dashy train: community -version: 1.0.17 +version: 1.0.18 diff --git a/ix-dev/community/dashy/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/dashy/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/community/dashy/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/dashy/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/dashy/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/community/dashy/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/community/dashy/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/dashy/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/dashy/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/dashy/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/dashy/templates/library/base_v1_1_3/environment.py b/ix-dev/community/dashy/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/dashy/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/dashy/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/dashy/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/community/dashy/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/community/dashy/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/dashy/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/dashy/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/dashy/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/dashy/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/dashy/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/dashy/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/dashy/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/dashy/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/dashy/templates/library/base_v1_1_3/network.py b/ix-dev/community/dashy/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/dashy/templates/library/base_v1_1_3/network.py rename to ix-dev/community/dashy/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/dashy/templates/library/base_v1_1_4/permissions.py b/ix-dev/community/dashy/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/community/dashy/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/community/dashy/templates/library/base_v1_1_3/ports.py b/ix-dev/community/dashy/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/dashy/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/dashy/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/dashy/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/dashy/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/dashy/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/dashy/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/dashy/templates/library/base_v1_1_3/redis.py b/ix-dev/community/dashy/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/dashy/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/dashy/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/dashy/templates/library/base_v1_1_3/resources.py b/ix-dev/community/dashy/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/dashy/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/dashy/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/dashy/templates/library/base_v1_1_3/security.py b/ix-dev/community/dashy/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/dashy/templates/library/base_v1_1_3/security.py rename to ix-dev/community/dashy/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/dashy/templates/library/base_v1_1_3/storage.py b/ix-dev/community/dashy/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/dashy/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/dashy/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/dashy/templates/library/base_v1_1_3/utils.py b/ix-dev/community/dashy/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/dashy/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/dashy/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/ddns-updater/app.yaml b/ix-dev/community/ddns-updater/app.yaml index 9abf8bca5d..ebac6cf5f5 100644 --- a/ix-dev/community/ddns-updater/app.yaml +++ b/ix-dev/community/ddns-updater/app.yaml @@ -9,8 +9,8 @@ icon: https://media.sys.truenas.net/apps/ddns-updater/icons/icon.svg keywords: - ddns-updater - ddns -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -30,4 +30,4 @@ sources: - https://hub.docker.com/r/qmcgaw/ddns-updater title: DDNS Updater train: community -version: 1.0.23 +version: 1.0.24 diff --git a/ix-dev/community/ddns-updater/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/ddns-updater/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/community/ddns-updater/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/ddns-updater/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/ddns-updater/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/community/ddns-updater/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/community/ddns-updater/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/ddns-updater/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/ddns-updater/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/ddns-updater/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/ddns-updater/templates/library/base_v1_1_3/environment.py b/ix-dev/community/ddns-updater/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/ddns-updater/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/ddns-updater/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/ddns-updater/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/community/ddns-updater/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/community/ddns-updater/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/ddns-updater/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/ddns-updater/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/ddns-updater/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/ddns-updater/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/ddns-updater/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/ddns-updater/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/ddns-updater/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/ddns-updater/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/ddns-updater/templates/library/base_v1_1_3/network.py b/ix-dev/community/ddns-updater/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/ddns-updater/templates/library/base_v1_1_3/network.py rename to ix-dev/community/ddns-updater/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/ddns-updater/templates/library/base_v1_1_4/permissions.py b/ix-dev/community/ddns-updater/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/community/ddns-updater/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/community/ddns-updater/templates/library/base_v1_1_3/ports.py b/ix-dev/community/ddns-updater/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/ddns-updater/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/ddns-updater/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/ddns-updater/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/ddns-updater/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/ddns-updater/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/ddns-updater/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/ddns-updater/templates/library/base_v1_1_3/redis.py b/ix-dev/community/ddns-updater/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/ddns-updater/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/ddns-updater/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/ddns-updater/templates/library/base_v1_1_3/resources.py b/ix-dev/community/ddns-updater/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/ddns-updater/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/ddns-updater/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/ddns-updater/templates/library/base_v1_1_3/security.py b/ix-dev/community/ddns-updater/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/ddns-updater/templates/library/base_v1_1_3/security.py rename to ix-dev/community/ddns-updater/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/ddns-updater/templates/library/base_v1_1_3/storage.py b/ix-dev/community/ddns-updater/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/ddns-updater/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/ddns-updater/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/ddns-updater/templates/library/base_v1_1_3/utils.py b/ix-dev/community/ddns-updater/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/ddns-updater/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/ddns-updater/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/ddns-updater/templates/library/community/ddns-updater/v1_0_23/__init__.py b/ix-dev/community/ddns-updater/templates/library/community/ddns-updater/v1_0_24/__init__.py similarity index 100% rename from ix-dev/community/ddns-updater/templates/library/community/ddns-updater/v1_0_23/__init__.py rename to ix-dev/community/ddns-updater/templates/library/community/ddns-updater/v1_0_24/__init__.py diff --git a/ix-dev/community/ddns-updater/templates/library/community/ddns-updater/v1_0_23/config.py b/ix-dev/community/ddns-updater/templates/library/community/ddns-updater/v1_0_24/config.py similarity index 99% rename from ix-dev/community/ddns-updater/templates/library/community/ddns-updater/v1_0_23/config.py rename to ix-dev/community/ddns-updater/templates/library/community/ddns-updater/v1_0_24/config.py index b8604baa85..920ddc1042 100644 --- a/ix-dev/community/ddns-updater/templates/library/community/ddns-updater/v1_0_23/config.py +++ b/ix-dev/community/ddns-updater/templates/library/community/ddns-updater/v1_0_24/config.py @@ -1,4 +1,4 @@ -from base_v1_1_3 import utils +from base_v1_1_4 import utils import json valid_ip_dns_providers = [ diff --git a/ix-dev/community/deluge/app.yaml b/ix-dev/community/deluge/app.yaml index 1e01e76ff7..e8d2a2d50a 100644 --- a/ix-dev/community/deluge/app.yaml +++ b/ix-dev/community/deluge/app.yaml @@ -19,8 +19,8 @@ icon: https://media.sys.truenas.net/apps/deluge/icons/icon.png keywords: - torrent - download -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -38,4 +38,4 @@ sources: - https://deluge-torrent.org/ title: Deluge train: community -version: 1.0.17 +version: 1.0.18 diff --git a/ix-dev/community/deluge/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/deluge/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/community/deluge/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/deluge/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/deluge/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/community/deluge/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/community/deluge/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/deluge/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/deluge/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/deluge/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/deluge/templates/library/base_v1_1_3/environment.py b/ix-dev/community/deluge/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/deluge/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/deluge/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/deluge/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/community/deluge/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/community/deluge/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/deluge/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/deluge/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/deluge/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/deluge/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/deluge/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/deluge/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/deluge/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/deluge/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/deluge/templates/library/base_v1_1_3/network.py b/ix-dev/community/deluge/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/deluge/templates/library/base_v1_1_3/network.py rename to ix-dev/community/deluge/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/deluge/templates/library/base_v1_1_4/permissions.py b/ix-dev/community/deluge/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/community/deluge/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/community/deluge/templates/library/base_v1_1_3/ports.py b/ix-dev/community/deluge/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/deluge/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/deluge/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/deluge/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/deluge/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/deluge/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/deluge/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/deluge/templates/library/base_v1_1_3/redis.py b/ix-dev/community/deluge/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/deluge/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/deluge/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/deluge/templates/library/base_v1_1_3/resources.py b/ix-dev/community/deluge/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/deluge/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/deluge/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/deluge/templates/library/base_v1_1_3/security.py b/ix-dev/community/deluge/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/deluge/templates/library/base_v1_1_3/security.py rename to ix-dev/community/deluge/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/deluge/templates/library/base_v1_1_3/storage.py b/ix-dev/community/deluge/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/deluge/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/deluge/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/deluge/templates/library/base_v1_1_3/utils.py b/ix-dev/community/deluge/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/deluge/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/deluge/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/distribution/app.yaml b/ix-dev/community/distribution/app.yaml index 9fbfbd209a..2fd511a576 100644 --- a/ix-dev/community/distribution/app.yaml +++ b/ix-dev/community/distribution/app.yaml @@ -10,8 +10,8 @@ icon: https://media.sys.truenas.net/apps/distribution/icons/icon.svg keywords: - registry - container -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -30,4 +30,4 @@ sources: - https://github.com/distribution/distribution title: Distribution train: community -version: 1.0.18 +version: 1.0.19 diff --git a/ix-dev/community/distribution/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/distribution/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/community/distribution/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/distribution/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/distribution/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/community/distribution/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/community/distribution/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/distribution/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/distribution/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/distribution/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/distribution/templates/library/base_v1_1_3/environment.py b/ix-dev/community/distribution/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/distribution/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/distribution/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/distribution/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/community/distribution/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/community/distribution/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/distribution/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/distribution/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/distribution/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/distribution/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/distribution/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/distribution/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/distribution/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/distribution/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/distribution/templates/library/base_v1_1_3/network.py b/ix-dev/community/distribution/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/distribution/templates/library/base_v1_1_3/network.py rename to ix-dev/community/distribution/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/distribution/templates/library/base_v1_1_4/permissions.py b/ix-dev/community/distribution/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/community/distribution/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/community/distribution/templates/library/base_v1_1_3/ports.py b/ix-dev/community/distribution/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/distribution/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/distribution/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/distribution/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/distribution/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/distribution/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/distribution/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/distribution/templates/library/base_v1_1_3/redis.py b/ix-dev/community/distribution/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/distribution/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/distribution/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/distribution/templates/library/base_v1_1_3/resources.py b/ix-dev/community/distribution/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/distribution/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/distribution/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/distribution/templates/library/base_v1_1_3/security.py b/ix-dev/community/distribution/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/distribution/templates/library/base_v1_1_3/security.py rename to ix-dev/community/distribution/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/distribution/templates/library/base_v1_1_3/storage.py b/ix-dev/community/distribution/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/distribution/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/distribution/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/distribution/templates/library/base_v1_1_3/utils.py b/ix-dev/community/distribution/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/distribution/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/distribution/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/dockge/app.yaml b/ix-dev/community/dockge/app.yaml index 4f4d0e80c8..61008a66d0 100644 --- a/ix-dev/community/dockge/app.yaml +++ b/ix-dev/community/dockge/app.yaml @@ -28,8 +28,8 @@ icon: https://media.sys.truenas.net/apps/dockge/icons/icon.svg keywords: - docker - compose -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -48,4 +48,4 @@ sources: - https://github.com/louislam/dockge title: Dockge train: community -version: 1.0.16 +version: 1.0.17 diff --git a/ix-dev/community/dockge/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/dockge/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/community/dockge/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/dockge/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/dockge/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/community/dockge/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/community/dockge/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/dockge/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/dockge/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/dockge/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/dockge/templates/library/base_v1_1_3/environment.py b/ix-dev/community/dockge/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/dockge/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/dockge/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/dockge/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/community/dockge/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/community/dockge/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/dockge/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/dockge/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/dockge/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/dockge/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/dockge/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/dockge/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/dockge/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/dockge/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/dockge/templates/library/base_v1_1_3/network.py b/ix-dev/community/dockge/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/dockge/templates/library/base_v1_1_3/network.py rename to ix-dev/community/dockge/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/dockge/templates/library/base_v1_1_4/permissions.py b/ix-dev/community/dockge/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/community/dockge/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/community/dockge/templates/library/base_v1_1_3/ports.py b/ix-dev/community/dockge/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/dockge/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/dockge/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/dockge/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/dockge/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/dockge/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/dockge/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/dockge/templates/library/base_v1_1_3/redis.py b/ix-dev/community/dockge/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/dockge/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/dockge/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/dockge/templates/library/base_v1_1_3/resources.py b/ix-dev/community/dockge/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/dockge/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/dockge/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/dockge/templates/library/base_v1_1_3/security.py b/ix-dev/community/dockge/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/dockge/templates/library/base_v1_1_3/security.py rename to ix-dev/community/dockge/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/dockge/templates/library/base_v1_1_3/storage.py b/ix-dev/community/dockge/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/dockge/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/dockge/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/dockge/templates/library/base_v1_1_3/utils.py b/ix-dev/community/dockge/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/dockge/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/dockge/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/drawio/app.yaml b/ix-dev/community/drawio/app.yaml index ec66fe9a80..f5e6766a57 100644 --- a/ix-dev/community/drawio/app.yaml +++ b/ix-dev/community/drawio/app.yaml @@ -9,8 +9,8 @@ icon: https://media.sys.truenas.net/apps/drawio/icons/icon.png keywords: - diagram - whiteboard -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -32,4 +32,4 @@ sources: - https://github.com/jgraph/drawio title: Draw.io train: community -version: 1.1.10 +version: 1.1.11 diff --git a/ix-dev/community/drawio/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/drawio/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/community/drawio/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/drawio/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/drawio/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/community/drawio/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/community/drawio/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/drawio/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/drawio/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/drawio/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/drawio/templates/library/base_v1_1_3/environment.py b/ix-dev/community/drawio/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/drawio/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/drawio/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/drawio/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/community/drawio/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/community/drawio/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/drawio/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/drawio/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/drawio/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/drawio/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/drawio/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/drawio/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/drawio/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/drawio/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/drawio/templates/library/base_v1_1_3/network.py b/ix-dev/community/drawio/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/drawio/templates/library/base_v1_1_3/network.py rename to ix-dev/community/drawio/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/drawio/templates/library/base_v1_1_4/permissions.py b/ix-dev/community/drawio/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/community/drawio/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/community/drawio/templates/library/base_v1_1_3/ports.py b/ix-dev/community/drawio/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/drawio/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/drawio/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/drawio/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/drawio/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/drawio/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/drawio/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/drawio/templates/library/base_v1_1_3/redis.py b/ix-dev/community/drawio/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/drawio/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/drawio/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/drawio/templates/library/base_v1_1_3/resources.py b/ix-dev/community/drawio/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/drawio/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/drawio/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/drawio/templates/library/base_v1_1_3/security.py b/ix-dev/community/drawio/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/drawio/templates/library/base_v1_1_3/security.py rename to ix-dev/community/drawio/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/drawio/templates/library/base_v1_1_3/storage.py b/ix-dev/community/drawio/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/drawio/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/drawio/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/drawio/templates/library/base_v1_1_3/utils.py b/ix-dev/community/drawio/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/drawio/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/drawio/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/filebrowser/app.yaml b/ix-dev/community/filebrowser/app.yaml index b6cdbb495f..ee97400e1e 100644 --- a/ix-dev/community/filebrowser/app.yaml +++ b/ix-dev/community/filebrowser/app.yaml @@ -10,8 +10,8 @@ icon: https://media.sys.truenas.net/apps/filebrowser/icons/icon.png keywords: - files - browser -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -33,4 +33,4 @@ sources: - https://hub.docker.com/r/filebrowser/filebrowser title: File Browser train: community -version: 1.1.10 +version: 1.1.11 diff --git a/ix-dev/community/filebrowser/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/filebrowser/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/community/filebrowser/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/filebrowser/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/filebrowser/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/community/filebrowser/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/community/filebrowser/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/filebrowser/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/filebrowser/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/filebrowser/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/filebrowser/templates/library/base_v1_1_3/environment.py b/ix-dev/community/filebrowser/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/filebrowser/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/filebrowser/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/filebrowser/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/community/filebrowser/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/community/filebrowser/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/filebrowser/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/filebrowser/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/filebrowser/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/filebrowser/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/filebrowser/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/filebrowser/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/filebrowser/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/filebrowser/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/filebrowser/templates/library/base_v1_1_3/network.py b/ix-dev/community/filebrowser/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/filebrowser/templates/library/base_v1_1_3/network.py rename to ix-dev/community/filebrowser/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/filebrowser/templates/library/base_v1_1_4/permissions.py b/ix-dev/community/filebrowser/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/community/filebrowser/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/community/filebrowser/templates/library/base_v1_1_3/ports.py b/ix-dev/community/filebrowser/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/filebrowser/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/filebrowser/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/filebrowser/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/filebrowser/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/filebrowser/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/filebrowser/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/filebrowser/templates/library/base_v1_1_3/redis.py b/ix-dev/community/filebrowser/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/filebrowser/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/filebrowser/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/filebrowser/templates/library/base_v1_1_3/resources.py b/ix-dev/community/filebrowser/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/filebrowser/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/filebrowser/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/filebrowser/templates/library/base_v1_1_3/security.py b/ix-dev/community/filebrowser/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/filebrowser/templates/library/base_v1_1_3/security.py rename to ix-dev/community/filebrowser/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/filebrowser/templates/library/base_v1_1_3/storage.py b/ix-dev/community/filebrowser/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/filebrowser/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/filebrowser/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/filebrowser/templates/library/base_v1_1_3/utils.py b/ix-dev/community/filebrowser/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/filebrowser/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/filebrowser/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/firefly-iii/app.yaml b/ix-dev/community/firefly-iii/app.yaml index 00df3bbb93..28c62c1be3 100644 --- a/ix-dev/community/firefly-iii/app.yaml +++ b/ix-dev/community/firefly-iii/app.yaml @@ -19,8 +19,8 @@ host_mounts: [] icon: https://media.sys.truenas.net/apps/firefly-iii/icons/icon.png keywords: - finance -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -57,4 +57,4 @@ sources: - https://github.com/firefly-iii/firefly-iii title: Firefly III train: community -version: 1.2.17 +version: 1.2.18 diff --git a/ix-dev/community/firefly-iii/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/firefly-iii/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/community/firefly-iii/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/firefly-iii/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/firefly-iii/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/community/firefly-iii/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/community/firefly-iii/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/firefly-iii/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/firefly-iii/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/firefly-iii/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/firefly-iii/templates/library/base_v1_1_3/environment.py b/ix-dev/community/firefly-iii/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/firefly-iii/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/firefly-iii/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/firefly-iii/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/community/firefly-iii/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/community/firefly-iii/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/firefly-iii/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/firefly-iii/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/firefly-iii/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/firefly-iii/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/firefly-iii/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/firefly-iii/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/firefly-iii/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/firefly-iii/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/firefly-iii/templates/library/base_v1_1_3/network.py b/ix-dev/community/firefly-iii/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/firefly-iii/templates/library/base_v1_1_3/network.py rename to ix-dev/community/firefly-iii/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/firefly-iii/templates/library/base_v1_1_4/permissions.py b/ix-dev/community/firefly-iii/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/community/firefly-iii/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/community/firefly-iii/templates/library/base_v1_1_3/ports.py b/ix-dev/community/firefly-iii/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/firefly-iii/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/firefly-iii/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/firefly-iii/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/firefly-iii/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/firefly-iii/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/firefly-iii/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/firefly-iii/templates/library/base_v1_1_3/redis.py b/ix-dev/community/firefly-iii/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/firefly-iii/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/firefly-iii/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/firefly-iii/templates/library/base_v1_1_3/resources.py b/ix-dev/community/firefly-iii/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/firefly-iii/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/firefly-iii/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/firefly-iii/templates/library/base_v1_1_3/security.py b/ix-dev/community/firefly-iii/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/firefly-iii/templates/library/base_v1_1_3/security.py rename to ix-dev/community/firefly-iii/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/firefly-iii/templates/library/base_v1_1_3/storage.py b/ix-dev/community/firefly-iii/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/firefly-iii/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/firefly-iii/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/firefly-iii/templates/library/base_v1_1_3/utils.py b/ix-dev/community/firefly-iii/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/firefly-iii/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/firefly-iii/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/flame/app.yaml b/ix-dev/community/flame/app.yaml index ab38384d71..4230912971 100644 --- a/ix-dev/community/flame/app.yaml +++ b/ix-dev/community/flame/app.yaml @@ -14,8 +14,8 @@ host_mounts: [] icon: https://media.sys.truenas.net/apps/flame/icons/icon.png keywords: - startpage -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -34,4 +34,4 @@ sources: - https://github.com/pawelmalak/flame title: Flame train: community -version: 1.0.18 +version: 1.0.19 diff --git a/ix-dev/community/flame/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/flame/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/community/flame/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/flame/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/flame/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/community/flame/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/community/flame/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/flame/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/flame/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/flame/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/flame/templates/library/base_v1_1_3/environment.py b/ix-dev/community/flame/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/flame/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/flame/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/flame/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/community/flame/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/community/flame/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/flame/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/flame/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/flame/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/flame/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/flame/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/flame/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/flame/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/flame/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/flame/templates/library/base_v1_1_3/network.py b/ix-dev/community/flame/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/flame/templates/library/base_v1_1_3/network.py rename to ix-dev/community/flame/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/flame/templates/library/base_v1_1_4/permissions.py b/ix-dev/community/flame/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/community/flame/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/community/flame/templates/library/base_v1_1_3/ports.py b/ix-dev/community/flame/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/flame/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/flame/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/flame/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/flame/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/flame/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/flame/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/flame/templates/library/base_v1_1_3/redis.py b/ix-dev/community/flame/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/flame/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/flame/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/flame/templates/library/base_v1_1_3/resources.py b/ix-dev/community/flame/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/flame/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/flame/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/flame/templates/library/base_v1_1_3/security.py b/ix-dev/community/flame/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/flame/templates/library/base_v1_1_3/security.py rename to ix-dev/community/flame/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/flame/templates/library/base_v1_1_3/storage.py b/ix-dev/community/flame/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/flame/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/flame/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/flame/templates/library/base_v1_1_3/utils.py b/ix-dev/community/flame/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/flame/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/flame/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/freshrss/app.yaml b/ix-dev/community/freshrss/app.yaml index 2706dd523a..c353f99fe2 100644 --- a/ix-dev/community/freshrss/app.yaml +++ b/ix-dev/community/freshrss/app.yaml @@ -15,8 +15,8 @@ icon: https://media.sys.truenas.net/apps/freshrss/icons/icon.png keywords: - rss - news -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -41,4 +41,4 @@ sources: - https://hub.docker.com/r/freshrss/freshrss title: FreshRSS train: community -version: 1.1.13 +version: 1.1.14 diff --git a/ix-dev/community/freshrss/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/freshrss/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/community/freshrss/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/freshrss/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/freshrss/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/community/freshrss/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/community/freshrss/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/freshrss/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/freshrss/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/freshrss/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/freshrss/templates/library/base_v1_1_3/environment.py b/ix-dev/community/freshrss/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/freshrss/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/freshrss/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/freshrss/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/community/freshrss/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/community/freshrss/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/freshrss/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/freshrss/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/freshrss/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/freshrss/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/freshrss/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/freshrss/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/freshrss/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/freshrss/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/freshrss/templates/library/base_v1_1_3/network.py b/ix-dev/community/freshrss/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/freshrss/templates/library/base_v1_1_3/network.py rename to ix-dev/community/freshrss/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/freshrss/templates/library/base_v1_1_4/permissions.py b/ix-dev/community/freshrss/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/community/freshrss/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/community/freshrss/templates/library/base_v1_1_3/ports.py b/ix-dev/community/freshrss/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/freshrss/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/freshrss/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/freshrss/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/freshrss/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/freshrss/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/freshrss/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/freshrss/templates/library/base_v1_1_3/redis.py b/ix-dev/community/freshrss/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/freshrss/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/freshrss/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/freshrss/templates/library/base_v1_1_3/resources.py b/ix-dev/community/freshrss/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/freshrss/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/freshrss/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/freshrss/templates/library/base_v1_1_3/security.py b/ix-dev/community/freshrss/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/freshrss/templates/library/base_v1_1_3/security.py rename to ix-dev/community/freshrss/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/freshrss/templates/library/base_v1_1_3/storage.py b/ix-dev/community/freshrss/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/freshrss/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/freshrss/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/freshrss/templates/library/base_v1_1_3/utils.py b/ix-dev/community/freshrss/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/freshrss/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/freshrss/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/frigate/app.yaml b/ix-dev/community/frigate/app.yaml index adb619c15b..3d35b79283 100644 --- a/ix-dev/community/frigate/app.yaml +++ b/ix-dev/community/frigate/app.yaml @@ -19,8 +19,8 @@ icon: https://media.sys.truenas.net/apps/frigate/icons/icon.svg keywords: - camera - nvr -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -40,4 +40,4 @@ sources: - https://github.com/blakeblackshear/frigate title: Frigate train: community -version: 1.0.8 +version: 1.0.9 diff --git a/ix-dev/community/frigate/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/frigate/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/community/frigate/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/frigate/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/frigate/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/community/frigate/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/community/frigate/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/frigate/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/frigate/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/frigate/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/frigate/templates/library/base_v1_1_3/environment.py b/ix-dev/community/frigate/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/frigate/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/frigate/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/frigate/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/community/frigate/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/community/frigate/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/frigate/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/frigate/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/frigate/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/frigate/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/frigate/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/frigate/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/frigate/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/frigate/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/frigate/templates/library/base_v1_1_3/network.py b/ix-dev/community/frigate/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/frigate/templates/library/base_v1_1_3/network.py rename to ix-dev/community/frigate/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/frigate/templates/library/base_v1_1_4/permissions.py b/ix-dev/community/frigate/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/community/frigate/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/community/frigate/templates/library/base_v1_1_3/ports.py b/ix-dev/community/frigate/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/frigate/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/frigate/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/frigate/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/frigate/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/frigate/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/frigate/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/frigate/templates/library/base_v1_1_3/redis.py b/ix-dev/community/frigate/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/frigate/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/frigate/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/frigate/templates/library/base_v1_1_3/resources.py b/ix-dev/community/frigate/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/frigate/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/frigate/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/frigate/templates/library/base_v1_1_3/security.py b/ix-dev/community/frigate/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/frigate/templates/library/base_v1_1_3/security.py rename to ix-dev/community/frigate/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/frigate/templates/library/base_v1_1_3/storage.py b/ix-dev/community/frigate/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/frigate/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/frigate/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/frigate/templates/library/base_v1_1_3/utils.py b/ix-dev/community/frigate/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/frigate/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/frigate/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/fscrawler/app.yaml b/ix-dev/community/fscrawler/app.yaml index c2983b6fb4..d8c9ad3d68 100644 --- a/ix-dev/community/fscrawler/app.yaml +++ b/ix-dev/community/fscrawler/app.yaml @@ -10,8 +10,8 @@ icon: https://media.sys.truenas.net/apps/fscrawler/icons/icon.svg keywords: - index - crawler -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -30,4 +30,4 @@ sources: - https://fscrawler.readthedocs.io/ title: FSCrawler train: community -version: 1.0.16 +version: 1.0.17 diff --git a/ix-dev/community/fscrawler/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/fscrawler/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/community/fscrawler/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/fscrawler/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/fscrawler/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/community/fscrawler/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/community/fscrawler/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/fscrawler/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/fscrawler/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/fscrawler/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/fscrawler/templates/library/base_v1_1_3/environment.py b/ix-dev/community/fscrawler/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/fscrawler/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/fscrawler/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/fscrawler/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/community/fscrawler/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/community/fscrawler/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/fscrawler/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/fscrawler/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/fscrawler/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/fscrawler/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/fscrawler/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/fscrawler/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/fscrawler/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/fscrawler/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/fscrawler/templates/library/base_v1_1_3/network.py b/ix-dev/community/fscrawler/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/fscrawler/templates/library/base_v1_1_3/network.py rename to ix-dev/community/fscrawler/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/fscrawler/templates/library/base_v1_1_4/permissions.py b/ix-dev/community/fscrawler/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/community/fscrawler/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/community/fscrawler/templates/library/base_v1_1_3/ports.py b/ix-dev/community/fscrawler/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/fscrawler/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/fscrawler/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/fscrawler/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/fscrawler/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/fscrawler/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/fscrawler/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/fscrawler/templates/library/base_v1_1_3/redis.py b/ix-dev/community/fscrawler/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/fscrawler/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/fscrawler/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/fscrawler/templates/library/base_v1_1_3/resources.py b/ix-dev/community/fscrawler/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/fscrawler/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/fscrawler/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/fscrawler/templates/library/base_v1_1_3/security.py b/ix-dev/community/fscrawler/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/fscrawler/templates/library/base_v1_1_3/security.py rename to ix-dev/community/fscrawler/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/fscrawler/templates/library/base_v1_1_3/storage.py b/ix-dev/community/fscrawler/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/fscrawler/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/fscrawler/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/fscrawler/templates/library/base_v1_1_3/utils.py b/ix-dev/community/fscrawler/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/fscrawler/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/fscrawler/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/gitea/app.yaml b/ix-dev/community/gitea/app.yaml index 728f82649f..8a4d27438a 100644 --- a/ix-dev/community/gitea/app.yaml +++ b/ix-dev/community/gitea/app.yaml @@ -10,8 +10,8 @@ keywords: - git - gitea - source control -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -33,4 +33,4 @@ sources: - https://docs.gitea.io/en-us/install-with-docker-rootless title: Gitea train: community -version: 1.0.11 +version: 1.0.12 diff --git a/ix-dev/community/gitea/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/gitea/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/community/gitea/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/gitea/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/gitea/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/community/gitea/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/community/gitea/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/gitea/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/gitea/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/gitea/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/gitea/templates/library/base_v1_1_3/environment.py b/ix-dev/community/gitea/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/gitea/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/gitea/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/gitea/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/community/gitea/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/community/gitea/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/gitea/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/gitea/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/gitea/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/gitea/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/gitea/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/gitea/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/gitea/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/gitea/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/gitea/templates/library/base_v1_1_3/network.py b/ix-dev/community/gitea/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/gitea/templates/library/base_v1_1_3/network.py rename to ix-dev/community/gitea/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/gitea/templates/library/base_v1_1_4/permissions.py b/ix-dev/community/gitea/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/community/gitea/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/community/gitea/templates/library/base_v1_1_3/ports.py b/ix-dev/community/gitea/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/gitea/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/gitea/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/gitea/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/gitea/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/gitea/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/gitea/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/gitea/templates/library/base_v1_1_3/redis.py b/ix-dev/community/gitea/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/gitea/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/gitea/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/gitea/templates/library/base_v1_1_3/resources.py b/ix-dev/community/gitea/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/gitea/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/gitea/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/gitea/templates/library/base_v1_1_3/security.py b/ix-dev/community/gitea/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/gitea/templates/library/base_v1_1_3/security.py rename to ix-dev/community/gitea/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/gitea/templates/library/base_v1_1_3/storage.py b/ix-dev/community/gitea/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/gitea/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/gitea/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/gitea/templates/library/base_v1_1_3/utils.py b/ix-dev/community/gitea/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/gitea/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/gitea/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/grafana/app.yaml b/ix-dev/community/grafana/app.yaml index 6edbc2a7cc..5ab05d1991 100644 --- a/ix-dev/community/grafana/app.yaml +++ b/ix-dev/community/grafana/app.yaml @@ -12,8 +12,8 @@ keywords: - monitoring - metrics - dashboards -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -34,4 +34,4 @@ sources: - https://github.com/grafana title: Grafana train: community -version: 1.1.11 +version: 1.1.12 diff --git a/ix-dev/community/grafana/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/grafana/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/community/grafana/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/grafana/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/grafana/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/community/grafana/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/community/grafana/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/grafana/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/grafana/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/grafana/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/grafana/templates/library/base_v1_1_3/environment.py b/ix-dev/community/grafana/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/grafana/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/grafana/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/grafana/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/community/grafana/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/community/grafana/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/grafana/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/grafana/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/grafana/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/grafana/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/grafana/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/grafana/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/grafana/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/grafana/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/grafana/templates/library/base_v1_1_3/network.py b/ix-dev/community/grafana/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/grafana/templates/library/base_v1_1_3/network.py rename to ix-dev/community/grafana/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/grafana/templates/library/base_v1_1_4/permissions.py b/ix-dev/community/grafana/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/community/grafana/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/community/grafana/templates/library/base_v1_1_3/ports.py b/ix-dev/community/grafana/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/grafana/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/grafana/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/grafana/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/grafana/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/grafana/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/grafana/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/grafana/templates/library/base_v1_1_3/redis.py b/ix-dev/community/grafana/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/grafana/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/grafana/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/grafana/templates/library/base_v1_1_3/resources.py b/ix-dev/community/grafana/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/grafana/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/grafana/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/grafana/templates/library/base_v1_1_3/security.py b/ix-dev/community/grafana/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/grafana/templates/library/base_v1_1_3/security.py rename to ix-dev/community/grafana/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/grafana/templates/library/base_v1_1_3/storage.py b/ix-dev/community/grafana/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/grafana/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/grafana/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/grafana/templates/library/base_v1_1_3/utils.py b/ix-dev/community/grafana/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/grafana/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/grafana/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/handbrake/app.yaml b/ix-dev/community/handbrake/app.yaml index bb744bb970..cb50af49fe 100644 --- a/ix-dev/community/handbrake/app.yaml +++ b/ix-dev/community/handbrake/app.yaml @@ -28,8 +28,8 @@ keywords: - media - video - transcoder -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -47,4 +47,4 @@ sources: - https://hub.docker.com/r/jlesage/handbrake title: Handbrake train: community -version: 2.0.10 +version: 2.0.11 diff --git a/ix-dev/community/handbrake/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/handbrake/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/community/handbrake/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/handbrake/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/handbrake/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/community/handbrake/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/community/handbrake/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/handbrake/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/handbrake/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/handbrake/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/handbrake/templates/library/base_v1_1_3/environment.py b/ix-dev/community/handbrake/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/handbrake/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/handbrake/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/handbrake/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/community/handbrake/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/community/handbrake/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/handbrake/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/handbrake/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/handbrake/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/handbrake/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/handbrake/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/handbrake/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/handbrake/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/handbrake/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/handbrake/templates/library/base_v1_1_3/network.py b/ix-dev/community/handbrake/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/handbrake/templates/library/base_v1_1_3/network.py rename to ix-dev/community/handbrake/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/handbrake/templates/library/base_v1_1_4/permissions.py b/ix-dev/community/handbrake/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/community/handbrake/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/community/handbrake/templates/library/base_v1_1_3/ports.py b/ix-dev/community/handbrake/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/handbrake/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/handbrake/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/handbrake/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/handbrake/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/handbrake/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/handbrake/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/handbrake/templates/library/base_v1_1_3/redis.py b/ix-dev/community/handbrake/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/handbrake/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/handbrake/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/handbrake/templates/library/base_v1_1_3/resources.py b/ix-dev/community/handbrake/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/handbrake/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/handbrake/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/handbrake/templates/library/base_v1_1_3/security.py b/ix-dev/community/handbrake/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/handbrake/templates/library/base_v1_1_3/security.py rename to ix-dev/community/handbrake/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/handbrake/templates/library/base_v1_1_3/storage.py b/ix-dev/community/handbrake/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/handbrake/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/handbrake/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/handbrake/templates/library/base_v1_1_3/utils.py b/ix-dev/community/handbrake/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/handbrake/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/handbrake/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/homarr/app.yaml b/ix-dev/community/homarr/app.yaml index d6d852e766..6469358b63 100644 --- a/ix-dev/community/homarr/app.yaml +++ b/ix-dev/community/homarr/app.yaml @@ -9,8 +9,8 @@ host_mounts: [] icon: https://media.sys.truenas.net/apps/homarr/icons/icon.svg keywords: - dashboard -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -31,4 +31,4 @@ sources: - https://github.com/ajnart/homarr title: Homarr train: community -version: 1.0.18 +version: 1.0.19 diff --git a/ix-dev/community/homarr/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/homarr/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/community/homarr/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/homarr/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/homarr/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/community/homarr/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/community/homarr/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/homarr/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/homarr/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/homarr/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/homarr/templates/library/base_v1_1_3/environment.py b/ix-dev/community/homarr/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/homarr/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/homarr/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/homarr/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/community/homarr/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/community/homarr/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/homarr/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/homarr/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/homarr/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/homarr/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/homarr/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/homarr/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/homarr/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/homarr/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/homarr/templates/library/base_v1_1_3/network.py b/ix-dev/community/homarr/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/homarr/templates/library/base_v1_1_3/network.py rename to ix-dev/community/homarr/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/homarr/templates/library/base_v1_1_4/permissions.py b/ix-dev/community/homarr/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/community/homarr/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/community/homarr/templates/library/base_v1_1_3/ports.py b/ix-dev/community/homarr/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/homarr/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/homarr/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/homarr/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/homarr/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/homarr/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/homarr/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/homarr/templates/library/base_v1_1_3/redis.py b/ix-dev/community/homarr/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/homarr/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/homarr/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/homarr/templates/library/base_v1_1_3/resources.py b/ix-dev/community/homarr/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/homarr/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/homarr/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/homarr/templates/library/base_v1_1_3/security.py b/ix-dev/community/homarr/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/homarr/templates/library/base_v1_1_3/security.py rename to ix-dev/community/homarr/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/homarr/templates/library/base_v1_1_3/storage.py b/ix-dev/community/homarr/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/homarr/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/homarr/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/homarr/templates/library/base_v1_1_3/utils.py b/ix-dev/community/homarr/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/homarr/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/homarr/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/homepage/app.yaml b/ix-dev/community/homepage/app.yaml index 31c7e210f6..adde8e9804 100644 --- a/ix-dev/community/homepage/app.yaml +++ b/ix-dev/community/homepage/app.yaml @@ -8,8 +8,8 @@ host_mounts: [] icon: https://media.sys.truenas.net/apps/homepage/icons/icon.png keywords: - dashboard -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -33,4 +33,4 @@ sources: - https://github.com/benphelps/homepage title: Homepage train: community -version: 1.0.21 +version: 1.0.22 diff --git a/ix-dev/community/homepage/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/homepage/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/community/homepage/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/homepage/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/homepage/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/community/homepage/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/community/homepage/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/homepage/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/homepage/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/homepage/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/homepage/templates/library/base_v1_1_3/environment.py b/ix-dev/community/homepage/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/homepage/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/homepage/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/homepage/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/community/homepage/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/community/homepage/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/homepage/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/homepage/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/homepage/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/homepage/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/homepage/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/homepage/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/homepage/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/homepage/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/homepage/templates/library/base_v1_1_3/network.py b/ix-dev/community/homepage/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/homepage/templates/library/base_v1_1_3/network.py rename to ix-dev/community/homepage/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/homepage/templates/library/base_v1_1_4/permissions.py b/ix-dev/community/homepage/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/community/homepage/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/community/homepage/templates/library/base_v1_1_3/ports.py b/ix-dev/community/homepage/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/homepage/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/homepage/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/homepage/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/homepage/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/homepage/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/homepage/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/homepage/templates/library/base_v1_1_3/redis.py b/ix-dev/community/homepage/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/homepage/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/homepage/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/homepage/templates/library/base_v1_1_3/resources.py b/ix-dev/community/homepage/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/homepage/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/homepage/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/homepage/templates/library/base_v1_1_3/security.py b/ix-dev/community/homepage/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/homepage/templates/library/base_v1_1_3/security.py rename to ix-dev/community/homepage/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/homepage/templates/library/base_v1_1_3/storage.py b/ix-dev/community/homepage/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/homepage/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/homepage/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/homepage/templates/library/base_v1_1_3/utils.py b/ix-dev/community/homepage/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/homepage/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/homepage/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/homer/app.yaml b/ix-dev/community/homer/app.yaml index dcf36ff607..8f0f7dae82 100644 --- a/ix-dev/community/homer/app.yaml +++ b/ix-dev/community/homer/app.yaml @@ -7,8 +7,8 @@ description: Homer is a dead simple static HOMepage for your servER to keep your home: https://github.com/bastienwirtz/homer host_mounts: [] icon: https://media.sys.truenas.net/apps/homer/icons/icon.png -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -30,4 +30,4 @@ tags: - homepage title: Homer train: community -version: 2.0.9 +version: 2.0.10 diff --git a/ix-dev/community/homer/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/homer/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/community/homer/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/homer/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/homer/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/community/homer/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/community/homer/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/homer/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/homer/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/homer/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/homer/templates/library/base_v1_1_3/environment.py b/ix-dev/community/homer/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/homer/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/homer/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/homer/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/community/homer/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/community/homer/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/homer/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/homer/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/homer/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/homer/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/homer/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/homer/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/homer/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/homer/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/homer/templates/library/base_v1_1_3/network.py b/ix-dev/community/homer/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/homer/templates/library/base_v1_1_3/network.py rename to ix-dev/community/homer/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/homer/templates/library/base_v1_1_4/permissions.py b/ix-dev/community/homer/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/community/homer/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/community/homer/templates/library/base_v1_1_3/ports.py b/ix-dev/community/homer/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/homer/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/homer/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/homer/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/homer/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/homer/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/homer/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/homer/templates/library/base_v1_1_3/redis.py b/ix-dev/community/homer/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/homer/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/homer/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/homer/templates/library/base_v1_1_3/resources.py b/ix-dev/community/homer/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/homer/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/homer/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/homer/templates/library/base_v1_1_3/security.py b/ix-dev/community/homer/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/homer/templates/library/base_v1_1_3/security.py rename to ix-dev/community/homer/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/homer/templates/library/base_v1_1_3/storage.py b/ix-dev/community/homer/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/homer/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/homer/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/homer/templates/library/base_v1_1_3/utils.py b/ix-dev/community/homer/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/homer/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/homer/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/immich/app.yaml b/ix-dev/community/immich/app.yaml index 14c6ac14ed..24c6bc2296 100644 --- a/ix-dev/community/immich/app.yaml +++ b/ix-dev/community/immich/app.yaml @@ -16,8 +16,8 @@ icon: https://media.sys.truenas.net/apps/immich/icons/icon.svg keywords: - photos - backup -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -45,4 +45,4 @@ sources: - https://github.com/immich-app/immich title: Immich train: community -version: 1.6.18 +version: 1.6.19 diff --git a/ix-dev/community/immich/templates/docker-compose.yaml b/ix-dev/community/immich/templates/docker-compose.yaml index 1fd39ed660..a07a201384 100644 --- a/ix-dev/community/immich/templates/docker-compose.yaml +++ b/ix-dev/community/immich/templates/docker-compose.yaml @@ -95,7 +95,7 @@ services: {% if values.network.dns_opts %} dns_opt: {{ ix_lib.base.network.dns_opts(values.network.dns_opts) | tojson }} {% endif %} - {% set test = ix_lib.base.healthchecks.http_test(port=values.network.web_port, path="/api/server/ping") %} + {% set test = "/usr/src/app/bin/immich-healthcheck" %} healthcheck: {{ ix_lib.base.healthchecks.check_health(test) | tojson }} {% set server_app_env = { "NODE_ENV": "production", @@ -168,7 +168,7 @@ services: {% if values.network.dns_opts %} dns_opt: {{ ix_lib.base.network.dns_opts(values.network.dns_opts) | tojson }} {% endif %} - {% set test = ix_lib.base.healthchecks.http_test(port=values.consts.ml_port, path="/ping") %} + {% set test = "python3 /usr/src/app/healthcheck.py" %} healthcheck: {{ ix_lib.base.healthchecks.check_health(test) | tojson }} {% set ml_app_env = { "NODE_ENV": "production", diff --git a/ix-dev/community/immich/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/immich/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/community/immich/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/immich/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/immich/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/community/immich/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/community/immich/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/immich/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/immich/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/immich/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/immich/templates/library/base_v1_1_3/environment.py b/ix-dev/community/immich/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/immich/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/immich/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/immich/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/community/immich/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/community/immich/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/immich/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/immich/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/immich/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/immich/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/immich/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/immich/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/immich/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/immich/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/immich/templates/library/base_v1_1_3/network.py b/ix-dev/community/immich/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/immich/templates/library/base_v1_1_3/network.py rename to ix-dev/community/immich/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/immich/templates/library/base_v1_1_4/permissions.py b/ix-dev/community/immich/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/community/immich/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/community/immich/templates/library/base_v1_1_3/ports.py b/ix-dev/community/immich/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/immich/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/immich/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/immich/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/immich/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/immich/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/immich/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/immich/templates/library/base_v1_1_3/redis.py b/ix-dev/community/immich/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/immich/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/immich/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/immich/templates/library/base_v1_1_3/resources.py b/ix-dev/community/immich/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/immich/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/immich/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/immich/templates/library/base_v1_1_3/security.py b/ix-dev/community/immich/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/immich/templates/library/base_v1_1_3/security.py rename to ix-dev/community/immich/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/immich/templates/library/base_v1_1_3/storage.py b/ix-dev/community/immich/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/immich/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/immich/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/immich/templates/library/base_v1_1_3/utils.py b/ix-dev/community/immich/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/immich/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/immich/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/invidious/app.yaml b/ix-dev/community/invidious/app.yaml index b337f0b7b1..0d9f2e3cbc 100644 --- a/ix-dev/community/invidious/app.yaml +++ b/ix-dev/community/invidious/app.yaml @@ -8,8 +8,8 @@ host_mounts: [] icon: https://media.sys.truenas.net/apps/invidious/icons/icon.svg keywords: - youtube -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -38,4 +38,4 @@ sources: - https://quay.io/repository/invidious title: Invidious train: community -version: 1.0.10 +version: 1.0.11 diff --git a/ix-dev/community/invidious/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/invidious/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/community/invidious/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/invidious/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/invidious/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/community/invidious/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/community/invidious/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/invidious/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/invidious/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/invidious/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/invidious/templates/library/base_v1_1_3/environment.py b/ix-dev/community/invidious/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/invidious/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/invidious/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/invidious/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/community/invidious/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/community/invidious/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/invidious/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/invidious/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/invidious/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/invidious/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/invidious/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/invidious/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/invidious/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/invidious/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/invidious/templates/library/base_v1_1_3/network.py b/ix-dev/community/invidious/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/invidious/templates/library/base_v1_1_3/network.py rename to ix-dev/community/invidious/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/invidious/templates/library/base_v1_1_4/permissions.py b/ix-dev/community/invidious/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/community/invidious/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/community/invidious/templates/library/base_v1_1_3/ports.py b/ix-dev/community/invidious/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/invidious/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/invidious/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/invidious/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/invidious/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/invidious/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/invidious/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/invidious/templates/library/base_v1_1_3/redis.py b/ix-dev/community/invidious/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/invidious/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/invidious/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/invidious/templates/library/base_v1_1_3/resources.py b/ix-dev/community/invidious/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/invidious/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/invidious/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/invidious/templates/library/base_v1_1_3/security.py b/ix-dev/community/invidious/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/invidious/templates/library/base_v1_1_3/security.py rename to ix-dev/community/invidious/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/invidious/templates/library/base_v1_1_3/storage.py b/ix-dev/community/invidious/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/invidious/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/invidious/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/invidious/templates/library/base_v1_1_3/utils.py b/ix-dev/community/invidious/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/invidious/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/invidious/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/ipfs/app.yaml b/ix-dev/community/ipfs/app.yaml index a1ac209cdc..d05581545b 100644 --- a/ix-dev/community/ipfs/app.yaml +++ b/ix-dev/community/ipfs/app.yaml @@ -12,8 +12,8 @@ keywords: - ipfs - file-sharing - kubo -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -33,4 +33,4 @@ sources: - https://ipfs.tech/ title: IPFS train: community -version: 1.0.18 +version: 1.0.19 diff --git a/ix-dev/community/ipfs/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/ipfs/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/community/ipfs/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/ipfs/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/ipfs/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/community/ipfs/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/community/ipfs/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/ipfs/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/ipfs/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/ipfs/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/ipfs/templates/library/base_v1_1_3/environment.py b/ix-dev/community/ipfs/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/ipfs/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/ipfs/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/ipfs/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/community/ipfs/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/community/ipfs/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/ipfs/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/ipfs/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/ipfs/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/ipfs/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/ipfs/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/ipfs/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/ipfs/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/ipfs/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/ipfs/templates/library/base_v1_1_3/network.py b/ix-dev/community/ipfs/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/ipfs/templates/library/base_v1_1_3/network.py rename to ix-dev/community/ipfs/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/ipfs/templates/library/base_v1_1_4/permissions.py b/ix-dev/community/ipfs/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/community/ipfs/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/community/ipfs/templates/library/base_v1_1_3/ports.py b/ix-dev/community/ipfs/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/ipfs/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/ipfs/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/ipfs/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/ipfs/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/ipfs/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/ipfs/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/ipfs/templates/library/base_v1_1_3/redis.py b/ix-dev/community/ipfs/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/ipfs/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/ipfs/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/ipfs/templates/library/base_v1_1_3/resources.py b/ix-dev/community/ipfs/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/ipfs/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/ipfs/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/ipfs/templates/library/base_v1_1_3/security.py b/ix-dev/community/ipfs/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/ipfs/templates/library/base_v1_1_3/security.py rename to ix-dev/community/ipfs/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/ipfs/templates/library/base_v1_1_3/storage.py b/ix-dev/community/ipfs/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/ipfs/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/ipfs/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/ipfs/templates/library/base_v1_1_3/utils.py b/ix-dev/community/ipfs/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/ipfs/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/ipfs/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/jellyfin/app.yaml b/ix-dev/community/jellyfin/app.yaml index f5df83b789..6a86ef9e03 100644 --- a/ix-dev/community/jellyfin/app.yaml +++ b/ix-dev/community/jellyfin/app.yaml @@ -14,8 +14,8 @@ keywords: - tv - media - streaming -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -35,4 +35,4 @@ sources: - https://jellyfin.org/ title: Jellyfin train: community -version: 1.0.24 +version: 1.0.25 diff --git a/ix-dev/community/jellyfin/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/jellyfin/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/community/jellyfin/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/jellyfin/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/jellyfin/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/community/jellyfin/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/community/jellyfin/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/jellyfin/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/jellyfin/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/jellyfin/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/jellyfin/templates/library/base_v1_1_3/environment.py b/ix-dev/community/jellyfin/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/jellyfin/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/jellyfin/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/jellyfin/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/community/jellyfin/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/community/jellyfin/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/jellyfin/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/jellyfin/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/jellyfin/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/jellyfin/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/jellyfin/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/jellyfin/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/jellyfin/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/jellyfin/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/jellyfin/templates/library/base_v1_1_3/network.py b/ix-dev/community/jellyfin/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/jellyfin/templates/library/base_v1_1_3/network.py rename to ix-dev/community/jellyfin/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/jellyfin/templates/library/base_v1_1_4/permissions.py b/ix-dev/community/jellyfin/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/community/jellyfin/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/community/jellyfin/templates/library/base_v1_1_3/ports.py b/ix-dev/community/jellyfin/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/jellyfin/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/jellyfin/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/jellyfin/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/jellyfin/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/jellyfin/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/jellyfin/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/jellyfin/templates/library/base_v1_1_3/redis.py b/ix-dev/community/jellyfin/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/jellyfin/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/jellyfin/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/jellyfin/templates/library/base_v1_1_3/resources.py b/ix-dev/community/jellyfin/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/jellyfin/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/jellyfin/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/jellyfin/templates/library/base_v1_1_3/security.py b/ix-dev/community/jellyfin/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/jellyfin/templates/library/base_v1_1_3/security.py rename to ix-dev/community/jellyfin/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/jellyfin/templates/library/base_v1_1_3/storage.py b/ix-dev/community/jellyfin/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/jellyfin/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/jellyfin/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/jellyfin/templates/library/base_v1_1_3/utils.py b/ix-dev/community/jellyfin/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/jellyfin/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/jellyfin/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/jellyseerr/app.yaml b/ix-dev/community/jellyseerr/app.yaml index 0072587ff4..cf47b1f917 100644 --- a/ix-dev/community/jellyseerr/app.yaml +++ b/ix-dev/community/jellyseerr/app.yaml @@ -9,8 +9,8 @@ host_mounts: [] icon: https://media.sys.truenas.net/apps/jellyseerr/icons/icon.svg keywords: - media -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -29,4 +29,4 @@ sources: - https://hub.docker.com/r/fallenbagel/jellyseerr title: Jellyseerr train: community -version: 1.0.18 +version: 1.0.19 diff --git a/ix-dev/community/jellyseerr/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/jellyseerr/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/community/jellyseerr/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/jellyseerr/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/jellyseerr/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/community/jellyseerr/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/community/jellyseerr/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/jellyseerr/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/jellyseerr/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/jellyseerr/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/jellyseerr/templates/library/base_v1_1_3/environment.py b/ix-dev/community/jellyseerr/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/jellyseerr/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/jellyseerr/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/jellyseerr/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/community/jellyseerr/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/community/jellyseerr/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/jellyseerr/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/jellyseerr/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/jellyseerr/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/jellyseerr/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/jellyseerr/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/jellyseerr/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/jellyseerr/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/jellyseerr/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/jellyseerr/templates/library/base_v1_1_3/network.py b/ix-dev/community/jellyseerr/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/jellyseerr/templates/library/base_v1_1_3/network.py rename to ix-dev/community/jellyseerr/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/jellyseerr/templates/library/base_v1_1_4/permissions.py b/ix-dev/community/jellyseerr/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/community/jellyseerr/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/community/jellyseerr/templates/library/base_v1_1_3/ports.py b/ix-dev/community/jellyseerr/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/jellyseerr/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/jellyseerr/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/jellyseerr/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/jellyseerr/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/jellyseerr/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/jellyseerr/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/jellyseerr/templates/library/base_v1_1_3/redis.py b/ix-dev/community/jellyseerr/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/jellyseerr/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/jellyseerr/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/jellyseerr/templates/library/base_v1_1_3/resources.py b/ix-dev/community/jellyseerr/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/jellyseerr/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/jellyseerr/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/jellyseerr/templates/library/base_v1_1_3/security.py b/ix-dev/community/jellyseerr/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/jellyseerr/templates/library/base_v1_1_3/security.py rename to ix-dev/community/jellyseerr/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/jellyseerr/templates/library/base_v1_1_3/storage.py b/ix-dev/community/jellyseerr/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/jellyseerr/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/jellyseerr/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/jellyseerr/templates/library/base_v1_1_3/utils.py b/ix-dev/community/jellyseerr/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/jellyseerr/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/jellyseerr/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/jenkins/app.yaml b/ix-dev/community/jenkins/app.yaml index b6160ec74d..8646058047 100644 --- a/ix-dev/community/jenkins/app.yaml +++ b/ix-dev/community/jenkins/app.yaml @@ -9,8 +9,8 @@ icon: https://media.sys.truenas.net/apps/jenkins/icons/icon.svg keywords: - automation - ci/cd -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -31,4 +31,4 @@ sources: - https://www.jenkins.io/ title: Jenkins train: community -version: 1.0.12 +version: 1.0.13 diff --git a/ix-dev/community/jenkins/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/jenkins/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/community/jenkins/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/jenkins/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/jenkins/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/community/jenkins/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/community/jenkins/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/jenkins/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/jenkins/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/jenkins/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/jenkins/templates/library/base_v1_1_3/environment.py b/ix-dev/community/jenkins/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/jenkins/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/jenkins/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/jenkins/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/community/jenkins/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/community/jenkins/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/jenkins/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/jenkins/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/jenkins/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/jenkins/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/jenkins/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/jenkins/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/jenkins/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/jenkins/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/jenkins/templates/library/base_v1_1_3/network.py b/ix-dev/community/jenkins/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/jenkins/templates/library/base_v1_1_3/network.py rename to ix-dev/community/jenkins/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/jenkins/templates/library/base_v1_1_4/permissions.py b/ix-dev/community/jenkins/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/community/jenkins/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/community/jenkins/templates/library/base_v1_1_3/ports.py b/ix-dev/community/jenkins/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/jenkins/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/jenkins/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/jenkins/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/jenkins/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/jenkins/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/jenkins/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/jenkins/templates/library/base_v1_1_3/redis.py b/ix-dev/community/jenkins/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/jenkins/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/jenkins/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/jenkins/templates/library/base_v1_1_3/resources.py b/ix-dev/community/jenkins/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/jenkins/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/jenkins/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/jenkins/templates/library/base_v1_1_3/security.py b/ix-dev/community/jenkins/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/jenkins/templates/library/base_v1_1_3/security.py rename to ix-dev/community/jenkins/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/jenkins/templates/library/base_v1_1_3/storage.py b/ix-dev/community/jenkins/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/jenkins/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/jenkins/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/jenkins/templates/library/base_v1_1_3/utils.py b/ix-dev/community/jenkins/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/jenkins/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/jenkins/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/joplin/app.yaml b/ix-dev/community/joplin/app.yaml index 81e170dc1a..b5d5ec75a9 100644 --- a/ix-dev/community/joplin/app.yaml +++ b/ix-dev/community/joplin/app.yaml @@ -9,8 +9,8 @@ host_mounts: [] icon: https://media.sys.truenas.net/apps/joplin/icons/icon.png keywords: - notes -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -36,4 +36,4 @@ sources: - https://hub.docker.com/r/joplin/server/ title: Joplin train: community -version: 1.1.10 +version: 1.1.11 diff --git a/ix-dev/community/joplin/templates/docker-compose.yaml b/ix-dev/community/joplin/templates/docker-compose.yaml index ff39595846..a7c61afdd6 100644 --- a/ix-dev/community/joplin/templates/docker-compose.yaml +++ b/ix-dev/community/joplin/templates/docker-compose.yaml @@ -58,7 +58,7 @@ services: {% if values.network.dns_opts %} dns_opt: {{ ix_lib.base.network.dns_opts(values.network.dns_opts) | tojson }} {% endif %} - {% set test = ix_lib.base.healthchecks.http_test(port=values.network.web_port, path="/api/ping") %} + {% set test = ix_lib.base.healthchecks.tcp_test(port=values.network.web_port) %} healthcheck: {{ ix_lib.base.healthchecks.check_health(test) | tojson }} environment: {{ ix_lib.base.environment.envs(app={ "APP_PORT": values.network.web_port, diff --git a/ix-dev/community/joplin/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/joplin/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/community/joplin/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/joplin/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/joplin/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/community/joplin/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/community/joplin/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/joplin/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/joplin/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/joplin/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/joplin/templates/library/base_v1_1_3/environment.py b/ix-dev/community/joplin/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/joplin/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/joplin/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/joplin/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/community/joplin/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/community/joplin/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/joplin/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/joplin/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/joplin/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/joplin/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/joplin/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/joplin/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/joplin/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/joplin/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/joplin/templates/library/base_v1_1_3/network.py b/ix-dev/community/joplin/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/joplin/templates/library/base_v1_1_3/network.py rename to ix-dev/community/joplin/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/joplin/templates/library/base_v1_1_4/permissions.py b/ix-dev/community/joplin/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/community/joplin/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/community/joplin/templates/library/base_v1_1_3/ports.py b/ix-dev/community/joplin/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/joplin/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/joplin/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/joplin/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/joplin/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/joplin/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/joplin/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/joplin/templates/library/base_v1_1_3/redis.py b/ix-dev/community/joplin/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/joplin/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/joplin/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/joplin/templates/library/base_v1_1_3/resources.py b/ix-dev/community/joplin/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/joplin/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/joplin/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/joplin/templates/library/base_v1_1_3/security.py b/ix-dev/community/joplin/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/joplin/templates/library/base_v1_1_3/security.py rename to ix-dev/community/joplin/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/joplin/templates/library/base_v1_1_3/storage.py b/ix-dev/community/joplin/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/joplin/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/joplin/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/joplin/templates/library/base_v1_1_3/utils.py b/ix-dev/community/joplin/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/joplin/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/joplin/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/kapowarr/app.yaml b/ix-dev/community/kapowarr/app.yaml index fbdb0379c7..bbeb5c3bc4 100644 --- a/ix-dev/community/kapowarr/app.yaml +++ b/ix-dev/community/kapowarr/app.yaml @@ -10,8 +10,8 @@ icon: https://media.sys.truenas.net/apps/kapowarr/icons/icon.svg keywords: - comic - media -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -31,4 +31,4 @@ sources: - https://github.com/Casvt/Kapowarr title: Kapowarr train: community -version: 1.0.18 +version: 1.0.19 diff --git a/ix-dev/community/kapowarr/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/kapowarr/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/community/kapowarr/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/kapowarr/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/kapowarr/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/community/kapowarr/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/community/kapowarr/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/kapowarr/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/kapowarr/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/kapowarr/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/kapowarr/templates/library/base_v1_1_3/environment.py b/ix-dev/community/kapowarr/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/kapowarr/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/kapowarr/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/kapowarr/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/community/kapowarr/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/community/kapowarr/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/kapowarr/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/kapowarr/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/kapowarr/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/kapowarr/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/kapowarr/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/kapowarr/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/kapowarr/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/kapowarr/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/kapowarr/templates/library/base_v1_1_3/network.py b/ix-dev/community/kapowarr/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/kapowarr/templates/library/base_v1_1_3/network.py rename to ix-dev/community/kapowarr/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/kapowarr/templates/library/base_v1_1_4/permissions.py b/ix-dev/community/kapowarr/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/community/kapowarr/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/community/kapowarr/templates/library/base_v1_1_3/ports.py b/ix-dev/community/kapowarr/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/kapowarr/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/kapowarr/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/kapowarr/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/kapowarr/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/kapowarr/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/kapowarr/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/kapowarr/templates/library/base_v1_1_3/redis.py b/ix-dev/community/kapowarr/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/kapowarr/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/kapowarr/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/kapowarr/templates/library/base_v1_1_3/resources.py b/ix-dev/community/kapowarr/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/kapowarr/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/kapowarr/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/kapowarr/templates/library/base_v1_1_3/security.py b/ix-dev/community/kapowarr/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/kapowarr/templates/library/base_v1_1_3/security.py rename to ix-dev/community/kapowarr/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/kapowarr/templates/library/base_v1_1_3/storage.py b/ix-dev/community/kapowarr/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/kapowarr/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/kapowarr/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/kapowarr/templates/library/base_v1_1_3/utils.py b/ix-dev/community/kapowarr/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/kapowarr/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/kapowarr/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/kavita/app.yaml b/ix-dev/community/kavita/app.yaml index 896fd303de..74660b2d72 100644 --- a/ix-dev/community/kavita/app.yaml +++ b/ix-dev/community/kavita/app.yaml @@ -20,8 +20,8 @@ icon: https://media.sys.truenas.net/apps/kavita/icons/icon.png keywords: - ebook - manga -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -44,4 +44,4 @@ sources: - https://www.kavitareader.com title: Kavita train: community -version: 1.0.18 +version: 1.0.19 diff --git a/ix-dev/community/kavita/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/kavita/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/community/kavita/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/kavita/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/kavita/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/community/kavita/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/community/kavita/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/kavita/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/kavita/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/kavita/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/kavita/templates/library/base_v1_1_3/environment.py b/ix-dev/community/kavita/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/kavita/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/kavita/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/kavita/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/community/kavita/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/community/kavita/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/kavita/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/kavita/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/kavita/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/kavita/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/kavita/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/kavita/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/kavita/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/kavita/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/kavita/templates/library/base_v1_1_3/network.py b/ix-dev/community/kavita/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/kavita/templates/library/base_v1_1_3/network.py rename to ix-dev/community/kavita/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/kavita/templates/library/base_v1_1_4/permissions.py b/ix-dev/community/kavita/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/community/kavita/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/community/kavita/templates/library/base_v1_1_3/ports.py b/ix-dev/community/kavita/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/kavita/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/kavita/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/kavita/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/kavita/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/kavita/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/kavita/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/kavita/templates/library/base_v1_1_3/redis.py b/ix-dev/community/kavita/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/kavita/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/kavita/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/kavita/templates/library/base_v1_1_3/resources.py b/ix-dev/community/kavita/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/kavita/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/kavita/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/kavita/templates/library/base_v1_1_3/security.py b/ix-dev/community/kavita/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/kavita/templates/library/base_v1_1_3/security.py rename to ix-dev/community/kavita/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/kavita/templates/library/base_v1_1_3/storage.py b/ix-dev/community/kavita/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/kavita/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/kavita/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/kavita/templates/library/base_v1_1_3/utils.py b/ix-dev/community/kavita/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/kavita/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/kavita/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/komga/app.yaml b/ix-dev/community/komga/app.yaml index 403369718b..1972899fda 100644 --- a/ix-dev/community/komga/app.yaml +++ b/ix-dev/community/komga/app.yaml @@ -10,8 +10,8 @@ keywords: - media - comics - mangas -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -31,4 +31,4 @@ sources: - https://hub.docker.com/r/gotson/komga title: Komga train: community -version: 1.1.13 +version: 1.1.14 diff --git a/ix-dev/community/komga/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/komga/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/community/komga/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/komga/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/komga/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/community/komga/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/community/komga/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/komga/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/komga/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/komga/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/komga/templates/library/base_v1_1_3/environment.py b/ix-dev/community/komga/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/komga/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/komga/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/komga/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/community/komga/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/community/komga/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/komga/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/komga/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/komga/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/komga/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/komga/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/komga/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/komga/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/komga/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/komga/templates/library/base_v1_1_3/network.py b/ix-dev/community/komga/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/komga/templates/library/base_v1_1_3/network.py rename to ix-dev/community/komga/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/komga/templates/library/base_v1_1_4/permissions.py b/ix-dev/community/komga/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/community/komga/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/community/komga/templates/library/base_v1_1_3/ports.py b/ix-dev/community/komga/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/komga/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/komga/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/komga/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/komga/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/komga/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/komga/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/komga/templates/library/base_v1_1_3/redis.py b/ix-dev/community/komga/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/komga/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/komga/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/komga/templates/library/base_v1_1_3/resources.py b/ix-dev/community/komga/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/komga/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/komga/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/komga/templates/library/base_v1_1_3/security.py b/ix-dev/community/komga/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/komga/templates/library/base_v1_1_3/security.py rename to ix-dev/community/komga/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/komga/templates/library/base_v1_1_3/storage.py b/ix-dev/community/komga/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/komga/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/komga/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/komga/templates/library/base_v1_1_3/utils.py b/ix-dev/community/komga/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/komga/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/komga/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/lidarr/app.yaml b/ix-dev/community/lidarr/app.yaml index f28e079ee1..f424e00a71 100644 --- a/ix-dev/community/lidarr/app.yaml +++ b/ix-dev/community/lidarr/app.yaml @@ -9,8 +9,8 @@ icon: https://media.sys.truenas.net/apps/lidarr/icons/icon.png keywords: - media - music -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -31,4 +31,4 @@ sources: - https://github.com/Lidarr/Lidarr title: Lidarr train: community -version: 1.1.11 +version: 1.1.12 diff --git a/ix-dev/community/lidarr/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/lidarr/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/community/lidarr/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/lidarr/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/lidarr/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/community/lidarr/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/community/lidarr/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/lidarr/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/lidarr/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/lidarr/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/lidarr/templates/library/base_v1_1_3/environment.py b/ix-dev/community/lidarr/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/lidarr/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/lidarr/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/lidarr/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/community/lidarr/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/community/lidarr/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/lidarr/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/lidarr/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/lidarr/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/lidarr/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/lidarr/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/lidarr/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/lidarr/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/lidarr/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/lidarr/templates/library/base_v1_1_3/network.py b/ix-dev/community/lidarr/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/lidarr/templates/library/base_v1_1_3/network.py rename to ix-dev/community/lidarr/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/lidarr/templates/library/base_v1_1_4/permissions.py b/ix-dev/community/lidarr/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/community/lidarr/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/community/lidarr/templates/library/base_v1_1_3/ports.py b/ix-dev/community/lidarr/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/lidarr/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/lidarr/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/lidarr/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/lidarr/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/lidarr/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/lidarr/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/lidarr/templates/library/base_v1_1_3/redis.py b/ix-dev/community/lidarr/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/lidarr/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/lidarr/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/lidarr/templates/library/base_v1_1_3/resources.py b/ix-dev/community/lidarr/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/lidarr/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/lidarr/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/lidarr/templates/library/base_v1_1_3/security.py b/ix-dev/community/lidarr/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/lidarr/templates/library/base_v1_1_3/security.py rename to ix-dev/community/lidarr/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/lidarr/templates/library/base_v1_1_3/storage.py b/ix-dev/community/lidarr/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/lidarr/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/lidarr/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/lidarr/templates/library/base_v1_1_3/utils.py b/ix-dev/community/lidarr/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/lidarr/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/lidarr/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/linkding/app.yaml b/ix-dev/community/linkding/app.yaml index f0989dbe6c..e415d65cec 100644 --- a/ix-dev/community/linkding/app.yaml +++ b/ix-dev/community/linkding/app.yaml @@ -8,8 +8,8 @@ host_mounts: [] icon: https://media.sys.truenas.net/apps/linkding/icons/icon.svg keywords: - bookmark -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -33,4 +33,4 @@ sources: - https://hub.docker.com/r/sissbruecker/linkding/ title: Linkding train: community -version: 1.0.16 +version: 1.0.17 diff --git a/ix-dev/community/linkding/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/linkding/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/community/linkding/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/linkding/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/linkding/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/community/linkding/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/community/linkding/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/linkding/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/linkding/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/linkding/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/linkding/templates/library/base_v1_1_3/environment.py b/ix-dev/community/linkding/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/linkding/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/linkding/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/linkding/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/community/linkding/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/community/linkding/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/linkding/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/linkding/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/linkding/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/linkding/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/linkding/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/linkding/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/linkding/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/linkding/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/linkding/templates/library/base_v1_1_3/network.py b/ix-dev/community/linkding/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/linkding/templates/library/base_v1_1_3/network.py rename to ix-dev/community/linkding/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/linkding/templates/library/base_v1_1_4/permissions.py b/ix-dev/community/linkding/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/community/linkding/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/community/linkding/templates/library/base_v1_1_3/ports.py b/ix-dev/community/linkding/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/linkding/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/linkding/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/linkding/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/linkding/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/linkding/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/linkding/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/linkding/templates/library/base_v1_1_3/redis.py b/ix-dev/community/linkding/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/linkding/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/linkding/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/linkding/templates/library/base_v1_1_3/resources.py b/ix-dev/community/linkding/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/linkding/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/linkding/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/linkding/templates/library/base_v1_1_3/security.py b/ix-dev/community/linkding/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/linkding/templates/library/base_v1_1_3/security.py rename to ix-dev/community/linkding/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/linkding/templates/library/base_v1_1_3/storage.py b/ix-dev/community/linkding/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/linkding/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/linkding/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/linkding/templates/library/base_v1_1_3/utils.py b/ix-dev/community/linkding/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/linkding/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/linkding/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/listmonk/app.yaml b/ix-dev/community/listmonk/app.yaml index 0ba7a70576..eae0446203 100644 --- a/ix-dev/community/listmonk/app.yaml +++ b/ix-dev/community/listmonk/app.yaml @@ -9,8 +9,8 @@ icon: https://media.sys.truenas.net/apps/listmonk/icons/icon.svg keywords: - mailing-list - newsletter -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -36,4 +36,4 @@ sources: - https://github.com/knadh/listmonk title: Listmonk train: community -version: 1.0.8 +version: 1.0.9 diff --git a/ix-dev/community/listmonk/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/listmonk/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/community/listmonk/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/listmonk/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/listmonk/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/community/listmonk/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/community/listmonk/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/listmonk/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/listmonk/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/listmonk/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/listmonk/templates/library/base_v1_1_3/environment.py b/ix-dev/community/listmonk/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/listmonk/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/listmonk/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/listmonk/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/community/listmonk/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/community/listmonk/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/listmonk/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/listmonk/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/listmonk/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/listmonk/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/listmonk/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/listmonk/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/listmonk/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/listmonk/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/listmonk/templates/library/base_v1_1_3/network.py b/ix-dev/community/listmonk/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/listmonk/templates/library/base_v1_1_3/network.py rename to ix-dev/community/listmonk/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/listmonk/templates/library/base_v1_1_4/permissions.py b/ix-dev/community/listmonk/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/community/listmonk/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/community/listmonk/templates/library/base_v1_1_3/ports.py b/ix-dev/community/listmonk/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/listmonk/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/listmonk/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/listmonk/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/listmonk/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/listmonk/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/listmonk/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/listmonk/templates/library/base_v1_1_3/redis.py b/ix-dev/community/listmonk/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/listmonk/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/listmonk/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/listmonk/templates/library/base_v1_1_3/resources.py b/ix-dev/community/listmonk/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/listmonk/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/listmonk/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/listmonk/templates/library/base_v1_1_3/security.py b/ix-dev/community/listmonk/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/listmonk/templates/library/base_v1_1_3/security.py rename to ix-dev/community/listmonk/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/listmonk/templates/library/base_v1_1_3/storage.py b/ix-dev/community/listmonk/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/listmonk/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/listmonk/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/listmonk/templates/library/base_v1_1_3/utils.py b/ix-dev/community/listmonk/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/listmonk/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/listmonk/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/logseq/app.yaml b/ix-dev/community/logseq/app.yaml index b45a31e864..2109854e47 100644 --- a/ix-dev/community/logseq/app.yaml +++ b/ix-dev/community/logseq/app.yaml @@ -10,8 +10,8 @@ icon: https://media.sys.truenas.net/apps/logseq/icons/icon.png keywords: - knowledge - management -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -28,4 +28,4 @@ sources: - https://github.com/logseq/logseq title: Logseq train: community -version: 1.0.17 +version: 1.0.18 diff --git a/ix-dev/community/logseq/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/logseq/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/community/logseq/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/logseq/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/logseq/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/community/logseq/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/community/logseq/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/logseq/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/logseq/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/logseq/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/logseq/templates/library/base_v1_1_3/environment.py b/ix-dev/community/logseq/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/logseq/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/logseq/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/logseq/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/community/logseq/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/community/logseq/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/logseq/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/logseq/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/logseq/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/logseq/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/logseq/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/logseq/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/logseq/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/logseq/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/logseq/templates/library/base_v1_1_3/network.py b/ix-dev/community/logseq/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/logseq/templates/library/base_v1_1_3/network.py rename to ix-dev/community/logseq/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/logseq/templates/library/base_v1_1_4/permissions.py b/ix-dev/community/logseq/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/community/logseq/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/community/logseq/templates/library/base_v1_1_3/ports.py b/ix-dev/community/logseq/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/logseq/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/logseq/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/logseq/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/logseq/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/logseq/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/logseq/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/logseq/templates/library/base_v1_1_3/redis.py b/ix-dev/community/logseq/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/logseq/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/logseq/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/logseq/templates/library/base_v1_1_3/resources.py b/ix-dev/community/logseq/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/logseq/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/logseq/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/logseq/templates/library/base_v1_1_3/security.py b/ix-dev/community/logseq/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/logseq/templates/library/base_v1_1_3/security.py rename to ix-dev/community/logseq/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/logseq/templates/library/base_v1_1_3/storage.py b/ix-dev/community/logseq/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/logseq/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/logseq/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/logseq/templates/library/base_v1_1_3/utils.py b/ix-dev/community/logseq/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/logseq/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/logseq/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/mealie/app.yaml b/ix-dev/community/mealie/app.yaml index aadb2ca590..f7ee0cd243 100644 --- a/ix-dev/community/mealie/app.yaml +++ b/ix-dev/community/mealie/app.yaml @@ -9,8 +9,8 @@ icon: https://media.sys.truenas.net/apps/mealie/icons/icon.png keywords: - recipes - meal planner -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -33,4 +33,4 @@ sources: - https://docs.mealie.io/ title: Mealie train: community -version: 1.2.9 +version: 1.2.10 diff --git a/ix-dev/community/mealie/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/mealie/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/community/mealie/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/mealie/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/mealie/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/community/mealie/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/community/mealie/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/mealie/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/mealie/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/mealie/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/mealie/templates/library/base_v1_1_3/environment.py b/ix-dev/community/mealie/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/mealie/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/mealie/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/mealie/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/community/mealie/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/community/mealie/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/mealie/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/mealie/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/mealie/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/mealie/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/mealie/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/mealie/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/mealie/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/mealie/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/mealie/templates/library/base_v1_1_3/network.py b/ix-dev/community/mealie/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/mealie/templates/library/base_v1_1_3/network.py rename to ix-dev/community/mealie/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/mealie/templates/library/base_v1_1_4/permissions.py b/ix-dev/community/mealie/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/community/mealie/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/community/mealie/templates/library/base_v1_1_3/ports.py b/ix-dev/community/mealie/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/mealie/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/mealie/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/mealie/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/mealie/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/mealie/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/mealie/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/mealie/templates/library/base_v1_1_3/redis.py b/ix-dev/community/mealie/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/mealie/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/mealie/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/mealie/templates/library/base_v1_1_3/resources.py b/ix-dev/community/mealie/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/mealie/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/mealie/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/mealie/templates/library/base_v1_1_3/security.py b/ix-dev/community/mealie/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/mealie/templates/library/base_v1_1_3/security.py rename to ix-dev/community/mealie/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/mealie/templates/library/base_v1_1_3/storage.py b/ix-dev/community/mealie/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/mealie/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/mealie/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/mealie/templates/library/base_v1_1_3/utils.py b/ix-dev/community/mealie/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/mealie/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/mealie/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/metube/app.yaml b/ix-dev/community/metube/app.yaml index 91a2f3855d..d3f1e0fd49 100644 --- a/ix-dev/community/metube/app.yaml +++ b/ix-dev/community/metube/app.yaml @@ -10,8 +10,8 @@ icon: https://media.sys.truenas.net/apps/metube/icons/icon.svg keywords: - youtube-dl - yt-dlp -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -30,4 +30,4 @@ sources: - https://github.com/alexta69/metube title: MeTube train: community -version: 1.1.16 +version: 1.1.17 diff --git a/ix-dev/community/metube/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/metube/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/community/metube/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/metube/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/metube/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/community/metube/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/community/metube/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/metube/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/metube/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/metube/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/metube/templates/library/base_v1_1_3/environment.py b/ix-dev/community/metube/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/metube/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/metube/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/metube/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/community/metube/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/community/metube/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/metube/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/metube/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/metube/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/metube/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/metube/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/metube/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/metube/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/metube/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/metube/templates/library/base_v1_1_3/network.py b/ix-dev/community/metube/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/metube/templates/library/base_v1_1_3/network.py rename to ix-dev/community/metube/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/metube/templates/library/base_v1_1_4/permissions.py b/ix-dev/community/metube/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/community/metube/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/community/metube/templates/library/base_v1_1_3/ports.py b/ix-dev/community/metube/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/metube/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/metube/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/metube/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/metube/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/metube/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/metube/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/metube/templates/library/base_v1_1_3/redis.py b/ix-dev/community/metube/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/metube/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/metube/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/metube/templates/library/base_v1_1_3/resources.py b/ix-dev/community/metube/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/metube/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/metube/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/metube/templates/library/base_v1_1_3/security.py b/ix-dev/community/metube/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/metube/templates/library/base_v1_1_3/security.py rename to ix-dev/community/metube/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/metube/templates/library/base_v1_1_3/storage.py b/ix-dev/community/metube/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/metube/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/metube/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/metube/templates/library/base_v1_1_3/utils.py b/ix-dev/community/metube/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/metube/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/metube/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/minecraft/app.yaml b/ix-dev/community/minecraft/app.yaml index 25a0f8934d..6fd82af0be 100644 --- a/ix-dev/community/minecraft/app.yaml +++ b/ix-dev/community/minecraft/app.yaml @@ -19,8 +19,8 @@ icon: https://media.sys.truenas.net/apps/minecraft/icons/icon.svg keywords: - world - building -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -38,4 +38,4 @@ sources: - https://github.com/itzg/docker-minecraft-server title: Minecraft train: community -version: 1.11.17 +version: 1.11.18 diff --git a/ix-dev/community/minecraft/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/minecraft/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/community/minecraft/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/minecraft/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/minecraft/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/community/minecraft/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/community/minecraft/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/minecraft/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/minecraft/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/minecraft/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/minecraft/templates/library/base_v1_1_3/environment.py b/ix-dev/community/minecraft/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/minecraft/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/minecraft/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/minecraft/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/community/minecraft/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/community/minecraft/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/minecraft/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/minecraft/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/minecraft/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/minecraft/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/minecraft/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/minecraft/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/minecraft/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/minecraft/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/minecraft/templates/library/base_v1_1_3/network.py b/ix-dev/community/minecraft/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/minecraft/templates/library/base_v1_1_3/network.py rename to ix-dev/community/minecraft/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/minecraft/templates/library/base_v1_1_4/permissions.py b/ix-dev/community/minecraft/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/community/minecraft/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/community/minecraft/templates/library/base_v1_1_3/ports.py b/ix-dev/community/minecraft/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/minecraft/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/minecraft/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/minecraft/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/minecraft/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/minecraft/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/minecraft/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/minecraft/templates/library/base_v1_1_3/redis.py b/ix-dev/community/minecraft/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/minecraft/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/minecraft/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/minecraft/templates/library/base_v1_1_3/resources.py b/ix-dev/community/minecraft/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/minecraft/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/minecraft/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/minecraft/templates/library/base_v1_1_3/security.py b/ix-dev/community/minecraft/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/minecraft/templates/library/base_v1_1_3/security.py rename to ix-dev/community/minecraft/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/minecraft/templates/library/base_v1_1_3/storage.py b/ix-dev/community/minecraft/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/minecraft/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/minecraft/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/minecraft/templates/library/base_v1_1_3/utils.py b/ix-dev/community/minecraft/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/minecraft/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/minecraft/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/mineos/app.yaml b/ix-dev/community/mineos/app.yaml index 634c5e910f..55f7151289 100644 --- a/ix-dev/community/mineos/app.yaml +++ b/ix-dev/community/mineos/app.yaml @@ -19,8 +19,8 @@ host_mounts: [] icon: https://media.sys.truenas.net/apps/mineos/icons/icon.png keywords: - minecraft -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -39,4 +39,4 @@ sources: - https://github.com/hexparrot/mineos-node title: MineOS train: community -version: 1.0.17 +version: 1.0.18 diff --git a/ix-dev/community/mineos/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/mineos/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/community/mineos/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/mineos/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/mineos/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/community/mineos/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/community/mineos/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/mineos/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/mineos/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/mineos/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/mineos/templates/library/base_v1_1_3/environment.py b/ix-dev/community/mineos/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/mineos/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/mineos/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/mineos/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/community/mineos/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/community/mineos/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/mineos/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/mineos/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/mineos/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/mineos/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/mineos/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/mineos/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/mineos/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/mineos/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/mineos/templates/library/base_v1_1_3/network.py b/ix-dev/community/mineos/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/mineos/templates/library/base_v1_1_3/network.py rename to ix-dev/community/mineos/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/mineos/templates/library/base_v1_1_4/permissions.py b/ix-dev/community/mineos/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/community/mineos/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/community/mineos/templates/library/base_v1_1_3/ports.py b/ix-dev/community/mineos/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/mineos/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/mineos/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/mineos/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/mineos/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/mineos/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/mineos/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/mineos/templates/library/base_v1_1_3/redis.py b/ix-dev/community/mineos/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/mineos/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/mineos/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/mineos/templates/library/base_v1_1_3/resources.py b/ix-dev/community/mineos/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/mineos/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/mineos/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/mineos/templates/library/base_v1_1_3/security.py b/ix-dev/community/mineos/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/mineos/templates/library/base_v1_1_3/security.py rename to ix-dev/community/mineos/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/mineos/templates/library/base_v1_1_3/storage.py b/ix-dev/community/mineos/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/mineos/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/mineos/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/mineos/templates/library/base_v1_1_3/utils.py b/ix-dev/community/mineos/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/mineos/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/mineos/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/mumble/app.yaml b/ix-dev/community/mumble/app.yaml index 37fbb74d79..e5d1d2b758 100644 --- a/ix-dev/community/mumble/app.yaml +++ b/ix-dev/community/mumble/app.yaml @@ -8,8 +8,8 @@ host_mounts: [] icon: https://media.sys.truenas.net/apps/mumble/icons/icon.svg keywords: - voice -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -27,4 +27,4 @@ sources: - https://www.mumble.info/ title: Mumble train: community -version: 1.1.9 +version: 1.1.10 diff --git a/ix-dev/community/mumble/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/mumble/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/community/mumble/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/mumble/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/mumble/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/community/mumble/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/community/mumble/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/mumble/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/mumble/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/mumble/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/mumble/templates/library/base_v1_1_3/environment.py b/ix-dev/community/mumble/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/mumble/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/mumble/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/mumble/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/community/mumble/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/community/mumble/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/mumble/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/mumble/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/mumble/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/mumble/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/mumble/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/mumble/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/mumble/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/mumble/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/mumble/templates/library/base_v1_1_3/network.py b/ix-dev/community/mumble/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/mumble/templates/library/base_v1_1_3/network.py rename to ix-dev/community/mumble/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/mumble/templates/library/base_v1_1_4/permissions.py b/ix-dev/community/mumble/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/community/mumble/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/community/mumble/templates/library/base_v1_1_3/ports.py b/ix-dev/community/mumble/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/mumble/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/mumble/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/mumble/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/mumble/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/mumble/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/mumble/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/mumble/templates/library/base_v1_1_3/redis.py b/ix-dev/community/mumble/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/mumble/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/mumble/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/mumble/templates/library/base_v1_1_3/resources.py b/ix-dev/community/mumble/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/mumble/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/mumble/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/mumble/templates/library/base_v1_1_3/security.py b/ix-dev/community/mumble/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/mumble/templates/library/base_v1_1_3/security.py rename to ix-dev/community/mumble/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/mumble/templates/library/base_v1_1_3/storage.py b/ix-dev/community/mumble/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/mumble/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/mumble/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/mumble/templates/library/base_v1_1_3/utils.py b/ix-dev/community/mumble/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/mumble/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/mumble/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/n8n/app.yaml b/ix-dev/community/n8n/app.yaml index 52b139ce86..7f220747a4 100644 --- a/ix-dev/community/n8n/app.yaml +++ b/ix-dev/community/n8n/app.yaml @@ -9,8 +9,8 @@ icon: https://media.sys.truenas.net/apps/n8n/icons/icon.png keywords: - workflows - automation -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -42,4 +42,4 @@ sources: - https://hub.docker.com/r/n8nio/n8n title: n8n train: community -version: 1.3.22 +version: 1.3.23 diff --git a/ix-dev/community/n8n/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/n8n/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/community/n8n/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/n8n/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/n8n/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/community/n8n/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/community/n8n/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/n8n/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/n8n/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/n8n/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/n8n/templates/library/base_v1_1_3/environment.py b/ix-dev/community/n8n/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/n8n/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/n8n/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/n8n/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/community/n8n/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/community/n8n/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/n8n/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/n8n/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/n8n/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/n8n/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/n8n/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/n8n/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/n8n/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/n8n/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/n8n/templates/library/base_v1_1_3/network.py b/ix-dev/community/n8n/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/n8n/templates/library/base_v1_1_3/network.py rename to ix-dev/community/n8n/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/n8n/templates/library/base_v1_1_4/permissions.py b/ix-dev/community/n8n/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/community/n8n/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/community/n8n/templates/library/base_v1_1_3/ports.py b/ix-dev/community/n8n/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/n8n/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/n8n/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/n8n/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/n8n/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/n8n/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/n8n/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/n8n/templates/library/base_v1_1_3/redis.py b/ix-dev/community/n8n/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/n8n/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/n8n/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/n8n/templates/library/base_v1_1_3/resources.py b/ix-dev/community/n8n/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/n8n/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/n8n/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/n8n/templates/library/base_v1_1_3/security.py b/ix-dev/community/n8n/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/n8n/templates/library/base_v1_1_3/security.py rename to ix-dev/community/n8n/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/n8n/templates/library/base_v1_1_3/storage.py b/ix-dev/community/n8n/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/n8n/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/n8n/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/n8n/templates/library/base_v1_1_3/utils.py b/ix-dev/community/n8n/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/n8n/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/n8n/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/navidrome/app.yaml b/ix-dev/community/navidrome/app.yaml index a483fdac79..d392cfe844 100644 --- a/ix-dev/community/navidrome/app.yaml +++ b/ix-dev/community/navidrome/app.yaml @@ -11,8 +11,8 @@ icon: https://media.sys.truenas.net/apps/navidrome/icons/icon.png keywords: - media - music -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -32,4 +32,4 @@ sources: - https://github.com/navidrome/navidrome/ title: Navidrome train: community -version: 1.0.23 +version: 1.0.24 diff --git a/ix-dev/community/navidrome/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/navidrome/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/community/navidrome/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/navidrome/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/navidrome/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/community/navidrome/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/community/navidrome/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/navidrome/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/navidrome/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/navidrome/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/navidrome/templates/library/base_v1_1_3/environment.py b/ix-dev/community/navidrome/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/navidrome/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/navidrome/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/navidrome/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/community/navidrome/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/community/navidrome/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/navidrome/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/navidrome/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/navidrome/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/navidrome/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/navidrome/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/navidrome/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/navidrome/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/navidrome/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/navidrome/templates/library/base_v1_1_3/network.py b/ix-dev/community/navidrome/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/navidrome/templates/library/base_v1_1_3/network.py rename to ix-dev/community/navidrome/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/navidrome/templates/library/base_v1_1_4/permissions.py b/ix-dev/community/navidrome/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/community/navidrome/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/community/navidrome/templates/library/base_v1_1_3/ports.py b/ix-dev/community/navidrome/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/navidrome/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/navidrome/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/navidrome/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/navidrome/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/navidrome/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/navidrome/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/navidrome/templates/library/base_v1_1_3/redis.py b/ix-dev/community/navidrome/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/navidrome/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/navidrome/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/navidrome/templates/library/base_v1_1_3/resources.py b/ix-dev/community/navidrome/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/navidrome/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/navidrome/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/navidrome/templates/library/base_v1_1_3/security.py b/ix-dev/community/navidrome/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/navidrome/templates/library/base_v1_1_3/security.py rename to ix-dev/community/navidrome/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/navidrome/templates/library/base_v1_1_3/storage.py b/ix-dev/community/navidrome/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/navidrome/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/navidrome/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/navidrome/templates/library/base_v1_1_3/utils.py b/ix-dev/community/navidrome/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/navidrome/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/navidrome/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/netbootxyz/app.yaml b/ix-dev/community/netbootxyz/app.yaml index 5613eaa384..0b5a998977 100644 --- a/ix-dev/community/netbootxyz/app.yaml +++ b/ix-dev/community/netbootxyz/app.yaml @@ -30,8 +30,8 @@ keywords: - netboot - netbootxyz - netboot.xyz -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -50,4 +50,4 @@ sources: - https://netboot.xyz title: Netboot.xyz train: community -version: 1.0.18 +version: 1.0.19 diff --git a/ix-dev/community/netbootxyz/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/netbootxyz/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/community/netbootxyz/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/netbootxyz/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/netbootxyz/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/community/netbootxyz/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/community/netbootxyz/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/netbootxyz/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/netbootxyz/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/netbootxyz/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/netbootxyz/templates/library/base_v1_1_3/environment.py b/ix-dev/community/netbootxyz/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/netbootxyz/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/netbootxyz/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/netbootxyz/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/community/netbootxyz/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/community/netbootxyz/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/netbootxyz/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/netbootxyz/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/netbootxyz/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/netbootxyz/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/netbootxyz/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/netbootxyz/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/netbootxyz/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/netbootxyz/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/netbootxyz/templates/library/base_v1_1_3/network.py b/ix-dev/community/netbootxyz/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/netbootxyz/templates/library/base_v1_1_3/network.py rename to ix-dev/community/netbootxyz/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/netbootxyz/templates/library/base_v1_1_4/permissions.py b/ix-dev/community/netbootxyz/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/community/netbootxyz/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/community/netbootxyz/templates/library/base_v1_1_3/ports.py b/ix-dev/community/netbootxyz/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/netbootxyz/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/netbootxyz/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/netbootxyz/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/netbootxyz/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/netbootxyz/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/netbootxyz/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/netbootxyz/templates/library/base_v1_1_3/redis.py b/ix-dev/community/netbootxyz/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/netbootxyz/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/netbootxyz/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/netbootxyz/templates/library/base_v1_1_3/resources.py b/ix-dev/community/netbootxyz/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/netbootxyz/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/netbootxyz/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/netbootxyz/templates/library/base_v1_1_3/security.py b/ix-dev/community/netbootxyz/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/netbootxyz/templates/library/base_v1_1_3/security.py rename to ix-dev/community/netbootxyz/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/netbootxyz/templates/library/base_v1_1_3/storage.py b/ix-dev/community/netbootxyz/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/netbootxyz/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/netbootxyz/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/netbootxyz/templates/library/base_v1_1_3/utils.py b/ix-dev/community/netbootxyz/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/netbootxyz/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/netbootxyz/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/nginx-proxy-manager/app.yaml b/ix-dev/community/nginx-proxy-manager/app.yaml index 1a49bff700..5d13748073 100644 --- a/ix-dev/community/nginx-proxy-manager/app.yaml +++ b/ix-dev/community/nginx-proxy-manager/app.yaml @@ -22,8 +22,8 @@ keywords: - reverse - nginx - proxy -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -44,4 +44,4 @@ sources: - https://hub.docker.com/r/jc21/nginx-proxy-manager title: Nginx Proxy Manager train: community -version: 1.0.19 +version: 1.0.20 diff --git a/ix-dev/community/nginx-proxy-manager/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/nginx-proxy-manager/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/community/nginx-proxy-manager/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/nginx-proxy-manager/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/nginx-proxy-manager/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/community/nginx-proxy-manager/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/community/nginx-proxy-manager/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/nginx-proxy-manager/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/nginx-proxy-manager/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/nginx-proxy-manager/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/nginx-proxy-manager/templates/library/base_v1_1_3/environment.py b/ix-dev/community/nginx-proxy-manager/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/nginx-proxy-manager/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/nginx-proxy-manager/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/nginx-proxy-manager/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/community/nginx-proxy-manager/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/community/nginx-proxy-manager/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/nginx-proxy-manager/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/nginx-proxy-manager/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/nginx-proxy-manager/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/nginx-proxy-manager/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/nginx-proxy-manager/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/nginx-proxy-manager/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/nginx-proxy-manager/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/nginx-proxy-manager/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/nginx-proxy-manager/templates/library/base_v1_1_3/network.py b/ix-dev/community/nginx-proxy-manager/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/nginx-proxy-manager/templates/library/base_v1_1_3/network.py rename to ix-dev/community/nginx-proxy-manager/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/nginx-proxy-manager/templates/library/base_v1_1_4/permissions.py b/ix-dev/community/nginx-proxy-manager/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/community/nginx-proxy-manager/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/community/nginx-proxy-manager/templates/library/base_v1_1_3/ports.py b/ix-dev/community/nginx-proxy-manager/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/nginx-proxy-manager/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/nginx-proxy-manager/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/nginx-proxy-manager/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/nginx-proxy-manager/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/nginx-proxy-manager/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/nginx-proxy-manager/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/nginx-proxy-manager/templates/library/base_v1_1_3/redis.py b/ix-dev/community/nginx-proxy-manager/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/nginx-proxy-manager/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/nginx-proxy-manager/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/nginx-proxy-manager/templates/library/base_v1_1_3/resources.py b/ix-dev/community/nginx-proxy-manager/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/nginx-proxy-manager/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/nginx-proxy-manager/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/nginx-proxy-manager/templates/library/base_v1_1_3/security.py b/ix-dev/community/nginx-proxy-manager/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/nginx-proxy-manager/templates/library/base_v1_1_3/security.py rename to ix-dev/community/nginx-proxy-manager/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/nginx-proxy-manager/templates/library/base_v1_1_3/storage.py b/ix-dev/community/nginx-proxy-manager/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/nginx-proxy-manager/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/nginx-proxy-manager/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/nginx-proxy-manager/templates/library/base_v1_1_3/utils.py b/ix-dev/community/nginx-proxy-manager/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/nginx-proxy-manager/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/nginx-proxy-manager/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/node-red/app.yaml b/ix-dev/community/node-red/app.yaml index 18a47a7705..ccc684f257 100644 --- a/ix-dev/community/node-red/app.yaml +++ b/ix-dev/community/node-red/app.yaml @@ -9,8 +9,8 @@ host_mounts: [] icon: https://media.sys.truenas.net/apps/node-red/icons/icon.png keywords: - automation -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -29,4 +29,4 @@ sources: - https://github.com/node-red/node-red-docker title: Node-RED train: community -version: 1.0.32 +version: 1.0.33 diff --git a/ix-dev/community/node-red/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/node-red/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/community/node-red/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/node-red/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/node-red/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/community/node-red/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/community/node-red/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/node-red/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/node-red/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/node-red/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/node-red/templates/library/base_v1_1_3/environment.py b/ix-dev/community/node-red/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/node-red/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/node-red/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/node-red/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/community/node-red/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/community/node-red/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/node-red/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/node-red/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/node-red/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/node-red/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/node-red/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/node-red/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/node-red/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/node-red/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/node-red/templates/library/base_v1_1_3/network.py b/ix-dev/community/node-red/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/node-red/templates/library/base_v1_1_3/network.py rename to ix-dev/community/node-red/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/node-red/templates/library/base_v1_1_4/permissions.py b/ix-dev/community/node-red/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/community/node-red/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/community/node-red/templates/library/base_v1_1_3/ports.py b/ix-dev/community/node-red/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/node-red/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/node-red/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/node-red/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/node-red/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/node-red/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/node-red/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/node-red/templates/library/base_v1_1_3/redis.py b/ix-dev/community/node-red/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/node-red/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/node-red/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/node-red/templates/library/base_v1_1_3/resources.py b/ix-dev/community/node-red/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/node-red/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/node-red/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/node-red/templates/library/base_v1_1_3/security.py b/ix-dev/community/node-red/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/node-red/templates/library/base_v1_1_3/security.py rename to ix-dev/community/node-red/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/node-red/templates/library/base_v1_1_3/storage.py b/ix-dev/community/node-red/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/node-red/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/node-red/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/node-red/templates/library/base_v1_1_3/utils.py b/ix-dev/community/node-red/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/node-red/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/node-red/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/odoo/app.yaml b/ix-dev/community/odoo/app.yaml index 805901ae74..463d682ee1 100644 --- a/ix-dev/community/odoo/app.yaml +++ b/ix-dev/community/odoo/app.yaml @@ -9,8 +9,8 @@ icon: https://media.sys.truenas.net/apps/odoo/icons/icon.png keywords: - erp - odoo -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -30,4 +30,4 @@ sources: - https://github.com/odoo/odoo title: Odoo train: community -version: 1.0.3 +version: 1.0.4 diff --git a/ix-dev/community/odoo/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/odoo/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/community/odoo/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/odoo/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/odoo/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/community/odoo/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/community/odoo/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/odoo/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/odoo/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/odoo/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/odoo/templates/library/base_v1_1_3/environment.py b/ix-dev/community/odoo/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/odoo/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/odoo/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/odoo/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/community/odoo/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/community/odoo/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/odoo/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/odoo/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/odoo/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/odoo/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/odoo/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/odoo/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/odoo/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/odoo/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/odoo/templates/library/base_v1_1_3/network.py b/ix-dev/community/odoo/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/odoo/templates/library/base_v1_1_3/network.py rename to ix-dev/community/odoo/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/odoo/templates/library/base_v1_1_4/permissions.py b/ix-dev/community/odoo/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/community/odoo/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/community/odoo/templates/library/base_v1_1_3/ports.py b/ix-dev/community/odoo/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/odoo/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/odoo/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/odoo/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/odoo/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/odoo/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/odoo/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/odoo/templates/library/base_v1_1_3/redis.py b/ix-dev/community/odoo/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/odoo/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/odoo/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/odoo/templates/library/base_v1_1_3/resources.py b/ix-dev/community/odoo/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/odoo/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/odoo/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/odoo/templates/library/base_v1_1_3/security.py b/ix-dev/community/odoo/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/odoo/templates/library/base_v1_1_3/security.py rename to ix-dev/community/odoo/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/odoo/templates/library/base_v1_1_3/storage.py b/ix-dev/community/odoo/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/odoo/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/odoo/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/odoo/templates/library/base_v1_1_3/utils.py b/ix-dev/community/odoo/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/odoo/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/odoo/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/omada-controller/app.yaml b/ix-dev/community/omada-controller/app.yaml index 5143a1671e..e3da5e442c 100644 --- a/ix-dev/community/omada-controller/app.yaml +++ b/ix-dev/community/omada-controller/app.yaml @@ -23,8 +23,8 @@ keywords: - controller - omada - tp-link -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -42,4 +42,4 @@ sources: - https://hub.docker.com/r/mbentley/omada-controller title: Bazarr train: community -version: 1.1.9 +version: 1.1.10 diff --git a/ix-dev/community/omada-controller/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/omada-controller/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/community/omada-controller/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/omada-controller/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/omada-controller/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/community/omada-controller/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/community/omada-controller/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/omada-controller/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/omada-controller/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/omada-controller/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/omada-controller/templates/library/base_v1_1_3/environment.py b/ix-dev/community/omada-controller/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/omada-controller/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/omada-controller/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/omada-controller/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/community/omada-controller/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/community/omada-controller/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/omada-controller/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/omada-controller/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/omada-controller/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/omada-controller/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/omada-controller/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/omada-controller/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/omada-controller/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/omada-controller/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/omada-controller/templates/library/base_v1_1_3/network.py b/ix-dev/community/omada-controller/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/omada-controller/templates/library/base_v1_1_3/network.py rename to ix-dev/community/omada-controller/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/omada-controller/templates/library/base_v1_1_4/permissions.py b/ix-dev/community/omada-controller/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/community/omada-controller/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/community/omada-controller/templates/library/base_v1_1_3/ports.py b/ix-dev/community/omada-controller/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/omada-controller/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/omada-controller/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/omada-controller/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/omada-controller/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/omada-controller/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/omada-controller/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/omada-controller/templates/library/base_v1_1_3/redis.py b/ix-dev/community/omada-controller/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/omada-controller/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/omada-controller/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/omada-controller/templates/library/base_v1_1_3/resources.py b/ix-dev/community/omada-controller/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/omada-controller/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/omada-controller/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/omada-controller/templates/library/base_v1_1_3/security.py b/ix-dev/community/omada-controller/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/omada-controller/templates/library/base_v1_1_3/security.py rename to ix-dev/community/omada-controller/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/omada-controller/templates/library/base_v1_1_3/storage.py b/ix-dev/community/omada-controller/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/omada-controller/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/omada-controller/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/omada-controller/templates/library/base_v1_1_3/utils.py b/ix-dev/community/omada-controller/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/omada-controller/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/omada-controller/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/organizr/app.yaml b/ix-dev/community/organizr/app.yaml index fb1ee0dbbf..37534684c7 100644 --- a/ix-dev/community/organizr/app.yaml +++ b/ix-dev/community/organizr/app.yaml @@ -19,8 +19,8 @@ icon: https://media.sys.truenas.net/apps/organizr/icons/icon.png keywords: - dashboard - organizr -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -40,4 +40,4 @@ sources: - https://github.com/causefx/Organizr title: Organizr train: community -version: 1.0.17 +version: 1.0.18 diff --git a/ix-dev/community/organizr/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/organizr/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/community/organizr/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/organizr/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/organizr/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/community/organizr/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/community/organizr/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/organizr/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/organizr/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/organizr/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/organizr/templates/library/base_v1_1_3/environment.py b/ix-dev/community/organizr/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/organizr/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/organizr/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/organizr/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/community/organizr/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/community/organizr/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/organizr/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/organizr/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/organizr/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/organizr/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/organizr/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/organizr/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/organizr/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/organizr/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/organizr/templates/library/base_v1_1_3/network.py b/ix-dev/community/organizr/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/organizr/templates/library/base_v1_1_3/network.py rename to ix-dev/community/organizr/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/organizr/templates/library/base_v1_1_4/permissions.py b/ix-dev/community/organizr/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/community/organizr/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/community/organizr/templates/library/base_v1_1_3/ports.py b/ix-dev/community/organizr/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/organizr/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/organizr/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/organizr/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/organizr/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/organizr/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/organizr/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/organizr/templates/library/base_v1_1_3/redis.py b/ix-dev/community/organizr/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/organizr/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/organizr/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/organizr/templates/library/base_v1_1_3/resources.py b/ix-dev/community/organizr/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/organizr/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/organizr/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/organizr/templates/library/base_v1_1_3/security.py b/ix-dev/community/organizr/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/organizr/templates/library/base_v1_1_3/security.py rename to ix-dev/community/organizr/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/organizr/templates/library/base_v1_1_3/storage.py b/ix-dev/community/organizr/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/organizr/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/organizr/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/organizr/templates/library/base_v1_1_3/utils.py b/ix-dev/community/organizr/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/organizr/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/organizr/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/overseerr/app.yaml b/ix-dev/community/overseerr/app.yaml index 501259abc4..97fc6d8a0c 100644 --- a/ix-dev/community/overseerr/app.yaml +++ b/ix-dev/community/overseerr/app.yaml @@ -9,8 +9,8 @@ host_mounts: [] icon: https://media.sys.truenas.net/apps/overseerr/icons/icon.svg keywords: - media -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -28,4 +28,4 @@ sources: - https://github.com/sct/overseerr title: Overseerr train: community -version: 1.0.17 +version: 1.0.18 diff --git a/ix-dev/community/overseerr/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/overseerr/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/community/overseerr/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/overseerr/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/overseerr/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/community/overseerr/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/community/overseerr/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/overseerr/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/overseerr/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/overseerr/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/overseerr/templates/library/base_v1_1_3/environment.py b/ix-dev/community/overseerr/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/overseerr/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/overseerr/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/overseerr/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/community/overseerr/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/community/overseerr/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/overseerr/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/overseerr/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/overseerr/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/overseerr/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/overseerr/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/overseerr/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/overseerr/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/overseerr/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/overseerr/templates/library/base_v1_1_3/network.py b/ix-dev/community/overseerr/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/overseerr/templates/library/base_v1_1_3/network.py rename to ix-dev/community/overseerr/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/overseerr/templates/library/base_v1_1_4/permissions.py b/ix-dev/community/overseerr/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/community/overseerr/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/community/overseerr/templates/library/base_v1_1_3/ports.py b/ix-dev/community/overseerr/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/overseerr/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/overseerr/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/overseerr/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/overseerr/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/overseerr/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/overseerr/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/overseerr/templates/library/base_v1_1_3/redis.py b/ix-dev/community/overseerr/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/overseerr/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/overseerr/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/overseerr/templates/library/base_v1_1_3/resources.py b/ix-dev/community/overseerr/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/overseerr/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/overseerr/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/overseerr/templates/library/base_v1_1_3/security.py b/ix-dev/community/overseerr/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/overseerr/templates/library/base_v1_1_3/security.py rename to ix-dev/community/overseerr/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/overseerr/templates/library/base_v1_1_3/storage.py b/ix-dev/community/overseerr/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/overseerr/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/overseerr/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/overseerr/templates/library/base_v1_1_3/utils.py b/ix-dev/community/overseerr/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/overseerr/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/overseerr/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/palworld/app.yaml b/ix-dev/community/palworld/app.yaml index c63f4b01b4..a63c29ec0b 100644 --- a/ix-dev/community/palworld/app.yaml +++ b/ix-dev/community/palworld/app.yaml @@ -28,8 +28,8 @@ icon: https://media.sys.truenas.net/apps/palworld/icons/icon.webp keywords: - game - palworld -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -47,4 +47,4 @@ sources: - https://github.com/ich777/docker-steamcmd-server/tree/palworld title: Palworld train: community -version: 1.0.19 +version: 1.0.20 diff --git a/ix-dev/community/palworld/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/palworld/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/community/palworld/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/palworld/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/palworld/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/community/palworld/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/community/palworld/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/palworld/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/palworld/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/palworld/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/palworld/templates/library/base_v1_1_3/environment.py b/ix-dev/community/palworld/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/palworld/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/palworld/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/palworld/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/community/palworld/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/community/palworld/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/palworld/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/palworld/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/palworld/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/palworld/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/palworld/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/palworld/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/palworld/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/palworld/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/palworld/templates/library/base_v1_1_3/network.py b/ix-dev/community/palworld/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/palworld/templates/library/base_v1_1_3/network.py rename to ix-dev/community/palworld/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/palworld/templates/library/base_v1_1_4/permissions.py b/ix-dev/community/palworld/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/community/palworld/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/community/palworld/templates/library/base_v1_1_3/ports.py b/ix-dev/community/palworld/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/palworld/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/palworld/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/palworld/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/palworld/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/palworld/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/palworld/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/palworld/templates/library/base_v1_1_3/redis.py b/ix-dev/community/palworld/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/palworld/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/palworld/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/palworld/templates/library/base_v1_1_3/resources.py b/ix-dev/community/palworld/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/palworld/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/palworld/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/palworld/templates/library/base_v1_1_3/security.py b/ix-dev/community/palworld/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/palworld/templates/library/base_v1_1_3/security.py rename to ix-dev/community/palworld/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/palworld/templates/library/base_v1_1_3/storage.py b/ix-dev/community/palworld/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/palworld/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/palworld/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/palworld/templates/library/base_v1_1_3/utils.py b/ix-dev/community/palworld/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/palworld/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/palworld/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/paperless-ngx/app.yaml b/ix-dev/community/paperless-ngx/app.yaml index 9a07aa56d7..a1186c153f 100644 --- a/ix-dev/community/paperless-ngx/app.yaml +++ b/ix-dev/community/paperless-ngx/app.yaml @@ -20,8 +20,8 @@ icon: https://media.sys.truenas.net/apps/paperless-ngx/icons/icon.svg keywords: - document - management -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -57,4 +57,4 @@ sources: - https://github.com/paperless-ngx/paperless-ngx title: Paperless-ngx train: community -version: 1.0.11 +version: 1.0.12 diff --git a/ix-dev/community/paperless-ngx/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/paperless-ngx/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/community/paperless-ngx/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/paperless-ngx/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/paperless-ngx/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/community/paperless-ngx/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/community/paperless-ngx/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/paperless-ngx/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/paperless-ngx/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/paperless-ngx/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/paperless-ngx/templates/library/base_v1_1_3/environment.py b/ix-dev/community/paperless-ngx/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/paperless-ngx/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/paperless-ngx/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/paperless-ngx/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/community/paperless-ngx/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/community/paperless-ngx/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/paperless-ngx/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/paperless-ngx/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/paperless-ngx/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/paperless-ngx/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/paperless-ngx/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/paperless-ngx/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/paperless-ngx/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/paperless-ngx/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/paperless-ngx/templates/library/base_v1_1_3/network.py b/ix-dev/community/paperless-ngx/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/paperless-ngx/templates/library/base_v1_1_3/network.py rename to ix-dev/community/paperless-ngx/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/paperless-ngx/templates/library/base_v1_1_4/permissions.py b/ix-dev/community/paperless-ngx/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/community/paperless-ngx/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/community/paperless-ngx/templates/library/base_v1_1_3/ports.py b/ix-dev/community/paperless-ngx/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/paperless-ngx/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/paperless-ngx/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/paperless-ngx/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/paperless-ngx/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/paperless-ngx/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/paperless-ngx/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/paperless-ngx/templates/library/base_v1_1_3/redis.py b/ix-dev/community/paperless-ngx/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/paperless-ngx/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/paperless-ngx/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/paperless-ngx/templates/library/base_v1_1_3/resources.py b/ix-dev/community/paperless-ngx/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/paperless-ngx/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/paperless-ngx/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/paperless-ngx/templates/library/base_v1_1_3/security.py b/ix-dev/community/paperless-ngx/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/paperless-ngx/templates/library/base_v1_1_3/security.py rename to ix-dev/community/paperless-ngx/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/paperless-ngx/templates/library/base_v1_1_3/storage.py b/ix-dev/community/paperless-ngx/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/paperless-ngx/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/paperless-ngx/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/paperless-ngx/templates/library/base_v1_1_3/utils.py b/ix-dev/community/paperless-ngx/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/paperless-ngx/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/paperless-ngx/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/passbolt/app.yaml b/ix-dev/community/passbolt/app.yaml index 4b44e7644f..d1369f6eec 100644 --- a/ix-dev/community/passbolt/app.yaml +++ b/ix-dev/community/passbolt/app.yaml @@ -9,8 +9,8 @@ icon: https://media.sys.truenas.net/apps/passbolt/icons/icon.svg keywords: - password - manager -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -37,4 +37,4 @@ sources: - https://www.passbolt.com title: Passbolt train: community -version: 1.0.6 +version: 1.0.7 diff --git a/ix-dev/community/passbolt/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/passbolt/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/community/passbolt/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/passbolt/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/passbolt/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/community/passbolt/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/community/passbolt/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/passbolt/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/passbolt/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/passbolt/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/passbolt/templates/library/base_v1_1_3/environment.py b/ix-dev/community/passbolt/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/passbolt/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/passbolt/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/passbolt/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/community/passbolt/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/community/passbolt/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/passbolt/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/passbolt/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/passbolt/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/passbolt/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/passbolt/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/passbolt/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/passbolt/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/passbolt/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/passbolt/templates/library/base_v1_1_3/network.py b/ix-dev/community/passbolt/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/passbolt/templates/library/base_v1_1_3/network.py rename to ix-dev/community/passbolt/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/passbolt/templates/library/base_v1_1_4/permissions.py b/ix-dev/community/passbolt/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/community/passbolt/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/community/passbolt/templates/library/base_v1_1_3/ports.py b/ix-dev/community/passbolt/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/passbolt/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/passbolt/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/passbolt/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/passbolt/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/passbolt/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/passbolt/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/passbolt/templates/library/base_v1_1_3/redis.py b/ix-dev/community/passbolt/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/passbolt/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/passbolt/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/passbolt/templates/library/base_v1_1_3/resources.py b/ix-dev/community/passbolt/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/passbolt/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/passbolt/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/passbolt/templates/library/base_v1_1_3/security.py b/ix-dev/community/passbolt/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/passbolt/templates/library/base_v1_1_3/security.py rename to ix-dev/community/passbolt/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/passbolt/templates/library/base_v1_1_3/storage.py b/ix-dev/community/passbolt/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/passbolt/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/passbolt/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/passbolt/templates/library/base_v1_1_3/utils.py b/ix-dev/community/passbolt/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/passbolt/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/passbolt/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/pgadmin/app.yaml b/ix-dev/community/pgadmin/app.yaml index 284bcb0a1a..91e254876c 100644 --- a/ix-dev/community/pgadmin/app.yaml +++ b/ix-dev/community/pgadmin/app.yaml @@ -12,8 +12,8 @@ icon: https://media.sys.truenas.net/apps/pgadmin/icons/icon.png keywords: - database - management -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -34,4 +34,4 @@ sources: - https://www.pgadmin.org/ title: pgAdmin train: community -version: 1.0.4 +version: 1.0.5 diff --git a/ix-dev/community/pgadmin/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/pgadmin/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/community/pgadmin/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/pgadmin/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/pgadmin/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/community/pgadmin/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/community/pgadmin/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/pgadmin/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/pgadmin/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/pgadmin/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/pgadmin/templates/library/base_v1_1_3/environment.py b/ix-dev/community/pgadmin/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/pgadmin/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/pgadmin/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/pgadmin/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/community/pgadmin/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/community/pgadmin/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/pgadmin/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/pgadmin/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/pgadmin/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/pgadmin/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/pgadmin/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/pgadmin/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/pgadmin/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/pgadmin/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/pgadmin/templates/library/base_v1_1_3/network.py b/ix-dev/community/pgadmin/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/pgadmin/templates/library/base_v1_1_3/network.py rename to ix-dev/community/pgadmin/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/pgadmin/templates/library/base_v1_1_4/permissions.py b/ix-dev/community/pgadmin/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/community/pgadmin/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/community/pgadmin/templates/library/base_v1_1_3/ports.py b/ix-dev/community/pgadmin/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/pgadmin/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/pgadmin/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/pgadmin/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/pgadmin/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/pgadmin/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/pgadmin/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/pgadmin/templates/library/base_v1_1_3/redis.py b/ix-dev/community/pgadmin/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/pgadmin/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/pgadmin/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/pgadmin/templates/library/base_v1_1_3/resources.py b/ix-dev/community/pgadmin/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/pgadmin/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/pgadmin/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/pgadmin/templates/library/base_v1_1_3/security.py b/ix-dev/community/pgadmin/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/pgadmin/templates/library/base_v1_1_3/security.py rename to ix-dev/community/pgadmin/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/pgadmin/templates/library/base_v1_1_3/storage.py b/ix-dev/community/pgadmin/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/pgadmin/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/pgadmin/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/pgadmin/templates/library/base_v1_1_3/utils.py b/ix-dev/community/pgadmin/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/pgadmin/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/pgadmin/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/pigallery2/app.yaml b/ix-dev/community/pigallery2/app.yaml index 7df3986ede..f9e6a9dd74 100644 --- a/ix-dev/community/pigallery2/app.yaml +++ b/ix-dev/community/pigallery2/app.yaml @@ -10,8 +10,8 @@ icon: https://media.sys.truenas.net/apps/pigallery2/icons/icon.png keywords: - photo - media -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -39,4 +39,4 @@ sources: - https://github.com/bpatrik/pigallery2 title: PiGallery2 train: community -version: 1.0.5 +version: 1.0.6 diff --git a/ix-dev/community/pigallery2/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/pigallery2/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/community/pigallery2/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/pigallery2/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/pigallery2/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/community/pigallery2/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/community/pigallery2/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/pigallery2/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/pigallery2/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/pigallery2/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/pigallery2/templates/library/base_v1_1_3/environment.py b/ix-dev/community/pigallery2/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/pigallery2/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/pigallery2/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/pigallery2/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/community/pigallery2/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/community/pigallery2/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/pigallery2/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/pigallery2/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/pigallery2/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/pigallery2/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/pigallery2/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/pigallery2/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/pigallery2/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/pigallery2/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/pigallery2/templates/library/base_v1_1_3/network.py b/ix-dev/community/pigallery2/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/pigallery2/templates/library/base_v1_1_3/network.py rename to ix-dev/community/pigallery2/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/pigallery2/templates/library/base_v1_1_4/permissions.py b/ix-dev/community/pigallery2/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/community/pigallery2/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/community/pigallery2/templates/library/base_v1_1_3/ports.py b/ix-dev/community/pigallery2/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/pigallery2/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/pigallery2/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/pigallery2/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/pigallery2/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/pigallery2/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/pigallery2/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/pigallery2/templates/library/base_v1_1_3/redis.py b/ix-dev/community/pigallery2/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/pigallery2/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/pigallery2/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/pigallery2/templates/library/base_v1_1_3/resources.py b/ix-dev/community/pigallery2/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/pigallery2/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/pigallery2/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/pigallery2/templates/library/base_v1_1_3/security.py b/ix-dev/community/pigallery2/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/pigallery2/templates/library/base_v1_1_3/security.py rename to ix-dev/community/pigallery2/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/pigallery2/templates/library/base_v1_1_3/storage.py b/ix-dev/community/pigallery2/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/pigallery2/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/pigallery2/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/pigallery2/templates/library/base_v1_1_3/utils.py b/ix-dev/community/pigallery2/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/pigallery2/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/pigallery2/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/piwigo/app.yaml b/ix-dev/community/piwigo/app.yaml index 7474864ccb..62aa6d522f 100644 --- a/ix-dev/community/piwigo/app.yaml +++ b/ix-dev/community/piwigo/app.yaml @@ -22,8 +22,8 @@ icon: https://media.sys.truenas.net/apps/piwigo/icons/icon.svg keywords: - photo - gallery -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -47,4 +47,4 @@ sources: - https://hub.docker.com/r/linuxserver/piwigo title: Piwigo train: community -version: 1.0.5 +version: 1.0.6 diff --git a/ix-dev/community/piwigo/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/piwigo/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/community/piwigo/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/piwigo/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/piwigo/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/community/piwigo/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/community/piwigo/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/piwigo/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/piwigo/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/piwigo/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/piwigo/templates/library/base_v1_1_3/environment.py b/ix-dev/community/piwigo/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/piwigo/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/piwigo/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/piwigo/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/community/piwigo/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/community/piwigo/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/piwigo/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/piwigo/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/piwigo/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/piwigo/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/piwigo/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/piwigo/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/piwigo/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/piwigo/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/piwigo/templates/library/base_v1_1_3/network.py b/ix-dev/community/piwigo/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/piwigo/templates/library/base_v1_1_3/network.py rename to ix-dev/community/piwigo/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/piwigo/templates/library/base_v1_1_4/permissions.py b/ix-dev/community/piwigo/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/community/piwigo/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/community/piwigo/templates/library/base_v1_1_3/ports.py b/ix-dev/community/piwigo/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/piwigo/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/piwigo/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/piwigo/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/piwigo/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/piwigo/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/piwigo/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/piwigo/templates/library/base_v1_1_3/redis.py b/ix-dev/community/piwigo/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/piwigo/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/piwigo/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/piwigo/templates/library/base_v1_1_3/resources.py b/ix-dev/community/piwigo/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/piwigo/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/piwigo/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/piwigo/templates/library/base_v1_1_3/security.py b/ix-dev/community/piwigo/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/piwigo/templates/library/base_v1_1_3/security.py rename to ix-dev/community/piwigo/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/piwigo/templates/library/base_v1_1_3/storage.py b/ix-dev/community/piwigo/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/piwigo/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/piwigo/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/piwigo/templates/library/base_v1_1_3/utils.py b/ix-dev/community/piwigo/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/piwigo/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/piwigo/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/planka/app.yaml b/ix-dev/community/planka/app.yaml index ea51fa2ce6..384be8fa44 100644 --- a/ix-dev/community/planka/app.yaml +++ b/ix-dev/community/planka/app.yaml @@ -10,8 +10,8 @@ keywords: - kanban - project - task -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -35,4 +35,4 @@ sources: - https://github.com/plankanban/planka title: Planka train: community -version: 1.0.10 +version: 1.0.11 diff --git a/ix-dev/community/planka/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/planka/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/community/planka/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/planka/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/planka/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/community/planka/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/community/planka/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/planka/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/planka/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/planka/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/planka/templates/library/base_v1_1_3/environment.py b/ix-dev/community/planka/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/planka/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/planka/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/planka/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/community/planka/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/community/planka/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/planka/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/planka/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/planka/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/planka/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/planka/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/planka/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/planka/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/planka/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/planka/templates/library/base_v1_1_3/network.py b/ix-dev/community/planka/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/planka/templates/library/base_v1_1_3/network.py rename to ix-dev/community/planka/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/planka/templates/library/base_v1_1_4/permissions.py b/ix-dev/community/planka/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/community/planka/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/community/planka/templates/library/base_v1_1_3/ports.py b/ix-dev/community/planka/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/planka/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/planka/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/planka/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/planka/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/planka/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/planka/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/planka/templates/library/base_v1_1_3/redis.py b/ix-dev/community/planka/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/planka/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/planka/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/planka/templates/library/base_v1_1_3/resources.py b/ix-dev/community/planka/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/planka/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/planka/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/planka/templates/library/base_v1_1_3/security.py b/ix-dev/community/planka/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/planka/templates/library/base_v1_1_3/security.py rename to ix-dev/community/planka/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/planka/templates/library/base_v1_1_3/storage.py b/ix-dev/community/planka/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/planka/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/planka/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/planka/templates/library/base_v1_1_3/utils.py b/ix-dev/community/planka/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/planka/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/planka/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/plex-auto-languages/app.yaml b/ix-dev/community/plex-auto-languages/app.yaml index b4e6b5eb26..7410237226 100644 --- a/ix-dev/community/plex-auto-languages/app.yaml +++ b/ix-dev/community/plex-auto-languages/app.yaml @@ -9,8 +9,8 @@ icon: https://media.sys.truenas.net/apps/plex-auto-languages/icons/icon.svg keywords: - plex - languages -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -28,4 +28,4 @@ sources: - https://hub.docker.com/r/remirigal/plex-auto-languages title: Plex Auto Languages train: community -version: 1.0.15 +version: 1.0.16 diff --git a/ix-dev/community/plex-auto-languages/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/plex-auto-languages/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/community/plex-auto-languages/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/plex-auto-languages/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/plex-auto-languages/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/community/plex-auto-languages/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/community/plex-auto-languages/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/plex-auto-languages/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/plex-auto-languages/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/plex-auto-languages/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/plex-auto-languages/templates/library/base_v1_1_3/environment.py b/ix-dev/community/plex-auto-languages/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/plex-auto-languages/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/plex-auto-languages/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/plex-auto-languages/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/community/plex-auto-languages/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/community/plex-auto-languages/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/plex-auto-languages/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/plex-auto-languages/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/plex-auto-languages/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/plex-auto-languages/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/plex-auto-languages/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/plex-auto-languages/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/plex-auto-languages/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/plex-auto-languages/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/plex-auto-languages/templates/library/base_v1_1_3/network.py b/ix-dev/community/plex-auto-languages/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/plex-auto-languages/templates/library/base_v1_1_3/network.py rename to ix-dev/community/plex-auto-languages/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/plex-auto-languages/templates/library/base_v1_1_4/permissions.py b/ix-dev/community/plex-auto-languages/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/community/plex-auto-languages/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/community/plex-auto-languages/templates/library/base_v1_1_3/ports.py b/ix-dev/community/plex-auto-languages/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/plex-auto-languages/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/plex-auto-languages/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/plex-auto-languages/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/plex-auto-languages/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/plex-auto-languages/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/plex-auto-languages/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/plex-auto-languages/templates/library/base_v1_1_3/redis.py b/ix-dev/community/plex-auto-languages/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/plex-auto-languages/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/plex-auto-languages/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/plex-auto-languages/templates/library/base_v1_1_3/resources.py b/ix-dev/community/plex-auto-languages/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/plex-auto-languages/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/plex-auto-languages/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/plex-auto-languages/templates/library/base_v1_1_3/security.py b/ix-dev/community/plex-auto-languages/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/plex-auto-languages/templates/library/base_v1_1_3/security.py rename to ix-dev/community/plex-auto-languages/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/plex-auto-languages/templates/library/base_v1_1_3/storage.py b/ix-dev/community/plex-auto-languages/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/plex-auto-languages/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/plex-auto-languages/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/plex-auto-languages/templates/library/base_v1_1_3/utils.py b/ix-dev/community/plex-auto-languages/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/plex-auto-languages/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/plex-auto-languages/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/portainer/app.yaml b/ix-dev/community/portainer/app.yaml index a86cc6b90e..54e33aebc1 100644 --- a/ix-dev/community/portainer/app.yaml +++ b/ix-dev/community/portainer/app.yaml @@ -28,8 +28,8 @@ keywords: - docker - compose - container -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -49,4 +49,4 @@ sources: - https://github.com/portainer/portainer title: Portainer train: community -version: 1.2.13 +version: 1.2.14 diff --git a/ix-dev/community/portainer/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/portainer/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/community/portainer/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/portainer/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/portainer/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/community/portainer/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/community/portainer/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/portainer/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/portainer/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/portainer/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/portainer/templates/library/base_v1_1_3/environment.py b/ix-dev/community/portainer/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/portainer/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/portainer/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/portainer/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/community/portainer/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/community/portainer/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/portainer/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/portainer/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/portainer/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/portainer/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/portainer/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/portainer/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/portainer/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/portainer/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/portainer/templates/library/base_v1_1_3/network.py b/ix-dev/community/portainer/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/portainer/templates/library/base_v1_1_3/network.py rename to ix-dev/community/portainer/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/portainer/templates/library/base_v1_1_4/permissions.py b/ix-dev/community/portainer/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/community/portainer/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/community/portainer/templates/library/base_v1_1_3/ports.py b/ix-dev/community/portainer/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/portainer/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/portainer/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/portainer/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/portainer/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/portainer/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/portainer/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/portainer/templates/library/base_v1_1_3/redis.py b/ix-dev/community/portainer/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/portainer/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/portainer/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/portainer/templates/library/base_v1_1_3/resources.py b/ix-dev/community/portainer/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/portainer/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/portainer/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/portainer/templates/library/base_v1_1_3/security.py b/ix-dev/community/portainer/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/portainer/templates/library/base_v1_1_3/security.py rename to ix-dev/community/portainer/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/portainer/templates/library/base_v1_1_3/storage.py b/ix-dev/community/portainer/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/portainer/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/portainer/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/portainer/templates/library/base_v1_1_3/utils.py b/ix-dev/community/portainer/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/portainer/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/portainer/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/prowlarr/app.yaml b/ix-dev/community/prowlarr/app.yaml index 98ca504136..f9ed28e38b 100644 --- a/ix-dev/community/prowlarr/app.yaml +++ b/ix-dev/community/prowlarr/app.yaml @@ -9,8 +9,8 @@ host_mounts: [] icon: https://media.sys.truenas.net/apps/prowlarr/icons/icon.png keywords: - indexer -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -29,4 +29,4 @@ sources: - https://prowlarr.com title: Prowlarr train: community -version: 1.2.12 +version: 1.2.13 diff --git a/ix-dev/community/prowlarr/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/prowlarr/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/community/prowlarr/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/prowlarr/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/prowlarr/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/community/prowlarr/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/community/prowlarr/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/prowlarr/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/prowlarr/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/prowlarr/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/prowlarr/templates/library/base_v1_1_3/environment.py b/ix-dev/community/prowlarr/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/prowlarr/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/prowlarr/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/prowlarr/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/community/prowlarr/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/community/prowlarr/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/prowlarr/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/prowlarr/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/prowlarr/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/prowlarr/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/prowlarr/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/prowlarr/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/prowlarr/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/prowlarr/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/prowlarr/templates/library/base_v1_1_3/network.py b/ix-dev/community/prowlarr/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/prowlarr/templates/library/base_v1_1_3/network.py rename to ix-dev/community/prowlarr/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/prowlarr/templates/library/base_v1_1_4/permissions.py b/ix-dev/community/prowlarr/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/community/prowlarr/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/community/prowlarr/templates/library/base_v1_1_3/ports.py b/ix-dev/community/prowlarr/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/prowlarr/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/prowlarr/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/prowlarr/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/prowlarr/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/prowlarr/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/prowlarr/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/prowlarr/templates/library/base_v1_1_3/redis.py b/ix-dev/community/prowlarr/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/prowlarr/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/prowlarr/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/prowlarr/templates/library/base_v1_1_3/resources.py b/ix-dev/community/prowlarr/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/prowlarr/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/prowlarr/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/prowlarr/templates/library/base_v1_1_3/security.py b/ix-dev/community/prowlarr/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/prowlarr/templates/library/base_v1_1_3/security.py rename to ix-dev/community/prowlarr/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/prowlarr/templates/library/base_v1_1_3/storage.py b/ix-dev/community/prowlarr/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/prowlarr/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/prowlarr/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/prowlarr/templates/library/base_v1_1_3/utils.py b/ix-dev/community/prowlarr/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/prowlarr/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/prowlarr/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/qbittorrent/app.yaml b/ix-dev/community/qbittorrent/app.yaml index fdac7a6860..adc1ccdc69 100644 --- a/ix-dev/community/qbittorrent/app.yaml +++ b/ix-dev/community/qbittorrent/app.yaml @@ -11,8 +11,8 @@ keywords: - media - torrent - download -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -31,4 +31,4 @@ sources: - https://www.qbittorrent.org/ title: qBittorrent train: community -version: 1.0.27 +version: 1.0.28 diff --git a/ix-dev/community/qbittorrent/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/qbittorrent/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/community/qbittorrent/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/qbittorrent/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/qbittorrent/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/community/qbittorrent/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/community/qbittorrent/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/qbittorrent/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/qbittorrent/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/qbittorrent/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/qbittorrent/templates/library/base_v1_1_3/environment.py b/ix-dev/community/qbittorrent/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/qbittorrent/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/qbittorrent/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/qbittorrent/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/community/qbittorrent/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/community/qbittorrent/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/qbittorrent/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/qbittorrent/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/qbittorrent/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/qbittorrent/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/qbittorrent/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/qbittorrent/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/qbittorrent/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/qbittorrent/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/qbittorrent/templates/library/base_v1_1_3/network.py b/ix-dev/community/qbittorrent/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/qbittorrent/templates/library/base_v1_1_3/network.py rename to ix-dev/community/qbittorrent/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/qbittorrent/templates/library/base_v1_1_4/permissions.py b/ix-dev/community/qbittorrent/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/community/qbittorrent/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/community/qbittorrent/templates/library/base_v1_1_3/ports.py b/ix-dev/community/qbittorrent/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/qbittorrent/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/qbittorrent/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/qbittorrent/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/qbittorrent/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/qbittorrent/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/qbittorrent/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/qbittorrent/templates/library/base_v1_1_3/redis.py b/ix-dev/community/qbittorrent/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/qbittorrent/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/qbittorrent/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/qbittorrent/templates/library/base_v1_1_3/resources.py b/ix-dev/community/qbittorrent/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/qbittorrent/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/qbittorrent/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/qbittorrent/templates/library/base_v1_1_3/security.py b/ix-dev/community/qbittorrent/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/qbittorrent/templates/library/base_v1_1_3/security.py rename to ix-dev/community/qbittorrent/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/qbittorrent/templates/library/base_v1_1_3/storage.py b/ix-dev/community/qbittorrent/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/qbittorrent/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/qbittorrent/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/qbittorrent/templates/library/base_v1_1_3/utils.py b/ix-dev/community/qbittorrent/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/qbittorrent/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/qbittorrent/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/radarr/app.yaml b/ix-dev/community/radarr/app.yaml index 20b1d017f2..2b20465546 100644 --- a/ix-dev/community/radarr/app.yaml +++ b/ix-dev/community/radarr/app.yaml @@ -9,8 +9,8 @@ icon: https://media.sys.truenas.net/apps/radarr/icons/icon.png keywords: - media - movies -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -32,4 +32,4 @@ sources: - https://github.com/Radarr/Radarr title: Radarr train: community -version: 1.1.11 +version: 1.1.12 diff --git a/ix-dev/community/radarr/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/radarr/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/community/radarr/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/radarr/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/radarr/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/community/radarr/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/community/radarr/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/radarr/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/radarr/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/radarr/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/radarr/templates/library/base_v1_1_3/environment.py b/ix-dev/community/radarr/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/radarr/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/radarr/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/radarr/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/community/radarr/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/community/radarr/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/radarr/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/radarr/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/radarr/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/radarr/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/radarr/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/radarr/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/radarr/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/radarr/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/radarr/templates/library/base_v1_1_3/network.py b/ix-dev/community/radarr/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/radarr/templates/library/base_v1_1_3/network.py rename to ix-dev/community/radarr/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/radarr/templates/library/base_v1_1_4/permissions.py b/ix-dev/community/radarr/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/community/radarr/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/community/radarr/templates/library/base_v1_1_3/ports.py b/ix-dev/community/radarr/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/radarr/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/radarr/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/radarr/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/radarr/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/radarr/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/radarr/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/radarr/templates/library/base_v1_1_3/redis.py b/ix-dev/community/radarr/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/radarr/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/radarr/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/radarr/templates/library/base_v1_1_3/resources.py b/ix-dev/community/radarr/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/radarr/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/radarr/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/radarr/templates/library/base_v1_1_3/security.py b/ix-dev/community/radarr/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/radarr/templates/library/base_v1_1_3/security.py rename to ix-dev/community/radarr/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/radarr/templates/library/base_v1_1_3/storage.py b/ix-dev/community/radarr/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/radarr/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/radarr/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/radarr/templates/library/base_v1_1_3/utils.py b/ix-dev/community/radarr/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/radarr/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/radarr/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/readarr/app.yaml b/ix-dev/community/readarr/app.yaml index b0032c353a..dda961b817 100644 --- a/ix-dev/community/readarr/app.yaml +++ b/ix-dev/community/readarr/app.yaml @@ -11,8 +11,8 @@ keywords: - media - ebook - audiobook -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -33,4 +33,4 @@ sources: - https://github.com/Readarr/Readarr title: Readarr train: community -version: 1.0.18 +version: 1.0.19 diff --git a/ix-dev/community/readarr/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/readarr/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/community/readarr/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/readarr/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/readarr/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/community/readarr/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/community/readarr/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/readarr/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/readarr/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/readarr/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/readarr/templates/library/base_v1_1_3/environment.py b/ix-dev/community/readarr/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/readarr/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/readarr/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/readarr/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/community/readarr/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/community/readarr/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/readarr/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/readarr/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/readarr/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/readarr/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/readarr/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/readarr/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/readarr/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/readarr/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/readarr/templates/library/base_v1_1_3/network.py b/ix-dev/community/readarr/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/readarr/templates/library/base_v1_1_3/network.py rename to ix-dev/community/readarr/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/readarr/templates/library/base_v1_1_4/permissions.py b/ix-dev/community/readarr/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/community/readarr/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/community/readarr/templates/library/base_v1_1_3/ports.py b/ix-dev/community/readarr/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/readarr/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/readarr/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/readarr/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/readarr/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/readarr/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/readarr/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/readarr/templates/library/base_v1_1_3/redis.py b/ix-dev/community/readarr/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/readarr/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/readarr/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/readarr/templates/library/base_v1_1_3/resources.py b/ix-dev/community/readarr/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/readarr/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/readarr/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/readarr/templates/library/base_v1_1_3/security.py b/ix-dev/community/readarr/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/readarr/templates/library/base_v1_1_3/security.py rename to ix-dev/community/readarr/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/readarr/templates/library/base_v1_1_3/storage.py b/ix-dev/community/readarr/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/readarr/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/readarr/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/readarr/templates/library/base_v1_1_3/utils.py b/ix-dev/community/readarr/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/readarr/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/readarr/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/recyclarr/app.yaml b/ix-dev/community/recyclarr/app.yaml index eb9122d4ed..c69360f58e 100644 --- a/ix-dev/community/recyclarr/app.yaml +++ b/ix-dev/community/recyclarr/app.yaml @@ -11,8 +11,8 @@ keywords: - sync - sonarr - radarr -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -30,4 +30,4 @@ sources: - https://github.com/recyclarr/recyclarr/tree/recyclarr title: Recyclarr train: community -version: 1.0.7 +version: 1.0.8 diff --git a/ix-dev/community/recyclarr/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/recyclarr/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/community/recyclarr/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/recyclarr/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/recyclarr/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/community/recyclarr/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/community/recyclarr/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/recyclarr/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/recyclarr/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/recyclarr/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/recyclarr/templates/library/base_v1_1_3/environment.py b/ix-dev/community/recyclarr/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/recyclarr/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/recyclarr/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/recyclarr/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/community/recyclarr/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/community/recyclarr/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/recyclarr/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/recyclarr/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/recyclarr/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/recyclarr/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/recyclarr/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/recyclarr/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/recyclarr/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/recyclarr/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/recyclarr/templates/library/base_v1_1_3/network.py b/ix-dev/community/recyclarr/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/recyclarr/templates/library/base_v1_1_3/network.py rename to ix-dev/community/recyclarr/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/recyclarr/templates/library/base_v1_1_4/permissions.py b/ix-dev/community/recyclarr/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/community/recyclarr/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/community/recyclarr/templates/library/base_v1_1_3/ports.py b/ix-dev/community/recyclarr/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/recyclarr/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/recyclarr/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/recyclarr/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/recyclarr/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/recyclarr/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/recyclarr/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/recyclarr/templates/library/base_v1_1_3/redis.py b/ix-dev/community/recyclarr/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/recyclarr/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/recyclarr/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/recyclarr/templates/library/base_v1_1_3/resources.py b/ix-dev/community/recyclarr/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/recyclarr/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/recyclarr/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/recyclarr/templates/library/base_v1_1_3/security.py b/ix-dev/community/recyclarr/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/recyclarr/templates/library/base_v1_1_3/security.py rename to ix-dev/community/recyclarr/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/recyclarr/templates/library/base_v1_1_3/storage.py b/ix-dev/community/recyclarr/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/recyclarr/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/recyclarr/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/recyclarr/templates/library/base_v1_1_3/utils.py b/ix-dev/community/recyclarr/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/recyclarr/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/recyclarr/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/redis/app.yaml b/ix-dev/community/redis/app.yaml index b805989fbc..43e445b7ca 100644 --- a/ix-dev/community/redis/app.yaml +++ b/ix-dev/community/redis/app.yaml @@ -9,8 +9,8 @@ host_mounts: [] icon: https://media.sys.truenas.net/apps/redis/icons/icon.png keywords: - cache -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -29,4 +29,4 @@ sources: - https://redis.io/ title: Redis train: community -version: 1.0.6 +version: 1.0.7 diff --git a/ix-dev/community/redis/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/redis/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/community/redis/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/redis/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/redis/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/community/redis/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/community/redis/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/redis/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/redis/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/redis/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/redis/templates/library/base_v1_1_3/environment.py b/ix-dev/community/redis/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/redis/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/redis/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/redis/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/community/redis/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/community/redis/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/redis/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/redis/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/redis/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/redis/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/redis/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/redis/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/redis/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/redis/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/redis/templates/library/base_v1_1_3/network.py b/ix-dev/community/redis/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/redis/templates/library/base_v1_1_3/network.py rename to ix-dev/community/redis/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/redis/templates/library/base_v1_1_4/permissions.py b/ix-dev/community/redis/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/community/redis/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/community/redis/templates/library/base_v1_1_3/ports.py b/ix-dev/community/redis/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/redis/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/redis/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/redis/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/redis/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/redis/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/redis/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/redis/templates/library/base_v1_1_3/redis.py b/ix-dev/community/redis/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/redis/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/redis/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/redis/templates/library/base_v1_1_3/resources.py b/ix-dev/community/redis/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/redis/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/redis/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/redis/templates/library/base_v1_1_3/security.py b/ix-dev/community/redis/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/redis/templates/library/base_v1_1_3/security.py rename to ix-dev/community/redis/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/redis/templates/library/base_v1_1_3/storage.py b/ix-dev/community/redis/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/redis/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/redis/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/redis/templates/library/base_v1_1_3/utils.py b/ix-dev/community/redis/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/redis/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/redis/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/roundcube/app.yaml b/ix-dev/community/roundcube/app.yaml index a1d562a34a..b93f4047ef 100644 --- a/ix-dev/community/roundcube/app.yaml +++ b/ix-dev/community/roundcube/app.yaml @@ -20,8 +20,8 @@ icon: https://media.sys.truenas.net/apps/roundcube/icons/icon.png keywords: - webmail - email -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -49,4 +49,4 @@ sources: - https://hub.docker.com/r/roundcube/roundcubemail/ title: Roundcube train: community -version: 1.0.6 +version: 1.0.7 diff --git a/ix-dev/community/roundcube/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/roundcube/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/community/roundcube/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/roundcube/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/roundcube/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/community/roundcube/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/community/roundcube/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/roundcube/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/roundcube/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/roundcube/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/roundcube/templates/library/base_v1_1_3/environment.py b/ix-dev/community/roundcube/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/roundcube/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/roundcube/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/roundcube/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/community/roundcube/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/community/roundcube/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/roundcube/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/roundcube/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/roundcube/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/roundcube/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/roundcube/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/roundcube/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/roundcube/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/roundcube/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/roundcube/templates/library/base_v1_1_3/network.py b/ix-dev/community/roundcube/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/roundcube/templates/library/base_v1_1_3/network.py rename to ix-dev/community/roundcube/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/roundcube/templates/library/base_v1_1_4/permissions.py b/ix-dev/community/roundcube/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/community/roundcube/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/community/roundcube/templates/library/base_v1_1_3/ports.py b/ix-dev/community/roundcube/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/roundcube/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/roundcube/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/roundcube/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/roundcube/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/roundcube/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/roundcube/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/roundcube/templates/library/base_v1_1_3/redis.py b/ix-dev/community/roundcube/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/roundcube/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/roundcube/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/roundcube/templates/library/base_v1_1_3/resources.py b/ix-dev/community/roundcube/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/roundcube/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/roundcube/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/roundcube/templates/library/base_v1_1_3/security.py b/ix-dev/community/roundcube/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/roundcube/templates/library/base_v1_1_3/security.py rename to ix-dev/community/roundcube/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/roundcube/templates/library/base_v1_1_3/storage.py b/ix-dev/community/roundcube/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/roundcube/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/roundcube/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/roundcube/templates/library/base_v1_1_3/utils.py b/ix-dev/community/roundcube/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/roundcube/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/roundcube/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/rsyncd/app.yaml b/ix-dev/community/rsyncd/app.yaml index 2d09066674..2482e35b4e 100644 --- a/ix-dev/community/rsyncd/app.yaml +++ b/ix-dev/community/rsyncd/app.yaml @@ -22,8 +22,8 @@ keywords: - sync - rsync - file transfer -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -41,4 +41,4 @@ sources: - https://hub.docker.com/r/ixsystems/rsyncd title: Rsync Daemon train: community -version: 1.0.13 +version: 1.0.14 diff --git a/ix-dev/community/rsyncd/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/rsyncd/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/community/rsyncd/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/rsyncd/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/rsyncd/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/community/rsyncd/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/community/rsyncd/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/rsyncd/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/rsyncd/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/rsyncd/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/rsyncd/templates/library/base_v1_1_3/environment.py b/ix-dev/community/rsyncd/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/rsyncd/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/rsyncd/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/rsyncd/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/community/rsyncd/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/community/rsyncd/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/rsyncd/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/rsyncd/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/rsyncd/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/rsyncd/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/rsyncd/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/rsyncd/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/rsyncd/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/rsyncd/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/rsyncd/templates/library/base_v1_1_3/network.py b/ix-dev/community/rsyncd/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/rsyncd/templates/library/base_v1_1_3/network.py rename to ix-dev/community/rsyncd/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/rsyncd/templates/library/base_v1_1_4/permissions.py b/ix-dev/community/rsyncd/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/community/rsyncd/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/community/rsyncd/templates/library/base_v1_1_3/ports.py b/ix-dev/community/rsyncd/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/rsyncd/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/rsyncd/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/rsyncd/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/rsyncd/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/rsyncd/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/rsyncd/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/rsyncd/templates/library/base_v1_1_3/redis.py b/ix-dev/community/rsyncd/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/rsyncd/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/rsyncd/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/rsyncd/templates/library/base_v1_1_3/resources.py b/ix-dev/community/rsyncd/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/rsyncd/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/rsyncd/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/rsyncd/templates/library/base_v1_1_3/security.py b/ix-dev/community/rsyncd/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/rsyncd/templates/library/base_v1_1_3/security.py rename to ix-dev/community/rsyncd/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/rsyncd/templates/library/base_v1_1_3/storage.py b/ix-dev/community/rsyncd/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/rsyncd/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/rsyncd/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/rsyncd/templates/library/base_v1_1_3/utils.py b/ix-dev/community/rsyncd/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/rsyncd/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/rsyncd/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/rust-desk/app.yaml b/ix-dev/community/rust-desk/app.yaml index fe973abdd6..fa4f5be738 100644 --- a/ix-dev/community/rust-desk/app.yaml +++ b/ix-dev/community/rust-desk/app.yaml @@ -9,8 +9,8 @@ icon: https://media.sys.truenas.net/apps/rust-desk/icons/icon.png keywords: - remote - desktop -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -28,4 +28,4 @@ sources: - https://github.com/rustdesk/rustdesk-server title: Rust Desk train: community -version: 1.0.6 +version: 1.0.7 diff --git a/ix-dev/community/rust-desk/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/rust-desk/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/community/rust-desk/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/rust-desk/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/rust-desk/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/community/rust-desk/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/community/rust-desk/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/rust-desk/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/rust-desk/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/rust-desk/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/rust-desk/templates/library/base_v1_1_3/environment.py b/ix-dev/community/rust-desk/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/rust-desk/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/rust-desk/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/rust-desk/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/community/rust-desk/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/community/rust-desk/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/rust-desk/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/rust-desk/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/rust-desk/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/rust-desk/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/rust-desk/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/rust-desk/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/rust-desk/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/rust-desk/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/rust-desk/templates/library/base_v1_1_3/network.py b/ix-dev/community/rust-desk/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/rust-desk/templates/library/base_v1_1_3/network.py rename to ix-dev/community/rust-desk/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/rust-desk/templates/library/base_v1_1_4/permissions.py b/ix-dev/community/rust-desk/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/community/rust-desk/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/community/rust-desk/templates/library/base_v1_1_3/ports.py b/ix-dev/community/rust-desk/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/rust-desk/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/rust-desk/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/rust-desk/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/rust-desk/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/rust-desk/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/rust-desk/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/rust-desk/templates/library/base_v1_1_3/redis.py b/ix-dev/community/rust-desk/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/rust-desk/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/rust-desk/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/rust-desk/templates/library/base_v1_1_3/resources.py b/ix-dev/community/rust-desk/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/rust-desk/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/rust-desk/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/rust-desk/templates/library/base_v1_1_3/security.py b/ix-dev/community/rust-desk/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/rust-desk/templates/library/base_v1_1_3/security.py rename to ix-dev/community/rust-desk/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/rust-desk/templates/library/base_v1_1_3/storage.py b/ix-dev/community/rust-desk/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/rust-desk/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/rust-desk/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/rust-desk/templates/library/base_v1_1_3/utils.py b/ix-dev/community/rust-desk/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/rust-desk/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/rust-desk/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/sabnzbd/app.yaml b/ix-dev/community/sabnzbd/app.yaml index f4c8a79940..645955f4f9 100644 --- a/ix-dev/community/sabnzbd/app.yaml +++ b/ix-dev/community/sabnzbd/app.yaml @@ -10,8 +10,8 @@ keywords: - media - usenet - newsreader -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -32,4 +32,4 @@ sources: - https://sabnzbd.org/ title: SABnzbd train: community -version: 1.0.6 +version: 1.0.7 diff --git a/ix-dev/community/sabnzbd/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/sabnzbd/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/community/sabnzbd/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/sabnzbd/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/sabnzbd/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/community/sabnzbd/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/community/sabnzbd/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/sabnzbd/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/sabnzbd/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/sabnzbd/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/sabnzbd/templates/library/base_v1_1_3/environment.py b/ix-dev/community/sabnzbd/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/sabnzbd/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/sabnzbd/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/sabnzbd/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/community/sabnzbd/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/community/sabnzbd/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/sabnzbd/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/sabnzbd/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/sabnzbd/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/sabnzbd/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/sabnzbd/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/sabnzbd/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/sabnzbd/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/sabnzbd/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/sabnzbd/templates/library/base_v1_1_3/network.py b/ix-dev/community/sabnzbd/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/sabnzbd/templates/library/base_v1_1_3/network.py rename to ix-dev/community/sabnzbd/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/sabnzbd/templates/library/base_v1_1_4/permissions.py b/ix-dev/community/sabnzbd/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/community/sabnzbd/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/community/sabnzbd/templates/library/base_v1_1_3/ports.py b/ix-dev/community/sabnzbd/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/sabnzbd/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/sabnzbd/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/sabnzbd/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/sabnzbd/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/sabnzbd/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/sabnzbd/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/sabnzbd/templates/library/base_v1_1_3/redis.py b/ix-dev/community/sabnzbd/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/sabnzbd/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/sabnzbd/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/sabnzbd/templates/library/base_v1_1_3/resources.py b/ix-dev/community/sabnzbd/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/sabnzbd/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/sabnzbd/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/sabnzbd/templates/library/base_v1_1_3/security.py b/ix-dev/community/sabnzbd/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/sabnzbd/templates/library/base_v1_1_3/security.py rename to ix-dev/community/sabnzbd/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/sabnzbd/templates/library/base_v1_1_3/storage.py b/ix-dev/community/sabnzbd/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/sabnzbd/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/sabnzbd/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/sabnzbd/templates/library/base_v1_1_3/utils.py b/ix-dev/community/sabnzbd/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/sabnzbd/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/sabnzbd/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/searxng/app.yaml b/ix-dev/community/searxng/app.yaml index 1c83a3ece4..2e1078f4f5 100644 --- a/ix-dev/community/searxng/app.yaml +++ b/ix-dev/community/searxng/app.yaml @@ -12,8 +12,8 @@ host_mounts: [] icon: https://media.sys.truenas.net/apps/searxng/icons/icon.svg keywords: - search -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -31,4 +31,4 @@ sources: - https://github.com/searxng/searxng title: SearXNG train: community -version: 1.0.15 +version: 1.0.16 diff --git a/ix-dev/community/searxng/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/searxng/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/community/searxng/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/searxng/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/searxng/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/community/searxng/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/community/searxng/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/searxng/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/searxng/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/searxng/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/searxng/templates/library/base_v1_1_3/environment.py b/ix-dev/community/searxng/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/searxng/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/searxng/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/searxng/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/community/searxng/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/community/searxng/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/searxng/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/searxng/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/searxng/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/searxng/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/searxng/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/searxng/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/searxng/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/searxng/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/searxng/templates/library/base_v1_1_3/network.py b/ix-dev/community/searxng/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/searxng/templates/library/base_v1_1_3/network.py rename to ix-dev/community/searxng/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/searxng/templates/library/base_v1_1_4/permissions.py b/ix-dev/community/searxng/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/community/searxng/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/community/searxng/templates/library/base_v1_1_3/ports.py b/ix-dev/community/searxng/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/searxng/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/searxng/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/searxng/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/searxng/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/searxng/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/searxng/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/searxng/templates/library/base_v1_1_3/redis.py b/ix-dev/community/searxng/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/searxng/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/searxng/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/searxng/templates/library/base_v1_1_3/resources.py b/ix-dev/community/searxng/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/searxng/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/searxng/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/searxng/templates/library/base_v1_1_3/security.py b/ix-dev/community/searxng/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/searxng/templates/library/base_v1_1_3/security.py rename to ix-dev/community/searxng/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/searxng/templates/library/base_v1_1_3/storage.py b/ix-dev/community/searxng/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/searxng/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/searxng/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/searxng/templates/library/base_v1_1_3/utils.py b/ix-dev/community/searxng/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/searxng/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/searxng/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/sftpgo/app.yaml b/ix-dev/community/sftpgo/app.yaml index 8f274b09d7..a6d43ce69e 100644 --- a/ix-dev/community/sftpgo/app.yaml +++ b/ix-dev/community/sftpgo/app.yaml @@ -9,8 +9,8 @@ host_mounts: [] icon: https://media.sys.truenas.net/apps/sftpgo/icons/icon.png keywords: - sftp -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -28,4 +28,4 @@ sources: - https://github.com/drakkan/sftpgo title: SFTPGo train: community -version: 1.0.6 +version: 1.0.7 diff --git a/ix-dev/community/sftpgo/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/sftpgo/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/community/sftpgo/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/sftpgo/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/sftpgo/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/community/sftpgo/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/community/sftpgo/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/sftpgo/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/sftpgo/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/sftpgo/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/sftpgo/templates/library/base_v1_1_3/environment.py b/ix-dev/community/sftpgo/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/sftpgo/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/sftpgo/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/sftpgo/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/community/sftpgo/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/community/sftpgo/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/sftpgo/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/sftpgo/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/sftpgo/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/sftpgo/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/sftpgo/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/sftpgo/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/sftpgo/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/sftpgo/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/sftpgo/templates/library/base_v1_1_3/network.py b/ix-dev/community/sftpgo/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/sftpgo/templates/library/base_v1_1_3/network.py rename to ix-dev/community/sftpgo/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/sftpgo/templates/library/base_v1_1_4/permissions.py b/ix-dev/community/sftpgo/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/community/sftpgo/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/community/sftpgo/templates/library/base_v1_1_3/ports.py b/ix-dev/community/sftpgo/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/sftpgo/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/sftpgo/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/sftpgo/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/sftpgo/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/sftpgo/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/sftpgo/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/sftpgo/templates/library/base_v1_1_3/redis.py b/ix-dev/community/sftpgo/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/sftpgo/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/sftpgo/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/sftpgo/templates/library/base_v1_1_3/resources.py b/ix-dev/community/sftpgo/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/sftpgo/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/sftpgo/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/sftpgo/templates/library/base_v1_1_3/security.py b/ix-dev/community/sftpgo/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/sftpgo/templates/library/base_v1_1_3/security.py rename to ix-dev/community/sftpgo/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/sftpgo/templates/library/base_v1_1_3/storage.py b/ix-dev/community/sftpgo/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/sftpgo/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/sftpgo/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/sftpgo/templates/library/base_v1_1_3/utils.py b/ix-dev/community/sftpgo/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/sftpgo/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/sftpgo/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/sonarr/app.yaml b/ix-dev/community/sonarr/app.yaml index b17d0ff8ed..3af2babe7b 100644 --- a/ix-dev/community/sonarr/app.yaml +++ b/ix-dev/community/sonarr/app.yaml @@ -9,8 +9,8 @@ icon: https://media.sys.truenas.net/apps/sonarr/icons/icon.png keywords: - media - series -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -31,4 +31,4 @@ sources: - https://github.com/Sonarr/Sonarr title: Sonarr train: community -version: 1.0.18 +version: 1.0.19 diff --git a/ix-dev/community/sonarr/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/sonarr/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/community/sonarr/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/sonarr/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/sonarr/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/community/sonarr/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/community/sonarr/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/sonarr/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/sonarr/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/sonarr/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/sonarr/templates/library/base_v1_1_3/environment.py b/ix-dev/community/sonarr/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/sonarr/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/sonarr/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/sonarr/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/community/sonarr/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/community/sonarr/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/sonarr/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/sonarr/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/sonarr/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/sonarr/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/sonarr/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/sonarr/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/sonarr/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/sonarr/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/sonarr/templates/library/base_v1_1_3/network.py b/ix-dev/community/sonarr/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/sonarr/templates/library/base_v1_1_3/network.py rename to ix-dev/community/sonarr/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/sonarr/templates/library/base_v1_1_4/permissions.py b/ix-dev/community/sonarr/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/community/sonarr/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/community/sonarr/templates/library/base_v1_1_3/ports.py b/ix-dev/community/sonarr/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/sonarr/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/sonarr/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/sonarr/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/sonarr/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/sonarr/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/sonarr/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/sonarr/templates/library/base_v1_1_3/redis.py b/ix-dev/community/sonarr/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/sonarr/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/sonarr/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/sonarr/templates/library/base_v1_1_3/resources.py b/ix-dev/community/sonarr/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/sonarr/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/sonarr/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/sonarr/templates/library/base_v1_1_3/security.py b/ix-dev/community/sonarr/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/sonarr/templates/library/base_v1_1_3/security.py rename to ix-dev/community/sonarr/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/sonarr/templates/library/base_v1_1_3/storage.py b/ix-dev/community/sonarr/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/sonarr/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/sonarr/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/sonarr/templates/library/base_v1_1_3/utils.py b/ix-dev/community/sonarr/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/sonarr/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/sonarr/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/tailscale/app.yaml b/ix-dev/community/tailscale/app.yaml index e208c56025..eb27eee6bc 100644 --- a/ix-dev/community/tailscale/app.yaml +++ b/ix-dev/community/tailscale/app.yaml @@ -23,8 +23,8 @@ icon: https://media.sys.truenas.net/apps/tailscale/icons/icon.png keywords: - vpn - tailscale -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -42,4 +42,4 @@ sources: - https://hub.docker.com/r/tailscale/tailscale title: Tailscale train: community -version: 1.1.14 +version: 1.1.15 diff --git a/ix-dev/community/tailscale/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/tailscale/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/community/tailscale/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/tailscale/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/tailscale/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/community/tailscale/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/community/tailscale/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/tailscale/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/tailscale/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/tailscale/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/tailscale/templates/library/base_v1_1_3/environment.py b/ix-dev/community/tailscale/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/tailscale/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/tailscale/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/tailscale/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/community/tailscale/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/community/tailscale/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/tailscale/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/tailscale/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/tailscale/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/tailscale/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/tailscale/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/tailscale/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/tailscale/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/tailscale/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/tailscale/templates/library/base_v1_1_3/network.py b/ix-dev/community/tailscale/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/tailscale/templates/library/base_v1_1_3/network.py rename to ix-dev/community/tailscale/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/tailscale/templates/library/base_v1_1_4/permissions.py b/ix-dev/community/tailscale/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/community/tailscale/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/community/tailscale/templates/library/base_v1_1_3/ports.py b/ix-dev/community/tailscale/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/tailscale/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/tailscale/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/tailscale/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/tailscale/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/tailscale/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/tailscale/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/tailscale/templates/library/base_v1_1_3/redis.py b/ix-dev/community/tailscale/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/tailscale/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/tailscale/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/tailscale/templates/library/base_v1_1_3/resources.py b/ix-dev/community/tailscale/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/tailscale/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/tailscale/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/tailscale/templates/library/base_v1_1_3/security.py b/ix-dev/community/tailscale/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/tailscale/templates/library/base_v1_1_3/security.py rename to ix-dev/community/tailscale/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/tailscale/templates/library/base_v1_1_3/storage.py b/ix-dev/community/tailscale/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/tailscale/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/tailscale/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/tailscale/templates/library/base_v1_1_3/utils.py b/ix-dev/community/tailscale/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/tailscale/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/tailscale/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/tailscale/templates/library/community/tailscale/v1_1_14/util.py b/ix-dev/community/tailscale/templates/library/community/tailscale/v1_1_15/util.py similarity index 93% rename from ix-dev/community/tailscale/templates/library/community/tailscale/v1_1_14/util.py rename to ix-dev/community/tailscale/templates/library/community/tailscale/v1_1_15/util.py index 505f3e72fc..c0ce1e2517 100644 --- a/ix-dev/community/tailscale/templates/library/community/tailscale/v1_1_14/util.py +++ b/ix-dev/community/tailscale/templates/library/community/tailscale/v1_1_15/util.py @@ -1,4 +1,4 @@ -from base_v1_1_3 import utils +from base_v1_1_4 import utils def get_args(data): diff --git a/ix-dev/community/tautulli/app.yaml b/ix-dev/community/tautulli/app.yaml index 6129e268d9..a82e67cd97 100644 --- a/ix-dev/community/tautulli/app.yaml +++ b/ix-dev/community/tautulli/app.yaml @@ -11,8 +11,8 @@ keywords: - media - analytics - notifications -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -34,4 +34,4 @@ sources: - https://github.com/Tautulli/Tautulli title: Tautulli train: community -version: 1.0.20 +version: 1.0.21 diff --git a/ix-dev/community/tautulli/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/tautulli/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/community/tautulli/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/tautulli/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/tautulli/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/community/tautulli/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/community/tautulli/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/tautulli/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/tautulli/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/tautulli/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/tautulli/templates/library/base_v1_1_3/environment.py b/ix-dev/community/tautulli/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/tautulli/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/tautulli/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/tautulli/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/community/tautulli/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/community/tautulli/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/tautulli/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/tautulli/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/tautulli/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/tautulli/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/tautulli/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/tautulli/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/tautulli/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/tautulli/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/tautulli/templates/library/base_v1_1_3/network.py b/ix-dev/community/tautulli/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/tautulli/templates/library/base_v1_1_3/network.py rename to ix-dev/community/tautulli/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/tautulli/templates/library/base_v1_1_4/permissions.py b/ix-dev/community/tautulli/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/community/tautulli/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/community/tautulli/templates/library/base_v1_1_3/ports.py b/ix-dev/community/tautulli/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/tautulli/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/tautulli/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/tautulli/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/tautulli/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/tautulli/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/tautulli/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/tautulli/templates/library/base_v1_1_3/redis.py b/ix-dev/community/tautulli/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/tautulli/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/tautulli/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/tautulli/templates/library/base_v1_1_3/resources.py b/ix-dev/community/tautulli/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/tautulli/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/tautulli/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/tautulli/templates/library/base_v1_1_3/security.py b/ix-dev/community/tautulli/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/tautulli/templates/library/base_v1_1_3/security.py rename to ix-dev/community/tautulli/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/tautulli/templates/library/base_v1_1_3/storage.py b/ix-dev/community/tautulli/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/tautulli/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/tautulli/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/tautulli/templates/library/base_v1_1_3/utils.py b/ix-dev/community/tautulli/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/tautulli/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/tautulli/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/tdarr/app.yaml b/ix-dev/community/tdarr/app.yaml index ee056c546c..6112678eec 100644 --- a/ix-dev/community/tdarr/app.yaml +++ b/ix-dev/community/tdarr/app.yaml @@ -18,8 +18,8 @@ icon: https://media.sys.truenas.net/apps/tdarr/icons/icon.png keywords: - encode - transcode -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -40,4 +40,4 @@ sources: - https://docs.tdarr.io/docs title: Tdarr train: community -version: 1.0.8 +version: 1.0.9 diff --git a/ix-dev/community/tdarr/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/tdarr/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/community/tdarr/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/tdarr/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/tdarr/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/community/tdarr/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/community/tdarr/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/tdarr/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/tdarr/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/tdarr/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/tdarr/templates/library/base_v1_1_3/environment.py b/ix-dev/community/tdarr/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/tdarr/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/tdarr/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/tdarr/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/community/tdarr/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/community/tdarr/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/tdarr/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/tdarr/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/tdarr/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/tdarr/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/tdarr/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/tdarr/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/tdarr/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/tdarr/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/tdarr/templates/library/base_v1_1_3/network.py b/ix-dev/community/tdarr/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/tdarr/templates/library/base_v1_1_3/network.py rename to ix-dev/community/tdarr/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/tdarr/templates/library/base_v1_1_4/permissions.py b/ix-dev/community/tdarr/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/community/tdarr/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/community/tdarr/templates/library/base_v1_1_3/ports.py b/ix-dev/community/tdarr/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/tdarr/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/tdarr/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/tdarr/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/tdarr/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/tdarr/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/tdarr/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/tdarr/templates/library/base_v1_1_3/redis.py b/ix-dev/community/tdarr/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/tdarr/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/tdarr/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/tdarr/templates/library/base_v1_1_3/resources.py b/ix-dev/community/tdarr/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/tdarr/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/tdarr/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/tdarr/templates/library/base_v1_1_3/security.py b/ix-dev/community/tdarr/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/tdarr/templates/library/base_v1_1_3/security.py rename to ix-dev/community/tdarr/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/tdarr/templates/library/base_v1_1_3/storage.py b/ix-dev/community/tdarr/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/tdarr/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/tdarr/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/tdarr/templates/library/base_v1_1_3/utils.py b/ix-dev/community/tdarr/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/tdarr/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/tdarr/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/terraria/app.yaml b/ix-dev/community/terraria/app.yaml index 95bbaea7f2..96ba4c00ad 100644 --- a/ix-dev/community/terraria/app.yaml +++ b/ix-dev/community/terraria/app.yaml @@ -13,8 +13,8 @@ keywords: - game - terraria - world -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -32,4 +32,4 @@ sources: - https://github.com/ryansheehan/terraria title: Terraria train: community -version: 1.0.5 +version: 1.0.6 diff --git a/ix-dev/community/terraria/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/terraria/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/community/terraria/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/terraria/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/terraria/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/community/terraria/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/community/terraria/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/terraria/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/terraria/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/terraria/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/terraria/templates/library/base_v1_1_3/environment.py b/ix-dev/community/terraria/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/terraria/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/terraria/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/terraria/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/community/terraria/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/community/terraria/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/terraria/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/terraria/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/terraria/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/terraria/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/terraria/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/terraria/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/terraria/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/terraria/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/terraria/templates/library/base_v1_1_3/network.py b/ix-dev/community/terraria/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/terraria/templates/library/base_v1_1_3/network.py rename to ix-dev/community/terraria/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/terraria/templates/library/base_v1_1_4/permissions.py b/ix-dev/community/terraria/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/community/terraria/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/community/terraria/templates/library/base_v1_1_3/ports.py b/ix-dev/community/terraria/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/terraria/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/terraria/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/terraria/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/terraria/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/terraria/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/terraria/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/terraria/templates/library/base_v1_1_3/redis.py b/ix-dev/community/terraria/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/terraria/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/terraria/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/terraria/templates/library/base_v1_1_3/resources.py b/ix-dev/community/terraria/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/terraria/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/terraria/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/terraria/templates/library/base_v1_1_3/security.py b/ix-dev/community/terraria/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/terraria/templates/library/base_v1_1_3/security.py rename to ix-dev/community/terraria/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/terraria/templates/library/base_v1_1_3/storage.py b/ix-dev/community/terraria/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/terraria/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/terraria/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/terraria/templates/library/base_v1_1_3/utils.py b/ix-dev/community/terraria/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/terraria/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/terraria/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/tftpd-hpa/app.yaml b/ix-dev/community/tftpd-hpa/app.yaml index 9a91c6d91d..7735985c93 100644 --- a/ix-dev/community/tftpd-hpa/app.yaml +++ b/ix-dev/community/tftpd-hpa/app.yaml @@ -17,8 +17,8 @@ icon: https://media.sys.truenas.net/apps/tftpd-hpa/icons/icon.png keywords: - tftp - netboot -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -36,4 +36,4 @@ sources: - https://hub.docker.com/r/ixsystems/tftpd-hpa title: TFTP Server train: community -version: 1.0.9 +version: 1.0.10 diff --git a/ix-dev/community/tftpd-hpa/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/tftpd-hpa/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/community/tftpd-hpa/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/tftpd-hpa/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/tftpd-hpa/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/community/tftpd-hpa/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/community/tftpd-hpa/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/tftpd-hpa/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/tftpd-hpa/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/tftpd-hpa/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/tftpd-hpa/templates/library/base_v1_1_3/environment.py b/ix-dev/community/tftpd-hpa/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/tftpd-hpa/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/tftpd-hpa/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/tftpd-hpa/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/community/tftpd-hpa/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/community/tftpd-hpa/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/tftpd-hpa/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/tftpd-hpa/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/tftpd-hpa/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/tftpd-hpa/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/tftpd-hpa/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/tftpd-hpa/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/tftpd-hpa/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/tftpd-hpa/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/tftpd-hpa/templates/library/base_v1_1_3/network.py b/ix-dev/community/tftpd-hpa/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/tftpd-hpa/templates/library/base_v1_1_3/network.py rename to ix-dev/community/tftpd-hpa/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/tftpd-hpa/templates/library/base_v1_1_4/permissions.py b/ix-dev/community/tftpd-hpa/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/community/tftpd-hpa/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/community/tftpd-hpa/templates/library/base_v1_1_3/ports.py b/ix-dev/community/tftpd-hpa/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/tftpd-hpa/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/tftpd-hpa/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/tftpd-hpa/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/tftpd-hpa/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/tftpd-hpa/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/tftpd-hpa/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/tftpd-hpa/templates/library/base_v1_1_3/redis.py b/ix-dev/community/tftpd-hpa/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/tftpd-hpa/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/tftpd-hpa/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/tftpd-hpa/templates/library/base_v1_1_3/resources.py b/ix-dev/community/tftpd-hpa/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/tftpd-hpa/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/tftpd-hpa/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/tftpd-hpa/templates/library/base_v1_1_3/security.py b/ix-dev/community/tftpd-hpa/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/tftpd-hpa/templates/library/base_v1_1_3/security.py rename to ix-dev/community/tftpd-hpa/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/tftpd-hpa/templates/library/base_v1_1_3/storage.py b/ix-dev/community/tftpd-hpa/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/tftpd-hpa/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/tftpd-hpa/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/tftpd-hpa/templates/library/base_v1_1_3/utils.py b/ix-dev/community/tftpd-hpa/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/tftpd-hpa/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/tftpd-hpa/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/tiny-media-manager/app.yaml b/ix-dev/community/tiny-media-manager/app.yaml index f08a32df5c..03e89d2f35 100644 --- a/ix-dev/community/tiny-media-manager/app.yaml +++ b/ix-dev/community/tiny-media-manager/app.yaml @@ -16,8 +16,8 @@ keywords: - media - tv-shows - movies -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -39,4 +39,4 @@ sources: - https://hub.docker.com/r/tinymediamanager/tinymediamanager title: Tiny Media Manager train: community -version: 1.0.5 +version: 1.0.6 diff --git a/ix-dev/community/tiny-media-manager/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/tiny-media-manager/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/community/tiny-media-manager/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/tiny-media-manager/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/tiny-media-manager/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/community/tiny-media-manager/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/community/tiny-media-manager/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/tiny-media-manager/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/tiny-media-manager/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/tiny-media-manager/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/tiny-media-manager/templates/library/base_v1_1_3/environment.py b/ix-dev/community/tiny-media-manager/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/tiny-media-manager/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/tiny-media-manager/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/tiny-media-manager/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/community/tiny-media-manager/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/community/tiny-media-manager/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/tiny-media-manager/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/tiny-media-manager/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/tiny-media-manager/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/tiny-media-manager/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/tiny-media-manager/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/tiny-media-manager/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/tiny-media-manager/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/tiny-media-manager/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/tiny-media-manager/templates/library/base_v1_1_3/network.py b/ix-dev/community/tiny-media-manager/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/tiny-media-manager/templates/library/base_v1_1_3/network.py rename to ix-dev/community/tiny-media-manager/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/tiny-media-manager/templates/library/base_v1_1_4/permissions.py b/ix-dev/community/tiny-media-manager/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/community/tiny-media-manager/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/community/tiny-media-manager/templates/library/base_v1_1_3/ports.py b/ix-dev/community/tiny-media-manager/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/tiny-media-manager/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/tiny-media-manager/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/tiny-media-manager/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/tiny-media-manager/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/tiny-media-manager/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/tiny-media-manager/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/tiny-media-manager/templates/library/base_v1_1_3/redis.py b/ix-dev/community/tiny-media-manager/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/tiny-media-manager/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/tiny-media-manager/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/tiny-media-manager/templates/library/base_v1_1_3/resources.py b/ix-dev/community/tiny-media-manager/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/tiny-media-manager/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/tiny-media-manager/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/tiny-media-manager/templates/library/base_v1_1_3/security.py b/ix-dev/community/tiny-media-manager/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/tiny-media-manager/templates/library/base_v1_1_3/security.py rename to ix-dev/community/tiny-media-manager/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/tiny-media-manager/templates/library/base_v1_1_3/storage.py b/ix-dev/community/tiny-media-manager/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/tiny-media-manager/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/tiny-media-manager/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/tiny-media-manager/templates/library/base_v1_1_3/utils.py b/ix-dev/community/tiny-media-manager/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/tiny-media-manager/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/tiny-media-manager/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/transmission/app.yaml b/ix-dev/community/transmission/app.yaml index 5cc2c11e75..e83bb36bbd 100644 --- a/ix-dev/community/transmission/app.yaml +++ b/ix-dev/community/transmission/app.yaml @@ -10,8 +10,8 @@ keywords: - media - torrent - download -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -29,4 +29,4 @@ sources: - https://transmissionbt.com/ title: Transmission train: community -version: 1.0.5 +version: 1.0.6 diff --git a/ix-dev/community/transmission/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/transmission/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/community/transmission/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/transmission/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/transmission/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/community/transmission/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/community/transmission/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/transmission/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/transmission/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/transmission/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/transmission/templates/library/base_v1_1_3/environment.py b/ix-dev/community/transmission/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/transmission/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/transmission/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/transmission/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/community/transmission/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/community/transmission/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/transmission/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/transmission/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/transmission/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/transmission/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/transmission/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/transmission/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/transmission/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/transmission/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/transmission/templates/library/base_v1_1_3/network.py b/ix-dev/community/transmission/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/transmission/templates/library/base_v1_1_3/network.py rename to ix-dev/community/transmission/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/transmission/templates/library/base_v1_1_4/permissions.py b/ix-dev/community/transmission/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/community/transmission/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/community/transmission/templates/library/base_v1_1_3/ports.py b/ix-dev/community/transmission/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/transmission/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/transmission/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/transmission/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/transmission/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/transmission/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/transmission/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/transmission/templates/library/base_v1_1_3/redis.py b/ix-dev/community/transmission/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/transmission/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/transmission/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/transmission/templates/library/base_v1_1_3/resources.py b/ix-dev/community/transmission/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/transmission/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/transmission/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/transmission/templates/library/base_v1_1_3/security.py b/ix-dev/community/transmission/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/transmission/templates/library/base_v1_1_3/security.py rename to ix-dev/community/transmission/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/transmission/templates/library/base_v1_1_3/storage.py b/ix-dev/community/transmission/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/transmission/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/transmission/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/transmission/templates/library/base_v1_1_3/utils.py b/ix-dev/community/transmission/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/transmission/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/transmission/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/twofactor-auth/app.yaml b/ix-dev/community/twofactor-auth/app.yaml index d193f416d4..17b4c6ca7e 100644 --- a/ix-dev/community/twofactor-auth/app.yaml +++ b/ix-dev/community/twofactor-auth/app.yaml @@ -11,8 +11,8 @@ keywords: - security - 2fa - otp -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -31,4 +31,4 @@ sources: - https://hub.docker.com/r/2fauth/2fauth/ title: 2FAuth train: community -version: 1.0.6 +version: 1.0.7 diff --git a/ix-dev/community/twofactor-auth/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/twofactor-auth/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/community/twofactor-auth/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/twofactor-auth/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/twofactor-auth/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/community/twofactor-auth/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/community/twofactor-auth/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/twofactor-auth/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/twofactor-auth/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/twofactor-auth/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/twofactor-auth/templates/library/base_v1_1_3/environment.py b/ix-dev/community/twofactor-auth/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/twofactor-auth/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/twofactor-auth/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/twofactor-auth/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/community/twofactor-auth/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/community/twofactor-auth/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/twofactor-auth/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/twofactor-auth/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/twofactor-auth/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/twofactor-auth/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/twofactor-auth/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/twofactor-auth/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/twofactor-auth/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/twofactor-auth/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/twofactor-auth/templates/library/base_v1_1_3/network.py b/ix-dev/community/twofactor-auth/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/twofactor-auth/templates/library/base_v1_1_3/network.py rename to ix-dev/community/twofactor-auth/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/twofactor-auth/templates/library/base_v1_1_4/permissions.py b/ix-dev/community/twofactor-auth/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/community/twofactor-auth/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/community/twofactor-auth/templates/library/base_v1_1_3/ports.py b/ix-dev/community/twofactor-auth/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/twofactor-auth/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/twofactor-auth/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/twofactor-auth/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/twofactor-auth/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/twofactor-auth/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/twofactor-auth/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/twofactor-auth/templates/library/base_v1_1_3/redis.py b/ix-dev/community/twofactor-auth/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/twofactor-auth/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/twofactor-auth/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/twofactor-auth/templates/library/base_v1_1_3/resources.py b/ix-dev/community/twofactor-auth/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/twofactor-auth/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/twofactor-auth/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/twofactor-auth/templates/library/base_v1_1_3/security.py b/ix-dev/community/twofactor-auth/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/twofactor-auth/templates/library/base_v1_1_3/security.py rename to ix-dev/community/twofactor-auth/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/twofactor-auth/templates/library/base_v1_1_3/storage.py b/ix-dev/community/twofactor-auth/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/twofactor-auth/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/twofactor-auth/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/twofactor-auth/templates/library/base_v1_1_3/utils.py b/ix-dev/community/twofactor-auth/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/twofactor-auth/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/twofactor-auth/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/unifi-controller/app.yaml b/ix-dev/community/unifi-controller/app.yaml index 4a513498d7..3667f07b51 100644 --- a/ix-dev/community/unifi-controller/app.yaml +++ b/ix-dev/community/unifi-controller/app.yaml @@ -10,8 +10,8 @@ keywords: - controller - unifi - network -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -30,4 +30,4 @@ sources: - https://hub.docker.com/r/goofball222/unifi title: Unifi Controller train: community -version: 1.2.10 +version: 1.2.11 diff --git a/ix-dev/community/unifi-controller/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/unifi-controller/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/community/unifi-controller/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/unifi-controller/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/unifi-controller/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/community/unifi-controller/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/community/unifi-controller/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/unifi-controller/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/unifi-controller/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/unifi-controller/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/unifi-controller/templates/library/base_v1_1_3/environment.py b/ix-dev/community/unifi-controller/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/unifi-controller/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/unifi-controller/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/unifi-controller/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/community/unifi-controller/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/community/unifi-controller/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/unifi-controller/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/unifi-controller/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/unifi-controller/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/unifi-controller/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/unifi-controller/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/unifi-controller/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/unifi-controller/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/unifi-controller/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/unifi-controller/templates/library/base_v1_1_3/network.py b/ix-dev/community/unifi-controller/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/unifi-controller/templates/library/base_v1_1_3/network.py rename to ix-dev/community/unifi-controller/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/unifi-controller/templates/library/base_v1_1_4/permissions.py b/ix-dev/community/unifi-controller/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/community/unifi-controller/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/community/unifi-controller/templates/library/base_v1_1_3/ports.py b/ix-dev/community/unifi-controller/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/unifi-controller/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/unifi-controller/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/unifi-controller/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/unifi-controller/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/unifi-controller/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/unifi-controller/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/unifi-controller/templates/library/base_v1_1_3/redis.py b/ix-dev/community/unifi-controller/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/unifi-controller/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/unifi-controller/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/unifi-controller/templates/library/base_v1_1_3/resources.py b/ix-dev/community/unifi-controller/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/unifi-controller/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/unifi-controller/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/unifi-controller/templates/library/base_v1_1_3/security.py b/ix-dev/community/unifi-controller/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/unifi-controller/templates/library/base_v1_1_3/security.py rename to ix-dev/community/unifi-controller/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/unifi-controller/templates/library/base_v1_1_3/storage.py b/ix-dev/community/unifi-controller/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/unifi-controller/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/unifi-controller/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/unifi-controller/templates/library/base_v1_1_3/utils.py b/ix-dev/community/unifi-controller/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/unifi-controller/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/unifi-controller/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/unifi-protect-backup/app.yaml b/ix-dev/community/unifi-protect-backup/app.yaml index efad761ca1..5e95f9953d 100644 --- a/ix-dev/community/unifi-protect-backup/app.yaml +++ b/ix-dev/community/unifi-protect-backup/app.yaml @@ -18,8 +18,8 @@ icon: https://media.sys.truenas.net/apps/unifi-protect-backup/icons/icon.svg keywords: - backup - unifi-protect -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -37,4 +37,4 @@ sources: - https://github.com/ep1cman/unifi-protect-backup/pkgs/container/unifi-protect-backup title: Unifi Protect Backup train: community -version: 1.0.16 +version: 1.0.17 diff --git a/ix-dev/community/unifi-protect-backup/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/unifi-protect-backup/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/community/unifi-protect-backup/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/unifi-protect-backup/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/unifi-protect-backup/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/community/unifi-protect-backup/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/community/unifi-protect-backup/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/unifi-protect-backup/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/unifi-protect-backup/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/unifi-protect-backup/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/unifi-protect-backup/templates/library/base_v1_1_3/environment.py b/ix-dev/community/unifi-protect-backup/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/unifi-protect-backup/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/unifi-protect-backup/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/unifi-protect-backup/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/community/unifi-protect-backup/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/community/unifi-protect-backup/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/unifi-protect-backup/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/unifi-protect-backup/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/unifi-protect-backup/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/unifi-protect-backup/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/unifi-protect-backup/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/unifi-protect-backup/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/unifi-protect-backup/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/unifi-protect-backup/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/unifi-protect-backup/templates/library/base_v1_1_3/network.py b/ix-dev/community/unifi-protect-backup/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/unifi-protect-backup/templates/library/base_v1_1_3/network.py rename to ix-dev/community/unifi-protect-backup/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/unifi-protect-backup/templates/library/base_v1_1_4/permissions.py b/ix-dev/community/unifi-protect-backup/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/community/unifi-protect-backup/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/community/unifi-protect-backup/templates/library/base_v1_1_3/ports.py b/ix-dev/community/unifi-protect-backup/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/unifi-protect-backup/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/unifi-protect-backup/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/unifi-protect-backup/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/unifi-protect-backup/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/unifi-protect-backup/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/unifi-protect-backup/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/unifi-protect-backup/templates/library/base_v1_1_3/redis.py b/ix-dev/community/unifi-protect-backup/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/unifi-protect-backup/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/unifi-protect-backup/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/unifi-protect-backup/templates/library/base_v1_1_3/resources.py b/ix-dev/community/unifi-protect-backup/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/unifi-protect-backup/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/unifi-protect-backup/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/unifi-protect-backup/templates/library/base_v1_1_3/security.py b/ix-dev/community/unifi-protect-backup/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/unifi-protect-backup/templates/library/base_v1_1_3/security.py rename to ix-dev/community/unifi-protect-backup/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/unifi-protect-backup/templates/library/base_v1_1_3/storage.py b/ix-dev/community/unifi-protect-backup/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/unifi-protect-backup/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/unifi-protect-backup/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/unifi-protect-backup/templates/library/base_v1_1_3/utils.py b/ix-dev/community/unifi-protect-backup/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/unifi-protect-backup/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/unifi-protect-backup/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/vaultwarden/app.yaml b/ix-dev/community/vaultwarden/app.yaml index 5b7de00253..a5abd79800 100644 --- a/ix-dev/community/vaultwarden/app.yaml +++ b/ix-dev/community/vaultwarden/app.yaml @@ -10,8 +10,8 @@ icon: https://media.sys.truenas.net/apps/vaultwarden/icons/icon.png keywords: - password - manager -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -34,4 +34,4 @@ sources: - https://github.com/dani-garcia/vaultwarden title: Vaultwarden train: community -version: 1.0.6 +version: 1.0.7 diff --git a/ix-dev/community/vaultwarden/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/vaultwarden/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/community/vaultwarden/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/vaultwarden/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/vaultwarden/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/community/vaultwarden/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/community/vaultwarden/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/vaultwarden/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/vaultwarden/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/vaultwarden/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/vaultwarden/templates/library/base_v1_1_3/environment.py b/ix-dev/community/vaultwarden/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/vaultwarden/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/vaultwarden/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/vaultwarden/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/community/vaultwarden/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/community/vaultwarden/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/vaultwarden/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/vaultwarden/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/vaultwarden/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/vaultwarden/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/vaultwarden/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/vaultwarden/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/vaultwarden/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/vaultwarden/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/vaultwarden/templates/library/base_v1_1_3/network.py b/ix-dev/community/vaultwarden/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/vaultwarden/templates/library/base_v1_1_3/network.py rename to ix-dev/community/vaultwarden/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/vaultwarden/templates/library/base_v1_1_4/permissions.py b/ix-dev/community/vaultwarden/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/community/vaultwarden/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/community/vaultwarden/templates/library/base_v1_1_3/ports.py b/ix-dev/community/vaultwarden/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/vaultwarden/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/vaultwarden/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/vaultwarden/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/vaultwarden/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/vaultwarden/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/vaultwarden/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/vaultwarden/templates/library/base_v1_1_3/redis.py b/ix-dev/community/vaultwarden/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/vaultwarden/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/vaultwarden/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/vaultwarden/templates/library/base_v1_1_3/resources.py b/ix-dev/community/vaultwarden/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/vaultwarden/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/vaultwarden/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/vaultwarden/templates/library/base_v1_1_3/security.py b/ix-dev/community/vaultwarden/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/vaultwarden/templates/library/base_v1_1_3/security.py rename to ix-dev/community/vaultwarden/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/vaultwarden/templates/library/base_v1_1_3/storage.py b/ix-dev/community/vaultwarden/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/vaultwarden/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/vaultwarden/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/vaultwarden/templates/library/base_v1_1_3/utils.py b/ix-dev/community/vaultwarden/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/vaultwarden/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/vaultwarden/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/vikunja/app.yaml b/ix-dev/community/vikunja/app.yaml index 93f4cb6303..b6f2b7551d 100644 --- a/ix-dev/community/vikunja/app.yaml +++ b/ix-dev/community/vikunja/app.yaml @@ -8,8 +8,8 @@ host_mounts: [] icon: https://media.sys.truenas.net/apps/vikunja/icons/icon.png keywords: - todo -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -46,4 +46,4 @@ sources: - https://vikunja.io/ title: Vikunja train: community -version: 1.2.13 +version: 1.2.14 diff --git a/ix-dev/community/vikunja/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/vikunja/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/community/vikunja/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/vikunja/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/vikunja/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/community/vikunja/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/community/vikunja/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/vikunja/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/vikunja/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/vikunja/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/vikunja/templates/library/base_v1_1_3/environment.py b/ix-dev/community/vikunja/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/vikunja/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/vikunja/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/vikunja/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/community/vikunja/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/community/vikunja/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/vikunja/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/vikunja/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/vikunja/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/vikunja/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/vikunja/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/vikunja/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/vikunja/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/vikunja/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/vikunja/templates/library/base_v1_1_3/network.py b/ix-dev/community/vikunja/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/vikunja/templates/library/base_v1_1_3/network.py rename to ix-dev/community/vikunja/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/vikunja/templates/library/base_v1_1_4/permissions.py b/ix-dev/community/vikunja/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/community/vikunja/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/community/vikunja/templates/library/base_v1_1_3/ports.py b/ix-dev/community/vikunja/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/vikunja/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/vikunja/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/vikunja/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/vikunja/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/vikunja/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/vikunja/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/vikunja/templates/library/base_v1_1_3/redis.py b/ix-dev/community/vikunja/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/vikunja/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/vikunja/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/vikunja/templates/library/base_v1_1_3/resources.py b/ix-dev/community/vikunja/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/vikunja/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/vikunja/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/vikunja/templates/library/base_v1_1_3/security.py b/ix-dev/community/vikunja/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/vikunja/templates/library/base_v1_1_3/security.py rename to ix-dev/community/vikunja/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/vikunja/templates/library/base_v1_1_3/storage.py b/ix-dev/community/vikunja/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/vikunja/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/vikunja/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/vikunja/templates/library/base_v1_1_3/utils.py b/ix-dev/community/vikunja/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/vikunja/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/vikunja/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/webdav/app.yaml b/ix-dev/community/webdav/app.yaml index e39604df33..7e1ec57bfa 100644 --- a/ix-dev/community/webdav/app.yaml +++ b/ix-dev/community/webdav/app.yaml @@ -10,8 +10,8 @@ icon: https://media.sys.truenas.net/apps/webdav/icons/icon.png keywords: - webdav - file-sharing -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -28,4 +28,4 @@ sources: - http://www.webdav.org/ title: WebDAV train: community -version: 1.0.12 +version: 1.0.13 diff --git a/ix-dev/community/webdav/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/webdav/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/community/webdav/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/webdav/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/webdav/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/community/webdav/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/community/webdav/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/webdav/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/webdav/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/webdav/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/webdav/templates/library/base_v1_1_3/environment.py b/ix-dev/community/webdav/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/webdav/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/webdav/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/webdav/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/community/webdav/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/community/webdav/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/webdav/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/webdav/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/webdav/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/webdav/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/webdav/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/webdav/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/webdav/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/webdav/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/webdav/templates/library/base_v1_1_3/network.py b/ix-dev/community/webdav/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/webdav/templates/library/base_v1_1_3/network.py rename to ix-dev/community/webdav/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/webdav/templates/library/base_v1_1_4/permissions.py b/ix-dev/community/webdav/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/community/webdav/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/community/webdav/templates/library/base_v1_1_3/ports.py b/ix-dev/community/webdav/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/webdav/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/webdav/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/webdav/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/webdav/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/webdav/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/webdav/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/webdav/templates/library/base_v1_1_3/redis.py b/ix-dev/community/webdav/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/webdav/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/webdav/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/webdav/templates/library/base_v1_1_3/resources.py b/ix-dev/community/webdav/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/webdav/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/webdav/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/webdav/templates/library/base_v1_1_3/security.py b/ix-dev/community/webdav/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/webdav/templates/library/base_v1_1_3/security.py rename to ix-dev/community/webdav/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/webdav/templates/library/base_v1_1_3/storage.py b/ix-dev/community/webdav/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/webdav/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/webdav/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/webdav/templates/library/base_v1_1_3/utils.py b/ix-dev/community/webdav/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/webdav/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/webdav/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/whoogle/app.yaml b/ix-dev/community/whoogle/app.yaml index 3e17812c4f..1610b886db 100644 --- a/ix-dev/community/whoogle/app.yaml +++ b/ix-dev/community/whoogle/app.yaml @@ -9,8 +9,8 @@ icon: https://media.sys.truenas.net/apps/whoogle/icons/icon.png keywords: - search - engine -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -30,4 +30,4 @@ sources: - https://hub.docker.com/r/benbusby/whoogle-search title: Whoogle train: community -version: 1.0.19 +version: 1.0.20 diff --git a/ix-dev/community/whoogle/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/whoogle/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/community/whoogle/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/whoogle/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/whoogle/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/community/whoogle/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/community/whoogle/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/whoogle/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/whoogle/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/whoogle/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/whoogle/templates/library/base_v1_1_3/environment.py b/ix-dev/community/whoogle/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/whoogle/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/whoogle/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/whoogle/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/community/whoogle/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/community/whoogle/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/whoogle/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/whoogle/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/whoogle/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/whoogle/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/whoogle/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/whoogle/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/whoogle/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/whoogle/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/whoogle/templates/library/base_v1_1_3/network.py b/ix-dev/community/whoogle/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/whoogle/templates/library/base_v1_1_3/network.py rename to ix-dev/community/whoogle/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/whoogle/templates/library/base_v1_1_4/permissions.py b/ix-dev/community/whoogle/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/community/whoogle/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/community/whoogle/templates/library/base_v1_1_3/ports.py b/ix-dev/community/whoogle/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/whoogle/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/whoogle/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/whoogle/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/whoogle/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/whoogle/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/whoogle/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/whoogle/templates/library/base_v1_1_3/redis.py b/ix-dev/community/whoogle/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/whoogle/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/whoogle/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/whoogle/templates/library/base_v1_1_3/resources.py b/ix-dev/community/whoogle/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/whoogle/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/whoogle/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/whoogle/templates/library/base_v1_1_3/security.py b/ix-dev/community/whoogle/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/whoogle/templates/library/base_v1_1_3/security.py rename to ix-dev/community/whoogle/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/whoogle/templates/library/base_v1_1_3/storage.py b/ix-dev/community/whoogle/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/whoogle/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/whoogle/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/whoogle/templates/library/base_v1_1_3/utils.py b/ix-dev/community/whoogle/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/whoogle/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/whoogle/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/wordpress/app.yaml b/ix-dev/community/wordpress/app.yaml index bae03916c3..8a5cb1bebc 100644 --- a/ix-dev/community/wordpress/app.yaml +++ b/ix-dev/community/wordpress/app.yaml @@ -11,8 +11,8 @@ icon: https://media.sys.truenas.net/apps/wordpress/icons/icon.png keywords: - cms - blog -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -38,4 +38,4 @@ sources: - https://hub.docker.com/_/wordpress title: Wordpress train: community -version: 1.0.6 +version: 1.0.7 diff --git a/ix-dev/community/wordpress/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/wordpress/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/community/wordpress/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/wordpress/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/wordpress/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/community/wordpress/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/community/wordpress/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/wordpress/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/wordpress/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/wordpress/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/wordpress/templates/library/base_v1_1_3/environment.py b/ix-dev/community/wordpress/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/wordpress/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/wordpress/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/wordpress/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/community/wordpress/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/community/wordpress/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/wordpress/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/wordpress/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/wordpress/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/wordpress/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/wordpress/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/wordpress/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/wordpress/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/wordpress/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/wordpress/templates/library/base_v1_1_3/network.py b/ix-dev/community/wordpress/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/wordpress/templates/library/base_v1_1_3/network.py rename to ix-dev/community/wordpress/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/wordpress/templates/library/base_v1_1_4/permissions.py b/ix-dev/community/wordpress/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/community/wordpress/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/community/wordpress/templates/library/base_v1_1_3/ports.py b/ix-dev/community/wordpress/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/wordpress/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/wordpress/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/wordpress/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/wordpress/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/wordpress/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/wordpress/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/wordpress/templates/library/base_v1_1_3/redis.py b/ix-dev/community/wordpress/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/wordpress/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/wordpress/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/wordpress/templates/library/base_v1_1_3/resources.py b/ix-dev/community/wordpress/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/wordpress/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/wordpress/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/wordpress/templates/library/base_v1_1_3/security.py b/ix-dev/community/wordpress/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/wordpress/templates/library/base_v1_1_3/security.py rename to ix-dev/community/wordpress/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/wordpress/templates/library/base_v1_1_3/storage.py b/ix-dev/community/wordpress/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/wordpress/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/wordpress/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/wordpress/templates/library/base_v1_1_3/utils.py b/ix-dev/community/wordpress/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/wordpress/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/wordpress/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/community/zerotier/app.yaml b/ix-dev/community/zerotier/app.yaml index 2f3fa64d7e..f1fc2ec6de 100644 --- a/ix-dev/community/zerotier/app.yaml +++ b/ix-dev/community/zerotier/app.yaml @@ -34,8 +34,8 @@ icon: https://media.sys.truenas.net/apps/zerotier/icons/icon.png keywords: - vpn - zerotier -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -53,4 +53,4 @@ sources: - https://hub.docker.com/r/zerotier/zerotier title: Zerotier train: community -version: 1.0.18 +version: 1.0.19 diff --git a/ix-dev/community/zerotier/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/community/zerotier/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/community/zerotier/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/zerotier/templates/library/base_v1_1_3/permissions.py b/ix-dev/community/zerotier/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/community/zerotier/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/community/zerotier/templates/library/base_v1_1_3/__init__.py b/ix-dev/community/zerotier/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/community/zerotier/templates/library/base_v1_1_3/__init__.py rename to ix-dev/community/zerotier/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/community/zerotier/templates/library/base_v1_1_3/environment.py b/ix-dev/community/zerotier/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/community/zerotier/templates/library/base_v1_1_3/environment.py rename to ix-dev/community/zerotier/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/community/zerotier/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/community/zerotier/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/community/zerotier/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/community/zerotier/templates/library/base_v1_1_3/mariadb.py b/ix-dev/community/zerotier/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/community/zerotier/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/community/zerotier/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/community/zerotier/templates/library/base_v1_1_3/metadata.py b/ix-dev/community/zerotier/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/community/zerotier/templates/library/base_v1_1_3/metadata.py rename to ix-dev/community/zerotier/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/community/zerotier/templates/library/base_v1_1_3/network.py b/ix-dev/community/zerotier/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/community/zerotier/templates/library/base_v1_1_3/network.py rename to ix-dev/community/zerotier/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/community/zerotier/templates/library/base_v1_1_4/permissions.py b/ix-dev/community/zerotier/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/community/zerotier/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/community/zerotier/templates/library/base_v1_1_3/ports.py b/ix-dev/community/zerotier/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/community/zerotier/templates/library/base_v1_1_3/ports.py rename to ix-dev/community/zerotier/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/community/zerotier/templates/library/base_v1_1_3/postgres.py b/ix-dev/community/zerotier/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/community/zerotier/templates/library/base_v1_1_3/postgres.py rename to ix-dev/community/zerotier/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/community/zerotier/templates/library/base_v1_1_3/redis.py b/ix-dev/community/zerotier/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/community/zerotier/templates/library/base_v1_1_3/redis.py rename to ix-dev/community/zerotier/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/community/zerotier/templates/library/base_v1_1_3/resources.py b/ix-dev/community/zerotier/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/community/zerotier/templates/library/base_v1_1_3/resources.py rename to ix-dev/community/zerotier/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/community/zerotier/templates/library/base_v1_1_3/security.py b/ix-dev/community/zerotier/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/community/zerotier/templates/library/base_v1_1_3/security.py rename to ix-dev/community/zerotier/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/community/zerotier/templates/library/base_v1_1_3/storage.py b/ix-dev/community/zerotier/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/community/zerotier/templates/library/base_v1_1_3/storage.py rename to ix-dev/community/zerotier/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/community/zerotier/templates/library/base_v1_1_3/utils.py b/ix-dev/community/zerotier/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/community/zerotier/templates/library/base_v1_1_3/utils.py rename to ix-dev/community/zerotier/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/enterprise/minio/app.yaml b/ix-dev/enterprise/minio/app.yaml index aa8fd32df1..126acc727c 100644 --- a/ix-dev/enterprise/minio/app.yaml +++ b/ix-dev/enterprise/minio/app.yaml @@ -11,8 +11,8 @@ keywords: - minio - cloud - s3 -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -31,4 +31,4 @@ sources: - https://github.com/minio/minio title: MinIO train: enterprise -version: 1.1.6 +version: 1.1.7 diff --git a/ix-dev/enterprise/minio/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/enterprise/minio/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/enterprise/minio/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/enterprise/minio/templates/library/base_v1_1_3/permissions.py b/ix-dev/enterprise/minio/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/enterprise/minio/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/enterprise/minio/templates/library/base_v1_1_3/__init__.py b/ix-dev/enterprise/minio/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/enterprise/minio/templates/library/base_v1_1_3/__init__.py rename to ix-dev/enterprise/minio/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/enterprise/minio/templates/library/base_v1_1_3/environment.py b/ix-dev/enterprise/minio/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/enterprise/minio/templates/library/base_v1_1_3/environment.py rename to ix-dev/enterprise/minio/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/enterprise/minio/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/enterprise/minio/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/enterprise/minio/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/enterprise/minio/templates/library/base_v1_1_3/mariadb.py b/ix-dev/enterprise/minio/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/enterprise/minio/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/enterprise/minio/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/enterprise/minio/templates/library/base_v1_1_3/metadata.py b/ix-dev/enterprise/minio/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/enterprise/minio/templates/library/base_v1_1_3/metadata.py rename to ix-dev/enterprise/minio/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/enterprise/minio/templates/library/base_v1_1_3/network.py b/ix-dev/enterprise/minio/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/enterprise/minio/templates/library/base_v1_1_3/network.py rename to ix-dev/enterprise/minio/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/enterprise/minio/templates/library/base_v1_1_4/permissions.py b/ix-dev/enterprise/minio/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/enterprise/minio/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/enterprise/minio/templates/library/base_v1_1_3/ports.py b/ix-dev/enterprise/minio/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/enterprise/minio/templates/library/base_v1_1_3/ports.py rename to ix-dev/enterprise/minio/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/enterprise/minio/templates/library/base_v1_1_3/postgres.py b/ix-dev/enterprise/minio/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/enterprise/minio/templates/library/base_v1_1_3/postgres.py rename to ix-dev/enterprise/minio/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/enterprise/minio/templates/library/base_v1_1_3/redis.py b/ix-dev/enterprise/minio/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/enterprise/minio/templates/library/base_v1_1_3/redis.py rename to ix-dev/enterprise/minio/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/enterprise/minio/templates/library/base_v1_1_3/resources.py b/ix-dev/enterprise/minio/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/enterprise/minio/templates/library/base_v1_1_3/resources.py rename to ix-dev/enterprise/minio/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/enterprise/minio/templates/library/base_v1_1_3/security.py b/ix-dev/enterprise/minio/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/enterprise/minio/templates/library/base_v1_1_3/security.py rename to ix-dev/enterprise/minio/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/enterprise/minio/templates/library/base_v1_1_3/storage.py b/ix-dev/enterprise/minio/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/enterprise/minio/templates/library/base_v1_1_3/storage.py rename to ix-dev/enterprise/minio/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/enterprise/minio/templates/library/base_v1_1_3/utils.py b/ix-dev/enterprise/minio/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/enterprise/minio/templates/library/base_v1_1_3/utils.py rename to ix-dev/enterprise/minio/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/enterprise/minio/templates/library/enterprise/minio/v1_1_6/__init__.py b/ix-dev/enterprise/minio/templates/library/enterprise/minio/v1_1_7/__init__.py similarity index 100% rename from ix-dev/enterprise/minio/templates/library/enterprise/minio/v1_1_6/__init__.py rename to ix-dev/enterprise/minio/templates/library/enterprise/minio/v1_1_7/__init__.py diff --git a/ix-dev/enterprise/minio/templates/library/enterprise/minio/v1_1_6/data.py b/ix-dev/enterprise/minio/templates/library/enterprise/minio/v1_1_7/data.py similarity index 98% rename from ix-dev/enterprise/minio/templates/library/enterprise/minio/v1_1_6/data.py rename to ix-dev/enterprise/minio/templates/library/enterprise/minio/v1_1_7/data.py index 7553cddf67..a6e7fd07c4 100644 --- a/ix-dev/enterprise/minio/templates/library/enterprise/minio/v1_1_6/data.py +++ b/ix-dev/enterprise/minio/templates/library/enterprise/minio/v1_1_7/data.py @@ -1,4 +1,4 @@ -from base_v1_1_3 import utils +from base_v1_1_4 import utils def validate(data): diff --git a/ix-dev/enterprise/syncthing/app.yaml b/ix-dev/enterprise/syncthing/app.yaml index ef0306a5e0..f97d2c51a5 100644 --- a/ix-dev/enterprise/syncthing/app.yaml +++ b/ix-dev/enterprise/syncthing/app.yaml @@ -25,8 +25,8 @@ icon: https://media.sys.truenas.net/apps/syncthing/icons/icon.svg keywords: - sync - file-sharing -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -49,4 +49,4 @@ sources: - https://hub.docker.com/r/syncthing/syncthing title: Syncthing train: enterprise -version: 1.0.14 +version: 1.0.15 diff --git a/ix-dev/enterprise/syncthing/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/enterprise/syncthing/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/enterprise/syncthing/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/enterprise/syncthing/templates/library/base_v1_1_3/permissions.py b/ix-dev/enterprise/syncthing/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/enterprise/syncthing/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/enterprise/syncthing/templates/library/base_v1_1_3/__init__.py b/ix-dev/enterprise/syncthing/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/enterprise/syncthing/templates/library/base_v1_1_3/__init__.py rename to ix-dev/enterprise/syncthing/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/enterprise/syncthing/templates/library/base_v1_1_3/environment.py b/ix-dev/enterprise/syncthing/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/enterprise/syncthing/templates/library/base_v1_1_3/environment.py rename to ix-dev/enterprise/syncthing/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/enterprise/syncthing/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/enterprise/syncthing/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/enterprise/syncthing/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/enterprise/syncthing/templates/library/base_v1_1_3/mariadb.py b/ix-dev/enterprise/syncthing/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/enterprise/syncthing/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/enterprise/syncthing/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/enterprise/syncthing/templates/library/base_v1_1_3/metadata.py b/ix-dev/enterprise/syncthing/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/enterprise/syncthing/templates/library/base_v1_1_3/metadata.py rename to ix-dev/enterprise/syncthing/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/enterprise/syncthing/templates/library/base_v1_1_3/network.py b/ix-dev/enterprise/syncthing/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/enterprise/syncthing/templates/library/base_v1_1_3/network.py rename to ix-dev/enterprise/syncthing/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/enterprise/syncthing/templates/library/base_v1_1_4/permissions.py b/ix-dev/enterprise/syncthing/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/enterprise/syncthing/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/enterprise/syncthing/templates/library/base_v1_1_3/ports.py b/ix-dev/enterprise/syncthing/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/enterprise/syncthing/templates/library/base_v1_1_3/ports.py rename to ix-dev/enterprise/syncthing/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/enterprise/syncthing/templates/library/base_v1_1_3/postgres.py b/ix-dev/enterprise/syncthing/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/enterprise/syncthing/templates/library/base_v1_1_3/postgres.py rename to ix-dev/enterprise/syncthing/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/enterprise/syncthing/templates/library/base_v1_1_3/redis.py b/ix-dev/enterprise/syncthing/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/enterprise/syncthing/templates/library/base_v1_1_3/redis.py rename to ix-dev/enterprise/syncthing/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/enterprise/syncthing/templates/library/base_v1_1_3/resources.py b/ix-dev/enterprise/syncthing/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/enterprise/syncthing/templates/library/base_v1_1_3/resources.py rename to ix-dev/enterprise/syncthing/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/enterprise/syncthing/templates/library/base_v1_1_3/security.py b/ix-dev/enterprise/syncthing/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/enterprise/syncthing/templates/library/base_v1_1_3/security.py rename to ix-dev/enterprise/syncthing/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/enterprise/syncthing/templates/library/base_v1_1_3/storage.py b/ix-dev/enterprise/syncthing/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/enterprise/syncthing/templates/library/base_v1_1_3/storage.py rename to ix-dev/enterprise/syncthing/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/enterprise/syncthing/templates/library/base_v1_1_3/utils.py b/ix-dev/enterprise/syncthing/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/enterprise/syncthing/templates/library/base_v1_1_3/utils.py rename to ix-dev/enterprise/syncthing/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/stable/collabora/app.yaml b/ix-dev/stable/collabora/app.yaml index 565b9e8372..f9c9a1372b 100644 --- a/ix-dev/stable/collabora/app.yaml +++ b/ix-dev/stable/collabora/app.yaml @@ -27,8 +27,8 @@ keywords: - office - documents - productivity -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -53,4 +53,4 @@ sources: - https://hub.docker.com/r/collabora/code title: Collabora train: stable -version: 1.1.14 +version: 1.1.15 diff --git a/ix-dev/stable/collabora/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/stable/collabora/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/stable/collabora/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/stable/collabora/templates/library/base_v1_1_3/permissions.py b/ix-dev/stable/collabora/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/stable/collabora/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/stable/collabora/templates/library/base_v1_1_3/__init__.py b/ix-dev/stable/collabora/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/stable/collabora/templates/library/base_v1_1_3/__init__.py rename to ix-dev/stable/collabora/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/stable/collabora/templates/library/base_v1_1_3/environment.py b/ix-dev/stable/collabora/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/stable/collabora/templates/library/base_v1_1_3/environment.py rename to ix-dev/stable/collabora/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/stable/collabora/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/stable/collabora/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/stable/collabora/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/stable/collabora/templates/library/base_v1_1_3/mariadb.py b/ix-dev/stable/collabora/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/stable/collabora/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/stable/collabora/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/stable/collabora/templates/library/base_v1_1_3/metadata.py b/ix-dev/stable/collabora/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/stable/collabora/templates/library/base_v1_1_3/metadata.py rename to ix-dev/stable/collabora/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/stable/collabora/templates/library/base_v1_1_3/network.py b/ix-dev/stable/collabora/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/stable/collabora/templates/library/base_v1_1_3/network.py rename to ix-dev/stable/collabora/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/stable/collabora/templates/library/base_v1_1_4/permissions.py b/ix-dev/stable/collabora/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/stable/collabora/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/stable/collabora/templates/library/base_v1_1_3/ports.py b/ix-dev/stable/collabora/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/stable/collabora/templates/library/base_v1_1_3/ports.py rename to ix-dev/stable/collabora/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/stable/collabora/templates/library/base_v1_1_3/postgres.py b/ix-dev/stable/collabora/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/stable/collabora/templates/library/base_v1_1_3/postgres.py rename to ix-dev/stable/collabora/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/stable/collabora/templates/library/base_v1_1_3/redis.py b/ix-dev/stable/collabora/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/stable/collabora/templates/library/base_v1_1_3/redis.py rename to ix-dev/stable/collabora/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/stable/collabora/templates/library/base_v1_1_3/resources.py b/ix-dev/stable/collabora/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/stable/collabora/templates/library/base_v1_1_3/resources.py rename to ix-dev/stable/collabora/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/stable/collabora/templates/library/base_v1_1_3/security.py b/ix-dev/stable/collabora/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/stable/collabora/templates/library/base_v1_1_3/security.py rename to ix-dev/stable/collabora/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/stable/collabora/templates/library/base_v1_1_3/storage.py b/ix-dev/stable/collabora/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/stable/collabora/templates/library/base_v1_1_3/storage.py rename to ix-dev/stable/collabora/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/stable/collabora/templates/library/base_v1_1_3/utils.py b/ix-dev/stable/collabora/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/stable/collabora/templates/library/base_v1_1_3/utils.py rename to ix-dev/stable/collabora/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/stable/diskoverdata/app.yaml b/ix-dev/stable/diskoverdata/app.yaml index 7412302b41..b741b5c4d8 100644 --- a/ix-dev/stable/diskoverdata/app.yaml +++ b/ix-dev/stable/diskoverdata/app.yaml @@ -23,8 +23,8 @@ keywords: - monitoring - management - discovery -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -50,4 +50,4 @@ sources: - https://github.com/linuxserver/docker-diskover title: Diskover Data train: stable -version: 1.3.7 +version: 1.3.8 diff --git a/ix-dev/stable/diskoverdata/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/stable/diskoverdata/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/stable/diskoverdata/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/stable/diskoverdata/templates/library/base_v1_1_3/permissions.py b/ix-dev/stable/diskoverdata/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/stable/diskoverdata/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/stable/diskoverdata/templates/library/base_v1_1_3/__init__.py b/ix-dev/stable/diskoverdata/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/stable/diskoverdata/templates/library/base_v1_1_3/__init__.py rename to ix-dev/stable/diskoverdata/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/stable/diskoverdata/templates/library/base_v1_1_3/environment.py b/ix-dev/stable/diskoverdata/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/stable/diskoverdata/templates/library/base_v1_1_3/environment.py rename to ix-dev/stable/diskoverdata/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/stable/diskoverdata/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/stable/diskoverdata/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/stable/diskoverdata/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/stable/diskoverdata/templates/library/base_v1_1_3/mariadb.py b/ix-dev/stable/diskoverdata/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/stable/diskoverdata/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/stable/diskoverdata/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/stable/diskoverdata/templates/library/base_v1_1_3/metadata.py b/ix-dev/stable/diskoverdata/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/stable/diskoverdata/templates/library/base_v1_1_3/metadata.py rename to ix-dev/stable/diskoverdata/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/stable/diskoverdata/templates/library/base_v1_1_3/network.py b/ix-dev/stable/diskoverdata/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/stable/diskoverdata/templates/library/base_v1_1_3/network.py rename to ix-dev/stable/diskoverdata/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/stable/diskoverdata/templates/library/base_v1_1_4/permissions.py b/ix-dev/stable/diskoverdata/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/stable/diskoverdata/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/stable/diskoverdata/templates/library/base_v1_1_3/ports.py b/ix-dev/stable/diskoverdata/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/stable/diskoverdata/templates/library/base_v1_1_3/ports.py rename to ix-dev/stable/diskoverdata/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/stable/diskoverdata/templates/library/base_v1_1_3/postgres.py b/ix-dev/stable/diskoverdata/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/stable/diskoverdata/templates/library/base_v1_1_3/postgres.py rename to ix-dev/stable/diskoverdata/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/stable/diskoverdata/templates/library/base_v1_1_3/redis.py b/ix-dev/stable/diskoverdata/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/stable/diskoverdata/templates/library/base_v1_1_3/redis.py rename to ix-dev/stable/diskoverdata/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/stable/diskoverdata/templates/library/base_v1_1_3/resources.py b/ix-dev/stable/diskoverdata/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/stable/diskoverdata/templates/library/base_v1_1_3/resources.py rename to ix-dev/stable/diskoverdata/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/stable/diskoverdata/templates/library/base_v1_1_3/security.py b/ix-dev/stable/diskoverdata/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/stable/diskoverdata/templates/library/base_v1_1_3/security.py rename to ix-dev/stable/diskoverdata/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/stable/diskoverdata/templates/library/base_v1_1_3/storage.py b/ix-dev/stable/diskoverdata/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/stable/diskoverdata/templates/library/base_v1_1_3/storage.py rename to ix-dev/stable/diskoverdata/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/stable/diskoverdata/templates/library/base_v1_1_3/utils.py b/ix-dev/stable/diskoverdata/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/stable/diskoverdata/templates/library/base_v1_1_3/utils.py rename to ix-dev/stable/diskoverdata/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/stable/elastic-search/app.yaml b/ix-dev/stable/elastic-search/app.yaml index 0bfa026acc..e6c01ff439 100644 --- a/ix-dev/stable/elastic-search/app.yaml +++ b/ix-dev/stable/elastic-search/app.yaml @@ -10,8 +10,8 @@ icon: https://media.sys.truenas.net/apps/elastic-search/icons/icon.svg keywords: - search - elastic -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -30,4 +30,4 @@ sources: - https://www.elastic.co/guide/en/elasticsearch/reference/master/docker.html#docker-configuration-methods title: Elastic Search train: stable -version: 1.1.11 +version: 1.1.12 diff --git a/ix-dev/stable/elastic-search/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/stable/elastic-search/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/stable/elastic-search/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/stable/elastic-search/templates/library/base_v1_1_3/permissions.py b/ix-dev/stable/elastic-search/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/stable/elastic-search/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/stable/elastic-search/templates/library/base_v1_1_3/__init__.py b/ix-dev/stable/elastic-search/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/stable/elastic-search/templates/library/base_v1_1_3/__init__.py rename to ix-dev/stable/elastic-search/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/stable/elastic-search/templates/library/base_v1_1_3/environment.py b/ix-dev/stable/elastic-search/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/stable/elastic-search/templates/library/base_v1_1_3/environment.py rename to ix-dev/stable/elastic-search/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/stable/elastic-search/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/stable/elastic-search/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/stable/elastic-search/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/stable/elastic-search/templates/library/base_v1_1_3/mariadb.py b/ix-dev/stable/elastic-search/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/stable/elastic-search/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/stable/elastic-search/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/stable/elastic-search/templates/library/base_v1_1_3/metadata.py b/ix-dev/stable/elastic-search/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/stable/elastic-search/templates/library/base_v1_1_3/metadata.py rename to ix-dev/stable/elastic-search/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/stable/elastic-search/templates/library/base_v1_1_3/network.py b/ix-dev/stable/elastic-search/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/stable/elastic-search/templates/library/base_v1_1_3/network.py rename to ix-dev/stable/elastic-search/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/stable/elastic-search/templates/library/base_v1_1_4/permissions.py b/ix-dev/stable/elastic-search/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/stable/elastic-search/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/stable/elastic-search/templates/library/base_v1_1_3/ports.py b/ix-dev/stable/elastic-search/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/stable/elastic-search/templates/library/base_v1_1_3/ports.py rename to ix-dev/stable/elastic-search/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/stable/elastic-search/templates/library/base_v1_1_3/postgres.py b/ix-dev/stable/elastic-search/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/stable/elastic-search/templates/library/base_v1_1_3/postgres.py rename to ix-dev/stable/elastic-search/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/stable/elastic-search/templates/library/base_v1_1_3/redis.py b/ix-dev/stable/elastic-search/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/stable/elastic-search/templates/library/base_v1_1_3/redis.py rename to ix-dev/stable/elastic-search/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/stable/elastic-search/templates/library/base_v1_1_3/resources.py b/ix-dev/stable/elastic-search/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/stable/elastic-search/templates/library/base_v1_1_3/resources.py rename to ix-dev/stable/elastic-search/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/stable/elastic-search/templates/library/base_v1_1_3/security.py b/ix-dev/stable/elastic-search/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/stable/elastic-search/templates/library/base_v1_1_3/security.py rename to ix-dev/stable/elastic-search/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/stable/elastic-search/templates/library/base_v1_1_3/storage.py b/ix-dev/stable/elastic-search/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/stable/elastic-search/templates/library/base_v1_1_3/storage.py rename to ix-dev/stable/elastic-search/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/stable/elastic-search/templates/library/base_v1_1_3/utils.py b/ix-dev/stable/elastic-search/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/stable/elastic-search/templates/library/base_v1_1_3/utils.py rename to ix-dev/stable/elastic-search/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/stable/emby/app.yaml b/ix-dev/stable/emby/app.yaml index 8642af6eb5..17f034ea9f 100644 --- a/ix-dev/stable/emby/app.yaml +++ b/ix-dev/stable/emby/app.yaml @@ -27,8 +27,8 @@ keywords: - series - tv - streaming -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -49,4 +49,4 @@ sources: - https://github.com/truenas/charts/tree/master/charts/emby title: Emby Server train: stable -version: 1.1.12 +version: 1.1.13 diff --git a/ix-dev/stable/emby/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/stable/emby/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/stable/emby/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/stable/emby/templates/library/base_v1_1_3/permissions.py b/ix-dev/stable/emby/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/stable/emby/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/stable/emby/templates/library/base_v1_1_3/__init__.py b/ix-dev/stable/emby/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/stable/emby/templates/library/base_v1_1_3/__init__.py rename to ix-dev/stable/emby/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/stable/emby/templates/library/base_v1_1_3/environment.py b/ix-dev/stable/emby/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/stable/emby/templates/library/base_v1_1_3/environment.py rename to ix-dev/stable/emby/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/stable/emby/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/stable/emby/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/stable/emby/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/stable/emby/templates/library/base_v1_1_3/mariadb.py b/ix-dev/stable/emby/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/stable/emby/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/stable/emby/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/stable/emby/templates/library/base_v1_1_3/metadata.py b/ix-dev/stable/emby/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/stable/emby/templates/library/base_v1_1_3/metadata.py rename to ix-dev/stable/emby/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/stable/emby/templates/library/base_v1_1_3/network.py b/ix-dev/stable/emby/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/stable/emby/templates/library/base_v1_1_3/network.py rename to ix-dev/stable/emby/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/stable/emby/templates/library/base_v1_1_4/permissions.py b/ix-dev/stable/emby/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/stable/emby/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/stable/emby/templates/library/base_v1_1_3/ports.py b/ix-dev/stable/emby/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/stable/emby/templates/library/base_v1_1_3/ports.py rename to ix-dev/stable/emby/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/stable/emby/templates/library/base_v1_1_3/postgres.py b/ix-dev/stable/emby/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/stable/emby/templates/library/base_v1_1_3/postgres.py rename to ix-dev/stable/emby/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/stable/emby/templates/library/base_v1_1_3/redis.py b/ix-dev/stable/emby/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/stable/emby/templates/library/base_v1_1_3/redis.py rename to ix-dev/stable/emby/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/stable/emby/templates/library/base_v1_1_3/resources.py b/ix-dev/stable/emby/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/stable/emby/templates/library/base_v1_1_3/resources.py rename to ix-dev/stable/emby/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/stable/emby/templates/library/base_v1_1_3/security.py b/ix-dev/stable/emby/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/stable/emby/templates/library/base_v1_1_3/security.py rename to ix-dev/stable/emby/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/stable/emby/templates/library/base_v1_1_3/storage.py b/ix-dev/stable/emby/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/stable/emby/templates/library/base_v1_1_3/storage.py rename to ix-dev/stable/emby/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/stable/emby/templates/library/base_v1_1_3/utils.py b/ix-dev/stable/emby/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/stable/emby/templates/library/base_v1_1_3/utils.py rename to ix-dev/stable/emby/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/stable/home-assistant/app.yaml b/ix-dev/stable/home-assistant/app.yaml index be3144525b..3c99c1100b 100644 --- a/ix-dev/stable/home-assistant/app.yaml +++ b/ix-dev/stable/home-assistant/app.yaml @@ -20,8 +20,8 @@ icon: https://media.sys.truenas.net/apps/home-assistant/icons/icon.png keywords: - home-automation - assistant -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -45,4 +45,4 @@ sources: - https://github.com/truenas/charts/tree/master/charts/home-assistant title: Home Assistant train: stable -version: 1.2.20 +version: 1.2.21 diff --git a/ix-dev/stable/home-assistant/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/stable/home-assistant/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/stable/home-assistant/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/stable/home-assistant/templates/library/base_v1_1_3/permissions.py b/ix-dev/stable/home-assistant/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/stable/home-assistant/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/stable/home-assistant/templates/library/base_v1_1_3/__init__.py b/ix-dev/stable/home-assistant/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/stable/home-assistant/templates/library/base_v1_1_3/__init__.py rename to ix-dev/stable/home-assistant/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/stable/home-assistant/templates/library/base_v1_1_3/environment.py b/ix-dev/stable/home-assistant/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/stable/home-assistant/templates/library/base_v1_1_3/environment.py rename to ix-dev/stable/home-assistant/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/stable/home-assistant/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/stable/home-assistant/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/stable/home-assistant/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/stable/home-assistant/templates/library/base_v1_1_3/mariadb.py b/ix-dev/stable/home-assistant/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/stable/home-assistant/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/stable/home-assistant/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/stable/home-assistant/templates/library/base_v1_1_3/metadata.py b/ix-dev/stable/home-assistant/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/stable/home-assistant/templates/library/base_v1_1_3/metadata.py rename to ix-dev/stable/home-assistant/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/stable/home-assistant/templates/library/base_v1_1_3/network.py b/ix-dev/stable/home-assistant/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/stable/home-assistant/templates/library/base_v1_1_3/network.py rename to ix-dev/stable/home-assistant/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/stable/home-assistant/templates/library/base_v1_1_4/permissions.py b/ix-dev/stable/home-assistant/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/stable/home-assistant/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/stable/home-assistant/templates/library/base_v1_1_3/ports.py b/ix-dev/stable/home-assistant/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/stable/home-assistant/templates/library/base_v1_1_3/ports.py rename to ix-dev/stable/home-assistant/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/stable/home-assistant/templates/library/base_v1_1_3/postgres.py b/ix-dev/stable/home-assistant/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/stable/home-assistant/templates/library/base_v1_1_3/postgres.py rename to ix-dev/stable/home-assistant/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/stable/home-assistant/templates/library/base_v1_1_3/redis.py b/ix-dev/stable/home-assistant/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/stable/home-assistant/templates/library/base_v1_1_3/redis.py rename to ix-dev/stable/home-assistant/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/stable/home-assistant/templates/library/base_v1_1_3/resources.py b/ix-dev/stable/home-assistant/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/stable/home-assistant/templates/library/base_v1_1_3/resources.py rename to ix-dev/stable/home-assistant/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/stable/home-assistant/templates/library/base_v1_1_3/security.py b/ix-dev/stable/home-assistant/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/stable/home-assistant/templates/library/base_v1_1_3/security.py rename to ix-dev/stable/home-assistant/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/stable/home-assistant/templates/library/base_v1_1_3/storage.py b/ix-dev/stable/home-assistant/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/stable/home-assistant/templates/library/base_v1_1_3/storage.py rename to ix-dev/stable/home-assistant/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/stable/home-assistant/templates/library/base_v1_1_3/utils.py b/ix-dev/stable/home-assistant/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/stable/home-assistant/templates/library/base_v1_1_3/utils.py rename to ix-dev/stable/home-assistant/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/stable/ix-app/app.yaml b/ix-dev/stable/ix-app/app.yaml index 605eb7e29f..3cd8d5ea9f 100644 --- a/ix-dev/stable/ix-app/app.yaml +++ b/ix-dev/stable/ix-app/app.yaml @@ -7,8 +7,8 @@ home: https://www.truenas.com/ host_mounts: [] icon: https://media.sys.truenas.net/apps/ix-chart/icons/icon.webp keywords: [] -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -19,4 +19,4 @@ screenshots: [] sources: [] title: iX App train: stable -version: 1.0.10 +version: 1.0.11 diff --git a/ix-dev/stable/ix-app/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/stable/ix-app/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/stable/ix-app/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/stable/ix-app/templates/library/base_v1_1_3/permissions.py b/ix-dev/stable/ix-app/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/stable/ix-app/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/stable/ix-app/templates/library/base_v1_1_3/__init__.py b/ix-dev/stable/ix-app/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/stable/ix-app/templates/library/base_v1_1_3/__init__.py rename to ix-dev/stable/ix-app/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/stable/ix-app/templates/library/base_v1_1_3/environment.py b/ix-dev/stable/ix-app/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/stable/ix-app/templates/library/base_v1_1_3/environment.py rename to ix-dev/stable/ix-app/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/stable/ix-app/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/stable/ix-app/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/stable/ix-app/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/stable/ix-app/templates/library/base_v1_1_3/mariadb.py b/ix-dev/stable/ix-app/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/stable/ix-app/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/stable/ix-app/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/stable/ix-app/templates/library/base_v1_1_3/metadata.py b/ix-dev/stable/ix-app/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/stable/ix-app/templates/library/base_v1_1_3/metadata.py rename to ix-dev/stable/ix-app/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/stable/ix-app/templates/library/base_v1_1_3/network.py b/ix-dev/stable/ix-app/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/stable/ix-app/templates/library/base_v1_1_3/network.py rename to ix-dev/stable/ix-app/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/stable/ix-app/templates/library/base_v1_1_4/permissions.py b/ix-dev/stable/ix-app/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/stable/ix-app/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/stable/ix-app/templates/library/base_v1_1_3/ports.py b/ix-dev/stable/ix-app/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/stable/ix-app/templates/library/base_v1_1_3/ports.py rename to ix-dev/stable/ix-app/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/stable/ix-app/templates/library/base_v1_1_3/postgres.py b/ix-dev/stable/ix-app/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/stable/ix-app/templates/library/base_v1_1_3/postgres.py rename to ix-dev/stable/ix-app/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/stable/ix-app/templates/library/base_v1_1_3/redis.py b/ix-dev/stable/ix-app/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/stable/ix-app/templates/library/base_v1_1_3/redis.py rename to ix-dev/stable/ix-app/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/stable/ix-app/templates/library/base_v1_1_3/resources.py b/ix-dev/stable/ix-app/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/stable/ix-app/templates/library/base_v1_1_3/resources.py rename to ix-dev/stable/ix-app/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/stable/ix-app/templates/library/base_v1_1_3/security.py b/ix-dev/stable/ix-app/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/stable/ix-app/templates/library/base_v1_1_3/security.py rename to ix-dev/stable/ix-app/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/stable/ix-app/templates/library/base_v1_1_3/storage.py b/ix-dev/stable/ix-app/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/stable/ix-app/templates/library/base_v1_1_3/storage.py rename to ix-dev/stable/ix-app/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/stable/ix-app/templates/library/base_v1_1_3/utils.py b/ix-dev/stable/ix-app/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/stable/ix-app/templates/library/base_v1_1_3/utils.py rename to ix-dev/stable/ix-app/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/stable/minio/app.yaml b/ix-dev/stable/minio/app.yaml index cc352b0dc7..a61b95bffc 100644 --- a/ix-dev/stable/minio/app.yaml +++ b/ix-dev/stable/minio/app.yaml @@ -10,8 +10,8 @@ keywords: - storage - object-storage - S3 -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -31,4 +31,4 @@ sources: - https://github.com/minio/minio title: MinIO train: stable -version: 1.1.12 +version: 1.1.13 diff --git a/ix-dev/stable/minio/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/stable/minio/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/stable/minio/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/stable/minio/templates/library/base_v1_1_3/permissions.py b/ix-dev/stable/minio/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/stable/minio/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/stable/minio/templates/library/base_v1_1_3/__init__.py b/ix-dev/stable/minio/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/stable/minio/templates/library/base_v1_1_3/__init__.py rename to ix-dev/stable/minio/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/stable/minio/templates/library/base_v1_1_3/environment.py b/ix-dev/stable/minio/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/stable/minio/templates/library/base_v1_1_3/environment.py rename to ix-dev/stable/minio/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/stable/minio/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/stable/minio/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/stable/minio/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/stable/minio/templates/library/base_v1_1_3/mariadb.py b/ix-dev/stable/minio/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/stable/minio/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/stable/minio/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/stable/minio/templates/library/base_v1_1_3/metadata.py b/ix-dev/stable/minio/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/stable/minio/templates/library/base_v1_1_3/metadata.py rename to ix-dev/stable/minio/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/stable/minio/templates/library/base_v1_1_3/network.py b/ix-dev/stable/minio/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/stable/minio/templates/library/base_v1_1_3/network.py rename to ix-dev/stable/minio/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/stable/minio/templates/library/base_v1_1_4/permissions.py b/ix-dev/stable/minio/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/stable/minio/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/stable/minio/templates/library/base_v1_1_3/ports.py b/ix-dev/stable/minio/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/stable/minio/templates/library/base_v1_1_3/ports.py rename to ix-dev/stable/minio/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/stable/minio/templates/library/base_v1_1_3/postgres.py b/ix-dev/stable/minio/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/stable/minio/templates/library/base_v1_1_3/postgres.py rename to ix-dev/stable/minio/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/stable/minio/templates/library/base_v1_1_3/redis.py b/ix-dev/stable/minio/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/stable/minio/templates/library/base_v1_1_3/redis.py rename to ix-dev/stable/minio/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/stable/minio/templates/library/base_v1_1_3/resources.py b/ix-dev/stable/minio/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/stable/minio/templates/library/base_v1_1_3/resources.py rename to ix-dev/stable/minio/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/stable/minio/templates/library/base_v1_1_3/security.py b/ix-dev/stable/minio/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/stable/minio/templates/library/base_v1_1_3/security.py rename to ix-dev/stable/minio/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/stable/minio/templates/library/base_v1_1_3/storage.py b/ix-dev/stable/minio/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/stable/minio/templates/library/base_v1_1_3/storage.py rename to ix-dev/stable/minio/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/stable/minio/templates/library/base_v1_1_3/utils.py b/ix-dev/stable/minio/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/stable/minio/templates/library/base_v1_1_3/utils.py rename to ix-dev/stable/minio/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/stable/netdata/app.yaml b/ix-dev/stable/netdata/app.yaml index 872992ab96..e6b8d8b2f4 100644 --- a/ix-dev/stable/netdata/app.yaml +++ b/ix-dev/stable/netdata/app.yaml @@ -34,8 +34,8 @@ keywords: - alerting - metric - monitoring -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -58,4 +58,4 @@ sources: - https://github.com/netdata/netdata title: Netdata train: stable -version: 1.1.13 +version: 1.1.14 diff --git a/ix-dev/stable/netdata/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/stable/netdata/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/stable/netdata/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/stable/netdata/templates/library/base_v1_1_3/permissions.py b/ix-dev/stable/netdata/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/stable/netdata/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/stable/netdata/templates/library/base_v1_1_3/__init__.py b/ix-dev/stable/netdata/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/stable/netdata/templates/library/base_v1_1_3/__init__.py rename to ix-dev/stable/netdata/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/stable/netdata/templates/library/base_v1_1_3/environment.py b/ix-dev/stable/netdata/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/stable/netdata/templates/library/base_v1_1_3/environment.py rename to ix-dev/stable/netdata/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/stable/netdata/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/stable/netdata/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/stable/netdata/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/stable/netdata/templates/library/base_v1_1_3/mariadb.py b/ix-dev/stable/netdata/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/stable/netdata/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/stable/netdata/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/stable/netdata/templates/library/base_v1_1_3/metadata.py b/ix-dev/stable/netdata/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/stable/netdata/templates/library/base_v1_1_3/metadata.py rename to ix-dev/stable/netdata/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/stable/netdata/templates/library/base_v1_1_3/network.py b/ix-dev/stable/netdata/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/stable/netdata/templates/library/base_v1_1_3/network.py rename to ix-dev/stable/netdata/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/stable/netdata/templates/library/base_v1_1_4/permissions.py b/ix-dev/stable/netdata/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/stable/netdata/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/stable/netdata/templates/library/base_v1_1_3/ports.py b/ix-dev/stable/netdata/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/stable/netdata/templates/library/base_v1_1_3/ports.py rename to ix-dev/stable/netdata/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/stable/netdata/templates/library/base_v1_1_3/postgres.py b/ix-dev/stable/netdata/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/stable/netdata/templates/library/base_v1_1_3/postgres.py rename to ix-dev/stable/netdata/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/stable/netdata/templates/library/base_v1_1_3/redis.py b/ix-dev/stable/netdata/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/stable/netdata/templates/library/base_v1_1_3/redis.py rename to ix-dev/stable/netdata/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/stable/netdata/templates/library/base_v1_1_3/resources.py b/ix-dev/stable/netdata/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/stable/netdata/templates/library/base_v1_1_3/resources.py rename to ix-dev/stable/netdata/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/stable/netdata/templates/library/base_v1_1_3/security.py b/ix-dev/stable/netdata/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/stable/netdata/templates/library/base_v1_1_3/security.py rename to ix-dev/stable/netdata/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/stable/netdata/templates/library/base_v1_1_3/storage.py b/ix-dev/stable/netdata/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/stable/netdata/templates/library/base_v1_1_3/storage.py rename to ix-dev/stable/netdata/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/stable/netdata/templates/library/base_v1_1_3/utils.py b/ix-dev/stable/netdata/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/stable/netdata/templates/library/base_v1_1_3/utils.py rename to ix-dev/stable/netdata/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/stable/nextcloud/app.yaml b/ix-dev/stable/nextcloud/app.yaml index 25b0a0cf7e..7be405dcb6 100644 --- a/ix-dev/stable/nextcloud/app.yaml +++ b/ix-dev/stable/nextcloud/app.yaml @@ -2,8 +2,7 @@ app_version: 30.0.0 capabilities: - description: Nextcloud and Nginx are able to chown files. name: CHOWN -- description: Nextcloud and Nginx are able to bypass permission checks - for it's sub-processes. +- description: Nextcloud and Nginx are able to bypass permission checks for it's sub-processes. name: FOWNER - description: Nextcloud and Nginx are able to bypass permission checks. name: DAC_OVERRIDE @@ -29,8 +28,8 @@ keywords: - http - web - php -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -67,4 +66,4 @@ sources: - https://github.com/truenas/charts/tree/master/charts/nextcloud title: Nextcloud train: stable -version: 1.3.19 +version: 1.3.20 diff --git a/ix-dev/stable/nextcloud/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/stable/nextcloud/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/stable/nextcloud/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/stable/nextcloud/templates/library/base_v1_1_3/permissions.py b/ix-dev/stable/nextcloud/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/stable/nextcloud/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/stable/nextcloud/templates/library/base_v1_1_3/__init__.py b/ix-dev/stable/nextcloud/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/stable/nextcloud/templates/library/base_v1_1_3/__init__.py rename to ix-dev/stable/nextcloud/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/stable/nextcloud/templates/library/base_v1_1_3/environment.py b/ix-dev/stable/nextcloud/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/stable/nextcloud/templates/library/base_v1_1_3/environment.py rename to ix-dev/stable/nextcloud/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/stable/nextcloud/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/stable/nextcloud/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/stable/nextcloud/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/stable/nextcloud/templates/library/base_v1_1_3/mariadb.py b/ix-dev/stable/nextcloud/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/stable/nextcloud/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/stable/nextcloud/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/stable/nextcloud/templates/library/base_v1_1_3/metadata.py b/ix-dev/stable/nextcloud/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/stable/nextcloud/templates/library/base_v1_1_3/metadata.py rename to ix-dev/stable/nextcloud/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/stable/nextcloud/templates/library/base_v1_1_3/network.py b/ix-dev/stable/nextcloud/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/stable/nextcloud/templates/library/base_v1_1_3/network.py rename to ix-dev/stable/nextcloud/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/stable/nextcloud/templates/library/base_v1_1_4/permissions.py b/ix-dev/stable/nextcloud/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/stable/nextcloud/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/stable/nextcloud/templates/library/base_v1_1_3/ports.py b/ix-dev/stable/nextcloud/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/stable/nextcloud/templates/library/base_v1_1_3/ports.py rename to ix-dev/stable/nextcloud/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/stable/nextcloud/templates/library/base_v1_1_3/postgres.py b/ix-dev/stable/nextcloud/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/stable/nextcloud/templates/library/base_v1_1_3/postgres.py rename to ix-dev/stable/nextcloud/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/stable/nextcloud/templates/library/base_v1_1_3/redis.py b/ix-dev/stable/nextcloud/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/stable/nextcloud/templates/library/base_v1_1_3/redis.py rename to ix-dev/stable/nextcloud/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/stable/nextcloud/templates/library/base_v1_1_3/resources.py b/ix-dev/stable/nextcloud/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/stable/nextcloud/templates/library/base_v1_1_3/resources.py rename to ix-dev/stable/nextcloud/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/stable/nextcloud/templates/library/base_v1_1_3/security.py b/ix-dev/stable/nextcloud/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/stable/nextcloud/templates/library/base_v1_1_3/security.py rename to ix-dev/stable/nextcloud/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/stable/nextcloud/templates/library/base_v1_1_3/storage.py b/ix-dev/stable/nextcloud/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/stable/nextcloud/templates/library/base_v1_1_3/storage.py rename to ix-dev/stable/nextcloud/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/stable/nextcloud/templates/library/base_v1_1_3/utils.py b/ix-dev/stable/nextcloud/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/stable/nextcloud/templates/library/base_v1_1_3/utils.py rename to ix-dev/stable/nextcloud/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/stable/photoprism/app.yaml b/ix-dev/stable/photoprism/app.yaml index e8ebb294d9..3dd82228b4 100644 --- a/ix-dev/stable/photoprism/app.yaml +++ b/ix-dev/stable/photoprism/app.yaml @@ -22,8 +22,8 @@ keywords: - media - photos - image -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -42,4 +42,4 @@ sources: - https://photoprism.app/ title: Photoprism train: stable -version: 1.1.13 +version: 1.1.14 diff --git a/ix-dev/stable/photoprism/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/stable/photoprism/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/stable/photoprism/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/stable/photoprism/templates/library/base_v1_1_3/permissions.py b/ix-dev/stable/photoprism/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/stable/photoprism/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/stable/photoprism/templates/library/base_v1_1_3/__init__.py b/ix-dev/stable/photoprism/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/stable/photoprism/templates/library/base_v1_1_3/__init__.py rename to ix-dev/stable/photoprism/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/stable/photoprism/templates/library/base_v1_1_3/environment.py b/ix-dev/stable/photoprism/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/stable/photoprism/templates/library/base_v1_1_3/environment.py rename to ix-dev/stable/photoprism/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/stable/photoprism/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/stable/photoprism/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/stable/photoprism/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/stable/photoprism/templates/library/base_v1_1_3/mariadb.py b/ix-dev/stable/photoprism/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/stable/photoprism/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/stable/photoprism/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/stable/photoprism/templates/library/base_v1_1_3/metadata.py b/ix-dev/stable/photoprism/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/stable/photoprism/templates/library/base_v1_1_3/metadata.py rename to ix-dev/stable/photoprism/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/stable/photoprism/templates/library/base_v1_1_3/network.py b/ix-dev/stable/photoprism/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/stable/photoprism/templates/library/base_v1_1_3/network.py rename to ix-dev/stable/photoprism/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/stable/photoprism/templates/library/base_v1_1_4/permissions.py b/ix-dev/stable/photoprism/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/stable/photoprism/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/stable/photoprism/templates/library/base_v1_1_3/ports.py b/ix-dev/stable/photoprism/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/stable/photoprism/templates/library/base_v1_1_3/ports.py rename to ix-dev/stable/photoprism/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/stable/photoprism/templates/library/base_v1_1_3/postgres.py b/ix-dev/stable/photoprism/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/stable/photoprism/templates/library/base_v1_1_3/postgres.py rename to ix-dev/stable/photoprism/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/stable/photoprism/templates/library/base_v1_1_3/redis.py b/ix-dev/stable/photoprism/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/stable/photoprism/templates/library/base_v1_1_3/redis.py rename to ix-dev/stable/photoprism/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/stable/photoprism/templates/library/base_v1_1_3/resources.py b/ix-dev/stable/photoprism/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/stable/photoprism/templates/library/base_v1_1_3/resources.py rename to ix-dev/stable/photoprism/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/stable/photoprism/templates/library/base_v1_1_3/security.py b/ix-dev/stable/photoprism/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/stable/photoprism/templates/library/base_v1_1_3/security.py rename to ix-dev/stable/photoprism/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/stable/photoprism/templates/library/base_v1_1_3/storage.py b/ix-dev/stable/photoprism/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/stable/photoprism/templates/library/base_v1_1_3/storage.py rename to ix-dev/stable/photoprism/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/stable/photoprism/templates/library/base_v1_1_3/utils.py b/ix-dev/stable/photoprism/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/stable/photoprism/templates/library/base_v1_1_3/utils.py rename to ix-dev/stable/photoprism/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/stable/pihole/app.yaml b/ix-dev/stable/pihole/app.yaml index bd569765f7..eab25408ae 100644 --- a/ix-dev/stable/pihole/app.yaml +++ b/ix-dev/stable/pihole/app.yaml @@ -33,8 +33,8 @@ icon: https://media.sys.truenas.net/apps/pihole/icons/icon.png keywords: - networking - dns -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -53,4 +53,4 @@ sources: - https://github.com/truenas/charts/tree/master/charts/pihole title: Pi-hole train: stable -version: 1.1.10 +version: 1.1.11 diff --git a/ix-dev/stable/pihole/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/stable/pihole/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/stable/pihole/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/stable/pihole/templates/library/base_v1_1_3/permissions.py b/ix-dev/stable/pihole/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/stable/pihole/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/stable/pihole/templates/library/base_v1_1_3/__init__.py b/ix-dev/stable/pihole/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/stable/pihole/templates/library/base_v1_1_3/__init__.py rename to ix-dev/stable/pihole/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/stable/pihole/templates/library/base_v1_1_3/environment.py b/ix-dev/stable/pihole/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/stable/pihole/templates/library/base_v1_1_3/environment.py rename to ix-dev/stable/pihole/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/stable/pihole/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/stable/pihole/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/stable/pihole/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/stable/pihole/templates/library/base_v1_1_3/mariadb.py b/ix-dev/stable/pihole/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/stable/pihole/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/stable/pihole/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/stable/pihole/templates/library/base_v1_1_3/metadata.py b/ix-dev/stable/pihole/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/stable/pihole/templates/library/base_v1_1_3/metadata.py rename to ix-dev/stable/pihole/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/stable/pihole/templates/library/base_v1_1_3/network.py b/ix-dev/stable/pihole/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/stable/pihole/templates/library/base_v1_1_3/network.py rename to ix-dev/stable/pihole/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/stable/pihole/templates/library/base_v1_1_4/permissions.py b/ix-dev/stable/pihole/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/stable/pihole/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/stable/pihole/templates/library/base_v1_1_3/ports.py b/ix-dev/stable/pihole/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/stable/pihole/templates/library/base_v1_1_3/ports.py rename to ix-dev/stable/pihole/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/stable/pihole/templates/library/base_v1_1_3/postgres.py b/ix-dev/stable/pihole/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/stable/pihole/templates/library/base_v1_1_3/postgres.py rename to ix-dev/stable/pihole/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/stable/pihole/templates/library/base_v1_1_3/redis.py b/ix-dev/stable/pihole/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/stable/pihole/templates/library/base_v1_1_3/redis.py rename to ix-dev/stable/pihole/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/stable/pihole/templates/library/base_v1_1_3/resources.py b/ix-dev/stable/pihole/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/stable/pihole/templates/library/base_v1_1_3/resources.py rename to ix-dev/stable/pihole/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/stable/pihole/templates/library/base_v1_1_3/security.py b/ix-dev/stable/pihole/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/stable/pihole/templates/library/base_v1_1_3/security.py rename to ix-dev/stable/pihole/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/stable/pihole/templates/library/base_v1_1_3/storage.py b/ix-dev/stable/pihole/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/stable/pihole/templates/library/base_v1_1_3/storage.py rename to ix-dev/stable/pihole/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/stable/pihole/templates/library/base_v1_1_3/utils.py b/ix-dev/stable/pihole/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/stable/pihole/templates/library/base_v1_1_3/utils.py rename to ix-dev/stable/pihole/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/stable/plex/app.yaml b/ix-dev/stable/plex/app.yaml index e783e30d67..7594552958 100644 --- a/ix-dev/stable/plex/app.yaml +++ b/ix-dev/stable/plex/app.yaml @@ -27,8 +27,8 @@ keywords: - series - tv - streaming -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -48,4 +48,4 @@ sources: - https://hub.docker.com/r/plexinc/pms-docker title: Plex train: stable -version: 1.0.22 +version: 1.0.23 diff --git a/ix-dev/stable/plex/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/stable/plex/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/stable/plex/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/stable/plex/templates/library/base_v1_1_3/permissions.py b/ix-dev/stable/plex/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/stable/plex/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/stable/plex/templates/library/base_v1_1_3/__init__.py b/ix-dev/stable/plex/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/stable/plex/templates/library/base_v1_1_3/__init__.py rename to ix-dev/stable/plex/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/stable/plex/templates/library/base_v1_1_3/environment.py b/ix-dev/stable/plex/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/stable/plex/templates/library/base_v1_1_3/environment.py rename to ix-dev/stable/plex/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/stable/plex/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/stable/plex/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/stable/plex/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/stable/plex/templates/library/base_v1_1_3/mariadb.py b/ix-dev/stable/plex/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/stable/plex/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/stable/plex/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/stable/plex/templates/library/base_v1_1_3/metadata.py b/ix-dev/stable/plex/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/stable/plex/templates/library/base_v1_1_3/metadata.py rename to ix-dev/stable/plex/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/stable/plex/templates/library/base_v1_1_3/network.py b/ix-dev/stable/plex/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/stable/plex/templates/library/base_v1_1_3/network.py rename to ix-dev/stable/plex/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/stable/plex/templates/library/base_v1_1_4/permissions.py b/ix-dev/stable/plex/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/stable/plex/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/stable/plex/templates/library/base_v1_1_3/ports.py b/ix-dev/stable/plex/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/stable/plex/templates/library/base_v1_1_3/ports.py rename to ix-dev/stable/plex/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/stable/plex/templates/library/base_v1_1_3/postgres.py b/ix-dev/stable/plex/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/stable/plex/templates/library/base_v1_1_3/postgres.py rename to ix-dev/stable/plex/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/stable/plex/templates/library/base_v1_1_3/redis.py b/ix-dev/stable/plex/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/stable/plex/templates/library/base_v1_1_3/redis.py rename to ix-dev/stable/plex/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/stable/plex/templates/library/base_v1_1_3/resources.py b/ix-dev/stable/plex/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/stable/plex/templates/library/base_v1_1_3/resources.py rename to ix-dev/stable/plex/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/stable/plex/templates/library/base_v1_1_3/security.py b/ix-dev/stable/plex/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/stable/plex/templates/library/base_v1_1_3/security.py rename to ix-dev/stable/plex/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/stable/plex/templates/library/base_v1_1_3/storage.py b/ix-dev/stable/plex/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/stable/plex/templates/library/base_v1_1_3/storage.py rename to ix-dev/stable/plex/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/stable/plex/templates/library/base_v1_1_3/utils.py b/ix-dev/stable/plex/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/stable/plex/templates/library/base_v1_1_3/utils.py rename to ix-dev/stable/plex/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/stable/prometheus/app.yaml b/ix-dev/stable/prometheus/app.yaml index cef05c3b08..f3c57bb0a8 100644 --- a/ix-dev/stable/prometheus/app.yaml +++ b/ix-dev/stable/prometheus/app.yaml @@ -9,8 +9,8 @@ icon: https://media.sys.truenas.net/apps/prometheus/icons/icon.png keywords: - metrics - prometheus -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -30,4 +30,4 @@ sources: - https://prometheus.io title: Prometheus train: stable -version: 1.1.10 +version: 1.1.11 diff --git a/ix-dev/stable/prometheus/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/stable/prometheus/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/stable/prometheus/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/stable/prometheus/templates/library/base_v1_1_3/permissions.py b/ix-dev/stable/prometheus/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/stable/prometheus/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/stable/prometheus/templates/library/base_v1_1_3/__init__.py b/ix-dev/stable/prometheus/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/stable/prometheus/templates/library/base_v1_1_3/__init__.py rename to ix-dev/stable/prometheus/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/stable/prometheus/templates/library/base_v1_1_3/environment.py b/ix-dev/stable/prometheus/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/stable/prometheus/templates/library/base_v1_1_3/environment.py rename to ix-dev/stable/prometheus/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/stable/prometheus/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/stable/prometheus/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/stable/prometheus/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/stable/prometheus/templates/library/base_v1_1_3/mariadb.py b/ix-dev/stable/prometheus/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/stable/prometheus/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/stable/prometheus/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/stable/prometheus/templates/library/base_v1_1_3/metadata.py b/ix-dev/stable/prometheus/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/stable/prometheus/templates/library/base_v1_1_3/metadata.py rename to ix-dev/stable/prometheus/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/stable/prometheus/templates/library/base_v1_1_3/network.py b/ix-dev/stable/prometheus/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/stable/prometheus/templates/library/base_v1_1_3/network.py rename to ix-dev/stable/prometheus/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/stable/prometheus/templates/library/base_v1_1_4/permissions.py b/ix-dev/stable/prometheus/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/stable/prometheus/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/stable/prometheus/templates/library/base_v1_1_3/ports.py b/ix-dev/stable/prometheus/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/stable/prometheus/templates/library/base_v1_1_3/ports.py rename to ix-dev/stable/prometheus/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/stable/prometheus/templates/library/base_v1_1_3/postgres.py b/ix-dev/stable/prometheus/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/stable/prometheus/templates/library/base_v1_1_3/postgres.py rename to ix-dev/stable/prometheus/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/stable/prometheus/templates/library/base_v1_1_3/redis.py b/ix-dev/stable/prometheus/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/stable/prometheus/templates/library/base_v1_1_3/redis.py rename to ix-dev/stable/prometheus/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/stable/prometheus/templates/library/base_v1_1_3/resources.py b/ix-dev/stable/prometheus/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/stable/prometheus/templates/library/base_v1_1_3/resources.py rename to ix-dev/stable/prometheus/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/stable/prometheus/templates/library/base_v1_1_3/security.py b/ix-dev/stable/prometheus/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/stable/prometheus/templates/library/base_v1_1_3/security.py rename to ix-dev/stable/prometheus/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/stable/prometheus/templates/library/base_v1_1_3/storage.py b/ix-dev/stable/prometheus/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/stable/prometheus/templates/library/base_v1_1_3/storage.py rename to ix-dev/stable/prometheus/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/stable/prometheus/templates/library/base_v1_1_3/utils.py b/ix-dev/stable/prometheus/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/stable/prometheus/templates/library/base_v1_1_3/utils.py rename to ix-dev/stable/prometheus/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/stable/storj/app.yaml b/ix-dev/stable/storj/app.yaml index e7763516c1..c1d1587937 100644 --- a/ix-dev/stable/storj/app.yaml +++ b/ix-dev/stable/storj/app.yaml @@ -18,8 +18,8 @@ keywords: - networking - financial - file-sharing -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -37,4 +37,4 @@ sources: - https://www.storj.io title: Storj train: stable -version: 1.1.9 +version: 1.1.10 diff --git a/ix-dev/stable/storj/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/stable/storj/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/stable/storj/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/stable/storj/templates/library/base_v1_1_3/permissions.py b/ix-dev/stable/storj/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/stable/storj/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/stable/storj/templates/library/base_v1_1_3/__init__.py b/ix-dev/stable/storj/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/stable/storj/templates/library/base_v1_1_3/__init__.py rename to ix-dev/stable/storj/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/stable/storj/templates/library/base_v1_1_3/environment.py b/ix-dev/stable/storj/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/stable/storj/templates/library/base_v1_1_3/environment.py rename to ix-dev/stable/storj/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/stable/storj/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/stable/storj/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/stable/storj/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/stable/storj/templates/library/base_v1_1_3/mariadb.py b/ix-dev/stable/storj/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/stable/storj/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/stable/storj/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/stable/storj/templates/library/base_v1_1_3/metadata.py b/ix-dev/stable/storj/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/stable/storj/templates/library/base_v1_1_3/metadata.py rename to ix-dev/stable/storj/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/stable/storj/templates/library/base_v1_1_3/network.py b/ix-dev/stable/storj/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/stable/storj/templates/library/base_v1_1_3/network.py rename to ix-dev/stable/storj/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/stable/storj/templates/library/base_v1_1_4/permissions.py b/ix-dev/stable/storj/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/stable/storj/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/stable/storj/templates/library/base_v1_1_3/ports.py b/ix-dev/stable/storj/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/stable/storj/templates/library/base_v1_1_3/ports.py rename to ix-dev/stable/storj/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/stable/storj/templates/library/base_v1_1_3/postgres.py b/ix-dev/stable/storj/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/stable/storj/templates/library/base_v1_1_3/postgres.py rename to ix-dev/stable/storj/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/stable/storj/templates/library/base_v1_1_3/redis.py b/ix-dev/stable/storj/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/stable/storj/templates/library/base_v1_1_3/redis.py rename to ix-dev/stable/storj/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/stable/storj/templates/library/base_v1_1_3/resources.py b/ix-dev/stable/storj/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/stable/storj/templates/library/base_v1_1_3/resources.py rename to ix-dev/stable/storj/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/stable/storj/templates/library/base_v1_1_3/security.py b/ix-dev/stable/storj/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/stable/storj/templates/library/base_v1_1_3/security.py rename to ix-dev/stable/storj/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/stable/storj/templates/library/base_v1_1_3/storage.py b/ix-dev/stable/storj/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/stable/storj/templates/library/base_v1_1_3/storage.py rename to ix-dev/stable/storj/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/stable/storj/templates/library/base_v1_1_3/utils.py b/ix-dev/stable/storj/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/stable/storj/templates/library/base_v1_1_3/utils.py rename to ix-dev/stable/storj/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/stable/syncthing/app.yaml b/ix-dev/stable/syncthing/app.yaml index 7b7d1e7481..f1609e4af0 100644 --- a/ix-dev/stable/syncthing/app.yaml +++ b/ix-dev/stable/syncthing/app.yaml @@ -26,8 +26,8 @@ keywords: - sync - file-sharing - backup -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -50,4 +50,4 @@ sources: - https://hub.docker.com/r/syncthing/syncthing title: Syncthing train: stable -version: 1.0.26 +version: 1.0.27 diff --git a/ix-dev/stable/syncthing/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/stable/syncthing/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/stable/syncthing/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/stable/syncthing/templates/library/base_v1_1_3/permissions.py b/ix-dev/stable/syncthing/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/stable/syncthing/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/stable/syncthing/templates/library/base_v1_1_3/__init__.py b/ix-dev/stable/syncthing/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/stable/syncthing/templates/library/base_v1_1_3/__init__.py rename to ix-dev/stable/syncthing/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/stable/syncthing/templates/library/base_v1_1_3/environment.py b/ix-dev/stable/syncthing/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/stable/syncthing/templates/library/base_v1_1_3/environment.py rename to ix-dev/stable/syncthing/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/stable/syncthing/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/stable/syncthing/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/stable/syncthing/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/stable/syncthing/templates/library/base_v1_1_3/mariadb.py b/ix-dev/stable/syncthing/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/stable/syncthing/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/stable/syncthing/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/stable/syncthing/templates/library/base_v1_1_3/metadata.py b/ix-dev/stable/syncthing/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/stable/syncthing/templates/library/base_v1_1_3/metadata.py rename to ix-dev/stable/syncthing/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/stable/syncthing/templates/library/base_v1_1_3/network.py b/ix-dev/stable/syncthing/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/stable/syncthing/templates/library/base_v1_1_3/network.py rename to ix-dev/stable/syncthing/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/stable/syncthing/templates/library/base_v1_1_4/permissions.py b/ix-dev/stable/syncthing/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/stable/syncthing/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/stable/syncthing/templates/library/base_v1_1_3/ports.py b/ix-dev/stable/syncthing/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/stable/syncthing/templates/library/base_v1_1_3/ports.py rename to ix-dev/stable/syncthing/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/stable/syncthing/templates/library/base_v1_1_3/postgres.py b/ix-dev/stable/syncthing/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/stable/syncthing/templates/library/base_v1_1_3/postgres.py rename to ix-dev/stable/syncthing/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/stable/syncthing/templates/library/base_v1_1_3/redis.py b/ix-dev/stable/syncthing/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/stable/syncthing/templates/library/base_v1_1_3/redis.py rename to ix-dev/stable/syncthing/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/stable/syncthing/templates/library/base_v1_1_3/resources.py b/ix-dev/stable/syncthing/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/stable/syncthing/templates/library/base_v1_1_3/resources.py rename to ix-dev/stable/syncthing/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/stable/syncthing/templates/library/base_v1_1_3/security.py b/ix-dev/stable/syncthing/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/stable/syncthing/templates/library/base_v1_1_3/security.py rename to ix-dev/stable/syncthing/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/stable/syncthing/templates/library/base_v1_1_3/storage.py b/ix-dev/stable/syncthing/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/stable/syncthing/templates/library/base_v1_1_3/storage.py rename to ix-dev/stable/syncthing/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/stable/syncthing/templates/library/base_v1_1_3/utils.py b/ix-dev/stable/syncthing/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/stable/syncthing/templates/library/base_v1_1_3/utils.py rename to ix-dev/stable/syncthing/templates/library/base_v1_1_4/utils.py diff --git a/ix-dev/stable/wg-easy/app.yaml b/ix-dev/stable/wg-easy/app.yaml index ebd9d96869..2080af7c54 100644 --- a/ix-dev/stable/wg-easy/app.yaml +++ b/ix-dev/stable/wg-easy/app.yaml @@ -16,8 +16,8 @@ keywords: - wireguard - network - vpn -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -35,4 +35,4 @@ sources: - https://github.com/wg-easy/wg-easy title: WG Easy train: stable -version: 1.0.19 +version: 1.0.20 diff --git a/ix-dev/stable/wg-easy/templates/library/base_v1_1_3/healthchecks.py b/ix-dev/stable/wg-easy/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/ix-dev/stable/wg-easy/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/stable/wg-easy/templates/library/base_v1_1_3/permissions.py b/ix-dev/stable/wg-easy/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/ix-dev/stable/wg-easy/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/ix-dev/stable/wg-easy/templates/library/base_v1_1_3/__init__.py b/ix-dev/stable/wg-easy/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from ix-dev/stable/wg-easy/templates/library/base_v1_1_3/__init__.py rename to ix-dev/stable/wg-easy/templates/library/base_v1_1_4/__init__.py diff --git a/ix-dev/stable/wg-easy/templates/library/base_v1_1_3/environment.py b/ix-dev/stable/wg-easy/templates/library/base_v1_1_4/environment.py similarity index 100% rename from ix-dev/stable/wg-easy/templates/library/base_v1_1_3/environment.py rename to ix-dev/stable/wg-easy/templates/library/base_v1_1_4/environment.py diff --git a/ix-dev/stable/wg-easy/templates/library/base_v1_1_4/healthchecks.py b/ix-dev/stable/wg-easy/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/ix-dev/stable/wg-easy/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/ix-dev/stable/wg-easy/templates/library/base_v1_1_3/mariadb.py b/ix-dev/stable/wg-easy/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from ix-dev/stable/wg-easy/templates/library/base_v1_1_3/mariadb.py rename to ix-dev/stable/wg-easy/templates/library/base_v1_1_4/mariadb.py diff --git a/ix-dev/stable/wg-easy/templates/library/base_v1_1_3/metadata.py b/ix-dev/stable/wg-easy/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from ix-dev/stable/wg-easy/templates/library/base_v1_1_3/metadata.py rename to ix-dev/stable/wg-easy/templates/library/base_v1_1_4/metadata.py diff --git a/ix-dev/stable/wg-easy/templates/library/base_v1_1_3/network.py b/ix-dev/stable/wg-easy/templates/library/base_v1_1_4/network.py similarity index 100% rename from ix-dev/stable/wg-easy/templates/library/base_v1_1_3/network.py rename to ix-dev/stable/wg-easy/templates/library/base_v1_1_4/network.py diff --git a/ix-dev/stable/wg-easy/templates/library/base_v1_1_4/permissions.py b/ix-dev/stable/wg-easy/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/ix-dev/stable/wg-easy/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/ix-dev/stable/wg-easy/templates/library/base_v1_1_3/ports.py b/ix-dev/stable/wg-easy/templates/library/base_v1_1_4/ports.py similarity index 100% rename from ix-dev/stable/wg-easy/templates/library/base_v1_1_3/ports.py rename to ix-dev/stable/wg-easy/templates/library/base_v1_1_4/ports.py diff --git a/ix-dev/stable/wg-easy/templates/library/base_v1_1_3/postgres.py b/ix-dev/stable/wg-easy/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from ix-dev/stable/wg-easy/templates/library/base_v1_1_3/postgres.py rename to ix-dev/stable/wg-easy/templates/library/base_v1_1_4/postgres.py diff --git a/ix-dev/stable/wg-easy/templates/library/base_v1_1_3/redis.py b/ix-dev/stable/wg-easy/templates/library/base_v1_1_4/redis.py similarity index 100% rename from ix-dev/stable/wg-easy/templates/library/base_v1_1_3/redis.py rename to ix-dev/stable/wg-easy/templates/library/base_v1_1_4/redis.py diff --git a/ix-dev/stable/wg-easy/templates/library/base_v1_1_3/resources.py b/ix-dev/stable/wg-easy/templates/library/base_v1_1_4/resources.py similarity index 100% rename from ix-dev/stable/wg-easy/templates/library/base_v1_1_3/resources.py rename to ix-dev/stable/wg-easy/templates/library/base_v1_1_4/resources.py diff --git a/ix-dev/stable/wg-easy/templates/library/base_v1_1_3/security.py b/ix-dev/stable/wg-easy/templates/library/base_v1_1_4/security.py similarity index 100% rename from ix-dev/stable/wg-easy/templates/library/base_v1_1_3/security.py rename to ix-dev/stable/wg-easy/templates/library/base_v1_1_4/security.py diff --git a/ix-dev/stable/wg-easy/templates/library/base_v1_1_3/storage.py b/ix-dev/stable/wg-easy/templates/library/base_v1_1_4/storage.py similarity index 100% rename from ix-dev/stable/wg-easy/templates/library/base_v1_1_3/storage.py rename to ix-dev/stable/wg-easy/templates/library/base_v1_1_4/storage.py diff --git a/ix-dev/stable/wg-easy/templates/library/base_v1_1_3/utils.py b/ix-dev/stable/wg-easy/templates/library/base_v1_1_4/utils.py similarity index 100% rename from ix-dev/stable/wg-easy/templates/library/base_v1_1_3/utils.py rename to ix-dev/stable/wg-easy/templates/library/base_v1_1_4/utils.py diff --git a/library/1.1.3/healthchecks.py b/library/1.1.3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/library/1.1.3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/library/1.1.3/permissions.py b/library/1.1.3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/library/1.1.3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/library/1.1.3/__init__.py b/library/1.1.4/__init__.py similarity index 100% rename from library/1.1.3/__init__.py rename to library/1.1.4/__init__.py diff --git a/library/1.1.3/environment.py b/library/1.1.4/environment.py similarity index 100% rename from library/1.1.3/environment.py rename to library/1.1.4/environment.py diff --git a/library/1.1.4/healthchecks.py b/library/1.1.4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/library/1.1.4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/library/1.1.3/mariadb.py b/library/1.1.4/mariadb.py similarity index 100% rename from library/1.1.3/mariadb.py rename to library/1.1.4/mariadb.py diff --git a/library/1.1.3/metadata.py b/library/1.1.4/metadata.py similarity index 100% rename from library/1.1.3/metadata.py rename to library/1.1.4/metadata.py diff --git a/library/1.1.3/network.py b/library/1.1.4/network.py similarity index 100% rename from library/1.1.3/network.py rename to library/1.1.4/network.py diff --git a/library/1.1.4/permissions.py b/library/1.1.4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/library/1.1.4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/library/1.1.3/ports.py b/library/1.1.4/ports.py similarity index 100% rename from library/1.1.3/ports.py rename to library/1.1.4/ports.py diff --git a/library/1.1.3/postgres.py b/library/1.1.4/postgres.py similarity index 100% rename from library/1.1.3/postgres.py rename to library/1.1.4/postgres.py diff --git a/library/1.1.3/redis.py b/library/1.1.4/redis.py similarity index 100% rename from library/1.1.3/redis.py rename to library/1.1.4/redis.py diff --git a/library/1.1.3/resources.py b/library/1.1.4/resources.py similarity index 100% rename from library/1.1.3/resources.py rename to library/1.1.4/resources.py diff --git a/library/1.1.3/security.py b/library/1.1.4/security.py similarity index 100% rename from library/1.1.3/security.py rename to library/1.1.4/security.py diff --git a/library/1.1.3/storage.py b/library/1.1.4/storage.py similarity index 100% rename from library/1.1.3/storage.py rename to library/1.1.4/storage.py diff --git a/library/1.1.3/utils.py b/library/1.1.4/utils.py similarity index 100% rename from library/1.1.3/utils.py rename to library/1.1.4/utils.py diff --git a/library/hashes.yaml b/library/hashes.yaml index b9d6481cbf..6067c8ffd9 100644 --- a/library/hashes.yaml +++ b/library/hashes.yaml @@ -1,2 +1,2 @@ 0.0.1: f074617a82a86d2a6cc78a4c8a4296fc9d168e456f12713e50c696557b302133 -1.1.3: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +1.1.4: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 From b070008d5c31b056317263f2018eb43b1a3726f8 Mon Sep 17 00:00:00 2001 From: sonicaj Date: Wed, 16 Oct 2024 17:52:00 +0000 Subject: [PATCH 02/13] Publish new changes in catalog [skip ci] --- .../{1.1.12 => 1.1.13}/README.md | 0 .../actual-budget/{1.1.12 => 1.1.13}/app.yaml | 6 +- .../{1.1.12 => 1.1.13}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../{1.1.12 => 1.1.13}/questions.yaml | 0 .../templates/docker-compose.yaml | 2 +- .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4}/healthchecks.py | 7 +- .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4}/permissions.py | 6 +- .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../templates/test_values/hostnet-values.yaml | 0 .../templates/test_values/https-values.yaml | 0 .../adguard-home/{1.0.21 => 1.0.22}/README.md | 0 .../adguard-home/{1.0.21 => 1.0.22}/app.yaml | 6 +- .../{1.0.21 => 1.0.22}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../{1.0.21 => 1.0.22}/questions.yaml | 0 .../templates/docker-compose.yaml | 2 +- .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4}/healthchecks.py | 7 +- .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4}/permissions.py | 6 +- .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../templates/test_values/dhcp-values.yaml | 0 .../{1.2.13 => 1.2.14}/README.md | 0 .../{1.2.13 => 1.2.14}/app.yaml | 6 +- .../{1.2.13 => 1.2.14}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../{1.2.13 => 1.2.14}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4}/healthchecks.py | 7 +- .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4}/permissions.py | 6 +- .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../autobrr/{1.1.13 => 1.1.14}/README.md | 0 .../autobrr/{1.1.13 => 1.1.14}/app.yaml | 6 +- .../autobrr/{1.1.13 => 1.1.14}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../autobrr/{1.1.13 => 1.1.14}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4}/healthchecks.py | 7 +- .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4}/permissions.py | 6 +- .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../bazarr/{1.0.21 => 1.0.22}/README.md | 0 .../bazarr/{1.0.21 => 1.0.22}/app.yaml | 6 +- .../bazarr/{1.0.21 => 1.0.22}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../bazarr/{1.0.21 => 1.0.22}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../briefkasten/{1.0.18 => 1.0.19}/README.md | 0 .../briefkasten/{1.0.18 => 1.0.19}/app.yaml | 6 +- .../{1.0.18 => 1.0.19}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../{1.0.18 => 1.0.19}/questions.yaml | 0 .../templates/docker-compose.yaml | 2 +- .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../templates/test_values/extra-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../castopod/{1.0.8 => 1.0.9}/README.md | 0 .../castopod/{1.0.8 => 1.0.9}/app.yaml | 6 +- .../castopod/{1.0.8 => 1.0.9}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../castopod/{1.0.8 => 1.0.9}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/2fa-values.yaml | 0 .../templates/test_values/basic-values.yaml | 0 .../test_values/redirect-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../chia/{1.0.14 => 1.0.15}/README.md | 0 .../chia/{1.0.14 => 1.0.15}/app.yaml | 6 +- .../chia/{1.0.14 => 1.0.15}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../chia/{1.0.14 => 1.0.15}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../templates/test_values/farmer-values.yaml | 0 .../clamav/{1.1.9 => 1.1.10}/README.md | 0 .../clamav/{1.1.9 => 1.1.10}/app.yaml | 6 +- .../clamav/{1.1.9 => 1.1.10}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../clamav/{1.1.9 => 1.1.10}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../templates/test_values/milterd-values.yaml | 0 .../test_values/no-clamd-values.yaml | 0 .../test_values/no-freshclamd-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../cloudflared/{1.1.12 => 1.1.13}/README.md | 0 .../cloudflared/{1.1.12 => 1.1.13}/app.yaml | 6 +- .../{1.1.12 => 1.1.13}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../{1.1.12 => 1.1.13}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../dashy/{1.0.17 => 1.0.18}/README.md | 0 .../dashy/{1.0.17 => 1.0.18}/app.yaml | 6 +- .../dashy/{1.0.17 => 1.0.18}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../dashy/{1.0.17 => 1.0.18}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../templates/test_values/https-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../ddns-updater/{1.0.23 => 1.0.24}/README.md | 0 .../ddns-updater/{1.0.23 => 1.0.24}/app.yaml | 6 +- .../{1.0.23 => 1.0.24}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../{1.0.23 => 1.0.24}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../ddns-updater/v1_0_24}/__init__.py | 0 .../community/ddns-updater/v1_0_24}/config.py | 2 +- .../templates/test_values/aliyun-values.yaml | 0 .../templates/test_values/allinkl-values.yaml | 0 .../templates/test_values/basic-values.yaml | 0 .../test_values/cloudflare-values.yaml | 0 .../templates/test_values/dd24-values.yaml | 0 .../templates/test_values/ddnss-values.yaml | 0 .../templates/test_values/desec-values.yaml | 0 .../test_values/digitalocean-values.yaml | 0 .../test_values/dnsomatic-values.yaml | 0 .../templates/test_values/dnspod-values.yaml | 0 .../test_values/dondominio-values.yaml | 0 .../test_values/dreamhost-values.yaml | 0 .../templates/test_values/duckdns-values.yaml | 0 .../templates/test_values/dyn-values.yaml | 0 .../templates/test_values/dynu-values.yaml | 0 .../templates/test_values/dynv6-values.yaml | 0 .../templates/test_values/easydns-values.yaml | 0 .../templates/test_values/freedns-values.yaml | 0 .../templates/test_values/gandi-values.yaml | 0 .../templates/test_values/gcp-values.yaml | 0 .../templates/test_values/godaddy-values.yaml | 0 .../templates/test_values/goip-values.yaml | 0 .../templates/test_values/he-values.yaml | 0 .../templates/test_values/hetzner-values.yaml | 0 .../test_values/infomaniak-values.yaml | 0 .../templates/test_values/inwx-values.yaml | 0 .../templates/test_values/ionos-values.yaml | 0 .../templates/test_values/linode-values.yaml | 0 .../templates/test_values/luadns-values.yaml | 0 .../test_values/namecheap-values.yaml | 0 .../templates/test_values/namecom-values.yaml | 0 .../templates/test_values/netcup-values.yaml | 0 .../templates/test_values/njalla-values.yaml | 0 .../templates/test_values/noip-values.yaml | 0 .../templates/test_values/nowdns-values.yaml | 0 .../templates/test_values/opendns-values.yaml | 0 .../templates/test_values/ovh-values.yaml | 0 .../templates/test_values/porkbun-values.yaml | 0 .../templates/test_values/route53-values.yaml | 0 .../test_values/selfhostde-values.yaml | 0 .../test_values/servercow-values.yaml | 0 .../templates/test_values/spdyn-values.yaml | 0 .../templates/test_values/strato-values.yaml | 0 .../test_values/variomedia-values.yaml | 0 .../test_values/zoneedit-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../deluge/{1.0.17 => 1.0.18}/README.md | 0 .../deluge/{1.0.17 => 1.0.18}/app.yaml | 6 +- .../deluge/{1.0.17 => 1.0.18}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../deluge/{1.0.17 => 1.0.18}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../templates/test_values/hostnet-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../distribution/{1.0.18 => 1.0.19}/README.md | 0 .../distribution/{1.0.18 => 1.0.19}/app.yaml | 6 +- .../{1.0.18 => 1.0.19}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../{1.0.18 => 1.0.19}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/auth-values.yaml | 0 .../templates/test_values/basic-values.yaml | 0 .../templates/test_values/https-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../dockge/{1.0.16 => 1.0.17}/README.md | 0 .../dockge/{1.0.16 => 1.0.17}/app.yaml | 6 +- .../dockge/{1.0.16 => 1.0.17}/ix_values.yaml | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../dockge/{1.0.16 => 1.0.17}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../templates/test_values/https-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../drawio/{1.1.10 => 1.1.11}/README.md | 0 .../drawio/{1.1.10 => 1.1.11}/app.yaml | 6 +- .../drawio/{1.1.10 => 1.1.11}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../drawio/{1.1.10 => 1.1.11}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../filebrowser/{1.1.10 => 1.1.11}/README.md | 0 .../filebrowser/{1.1.10 => 1.1.11}/app.yaml | 6 +- .../{1.1.10 => 1.1.11}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../{1.1.10 => 1.1.11}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../templates/test_values/https-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../firefly-iii/{1.2.17 => 1.2.18}/README.md | 0 .../firefly-iii/{1.2.17 => 1.2.18}/app.yaml | 6 +- .../{1.2.17 => 1.2.18}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../{1.2.17 => 1.2.18}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../test_values/importer-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../flame/{1.0.18 => 1.0.19}/README.md | 0 .../flame/{1.0.18 => 1.0.19}/app.yaml | 6 +- .../flame/{1.0.18 => 1.0.19}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../flame/{1.0.18 => 1.0.19}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../freshrss/{1.1.13 => 1.1.14}/README.md | 0 .../freshrss/{1.1.13 => 1.1.14}/app.yaml | 6 +- .../{1.1.13 => 1.1.14}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../{1.1.13 => 1.1.14}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../frigate/{1.0.8 => 1.0.9}/README.md | 0 .../frigate/{1.0.8 => 1.0.9}/app.yaml | 6 +- .../frigate/{1.0.8 => 1.0.9}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../frigate/{1.0.8 => 1.0.9}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../fscrawler/{1.0.16 => 1.0.17}/README.md | 0 .../fscrawler/{1.0.16 => 1.0.17}/app.yaml | 6 +- .../{1.0.16 => 1.0.17}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../{1.0.16 => 1.0.17}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../templates/test_values/job-values.yaml | 0 .../templates/test_values/no-ocr-values.yaml | 0 .../templates/test_values/rest-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../gitea/{1.0.11 => 1.0.12}/README.md | 0 .../gitea/{1.0.11 => 1.0.12}/app.yaml | 6 +- .../gitea/{1.0.11 => 1.0.12}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../gitea/{1.0.11 => 1.0.12}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../templates/test_values/https-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../grafana/{1.1.11 => 1.1.12}/README.md | 0 .../grafana/{1.1.11 => 1.1.12}/app.yaml | 6 +- .../grafana/{1.1.11 => 1.1.12}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../grafana/{1.1.11 => 1.1.12}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../templates/test_values/https-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../handbrake/{2.0.10 => 2.0.11}/README.md | 0 .../handbrake/{2.0.10 => 2.0.11}/app.yaml | 6 +- .../{2.0.10 => 2.0.11}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../{2.0.10 => 2.0.11}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../templates/test_values/secure-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../homarr/{1.0.18 => 1.0.19}/README.md | 0 .../homarr/{1.0.18 => 1.0.19}/app.yaml | 6 +- .../homarr/{1.0.18 => 1.0.19}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../homarr/{1.0.18 => 1.0.19}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../templates/test_values/extra-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../homepage/{1.0.21 => 1.0.22}/README.md | 0 .../homepage/{1.0.21 => 1.0.22}/app.yaml | 6 +- .../{1.0.21 => 1.0.22}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../{1.0.21 => 1.0.22}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../homer/{2.0.9 => 2.0.10}/README.md | 0 .../homer/{2.0.9 => 2.0.10}/app.yaml | 6 +- .../homer/{2.0.9 => 2.0.10}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../homer/{2.0.9 => 2.0.10}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../test_values/no-assets-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../immich/{1.6.18 => 1.6.19}/README.md | 0 .../immich/{1.6.18 => 1.6.19}/app.yaml | 6 +- .../immich/{1.6.18 => 1.6.19}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../immich/{1.6.18 => 1.6.19}/questions.yaml | 0 .../templates/docker-compose.yaml | 4 +- .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../invidious/{1.0.10 => 1.0.11}/README.md | 0 .../invidious/{1.0.10 => 1.0.11}/app.yaml | 6 +- .../{1.0.10 => 1.0.11}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../{1.0.10 => 1.0.11}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/macros/config.sh | 0 .../templates/test_values/basic-values.yaml | 0 .../templates/test_values/no-sig-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../ipfs/{1.0.18 => 1.0.19}/README.md | 0 .../ipfs/{1.0.18 => 1.0.19}/app.yaml | 6 +- .../ipfs/{1.0.18 => 1.0.19}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../ipfs/{1.0.18 => 1.0.19}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../jellyfin/{1.0.24 => 1.0.25}/README.md | 0 .../jellyfin/{1.0.24 => 1.0.25}/app.yaml | 6 +- .../{1.0.24 => 1.0.25}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../{1.0.24 => 1.0.25}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../jellyseerr/{1.0.18 => 1.0.19}/README.md | 0 .../jellyseerr/{1.0.18 => 1.0.19}/app.yaml | 6 +- .../{1.0.18 => 1.0.19}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../{1.0.18 => 1.0.19}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../jenkins/{1.0.12 => 1.0.13}/README.md | 0 .../jenkins/{1.0.12 => 1.0.13}/app.yaml | 6 +- .../jenkins/{1.0.12 => 1.0.13}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../jenkins/{1.0.12 => 1.0.13}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../templates/test_values/https-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../joplin/{1.1.10 => 1.1.11}/README.md | 0 .../joplin/{1.1.10 => 1.1.11}/app.yaml | 6 +- .../joplin/{1.1.10 => 1.1.11}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../joplin/{1.1.10 => 1.1.11}/questions.yaml | 0 .../templates/docker-compose.yaml | 2 +- .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../kapowarr/{1.0.18 => 1.0.19}/README.md | 0 .../kapowarr/{1.0.18 => 1.0.19}/app.yaml | 6 +- .../{1.0.18 => 1.0.19}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../{1.0.18 => 1.0.19}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../kavita/{1.0.18 => 1.0.19}/README.md | 0 .../kavita/{1.0.18 => 1.0.19}/app.yaml | 6 +- .../kavita/{1.0.18 => 1.0.19}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../kavita/{1.0.18 => 1.0.19}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../komga/{1.1.13 => 1.1.14}/README.md | 0 .../komga/{1.1.13 => 1.1.14}/app.yaml | 6 +- .../komga/{1.1.13 => 1.1.14}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../komga/{1.1.13 => 1.1.14}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../lidarr/{1.1.11 => 1.1.12}/README.md | 0 .../lidarr/{1.1.11 => 1.1.12}/app.yaml | 6 +- .../lidarr/{1.1.11 => 1.1.12}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../lidarr/{1.1.11 => 1.1.12}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../linkding/{1.0.16 => 1.0.17}/README.md | 0 .../linkding/{1.0.16 => 1.0.17}/app.yaml | 6 +- .../{1.0.16 => 1.0.17}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../{1.0.16 => 1.0.17}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../templates/test_values/plus-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../listmonk/{1.0.8 => 1.0.9}/README.md | 0 .../listmonk/{1.0.8 => 1.0.9}/app.yaml | 6 +- .../listmonk/{1.0.8 => 1.0.9}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../listmonk/{1.0.8 => 1.0.9}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../logseq/{1.0.17 => 1.0.18}/README.md | 0 .../logseq/{1.0.17 => 1.0.18}/app.yaml | 6 +- .../logseq/{1.0.17 => 1.0.18}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../logseq/{1.0.17 => 1.0.18}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../templates/test_values/https-values.yaml | 0 .../mealie/{1.2.9 => 1.2.10}/README.md | 0 .../mealie/{1.2.9 => 1.2.10}/app.yaml | 6 +- .../mealie/{1.2.9 => 1.2.10}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../mealie/{1.2.9 => 1.2.10}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../metube/{1.1.16 => 1.1.17}/README.md | 0 .../metube/{1.1.16 => 1.1.17}/app.yaml | 6 +- .../metube/{1.1.16 => 1.1.17}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../metube/{1.1.16 => 1.1.17}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../minecraft/{1.11.17 => 1.11.18}/README.md | 0 .../minecraft/{1.11.17 => 1.11.18}/app.yaml | 6 +- .../{1.11.17 => 1.11.18}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../{1.11.17 => 1.11.18}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../test_values/java11-j9-vanilla-values.yaml | 0 .../java11-jdk-vanilla-values.yaml | 0 .../test_values/java11-vanilla-values.yaml | 0 .../java17-alpine-vanilla-values.yaml | 0 .../java17-gce-vanilla-values.yaml | 0 .../test_values/java17-j9-vanilla-values.yaml | 0 .../java17-jdk-vanilla-values.yaml | 0 .../test_values/java17-vanilla-values.yaml | 0 .../test_values/java19-vanilla-values.yaml | 0 .../java21-alpine-vanila-values.yaml | 0 .../java21-graalvm-vanila-values.yaml | 0 .../test_values/java21-vanila-values.yaml | 0 .../test_values/java8-gce-vanilla-values.yaml | 0 .../test_values/java8-j9-vanilla-values.yaml | 0 .../test_values/java8-jdk-vanilla-values.yaml | 0 .../test_values/java8-vanilla-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../mineos/{1.0.17 => 1.0.18}/README.md | 0 .../mineos/{1.0.17 => 1.0.18}/app.yaml | 6 +- .../mineos/{1.0.17 => 1.0.18}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../mineos/{1.0.17 => 1.0.18}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../templates/test_values/https-values.yaml | 0 .../mumble/{1.1.9 => 1.1.10}/README.md | 0 .../mumble/{1.1.9 => 1.1.10}/app.yaml | 6 +- .../mumble/{1.1.9 => 1.1.10}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../mumble/{1.1.9 => 1.1.10}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../templates/test_values/https-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../n8n/{1.3.22 => 1.3.23}/README.md | 0 .../community/n8n/{1.3.22 => 1.3.23}/app.yaml | 6 +- .../n8n/{1.3.22 => 1.3.23}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../n8n/{1.3.22 => 1.3.23}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../templates/test_values/https-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../navidrome/{1.0.23 => 1.0.24}/README.md | 0 .../navidrome/{1.0.23 => 1.0.24}/app.yaml | 6 +- .../{1.0.23 => 1.0.24}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../{1.0.23 => 1.0.24}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../netbootxyz/{1.0.18 => 1.0.19}/README.md | 0 .../netbootxyz/{1.0.18 => 1.0.19}/app.yaml | 6 +- .../{1.0.18 => 1.0.19}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../{1.0.18 => 1.0.19}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{1.0.19 => 1.0.20}/README.md | 0 .../{1.0.19 => 1.0.20}/app.yaml | 6 +- .../{1.0.19 => 1.0.20}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../{1.0.19 => 1.0.20}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../node-red/{1.0.32 => 1.0.33}/README.md | 0 .../node-red/{1.0.32 => 1.0.33}/app.yaml | 6 +- .../{1.0.32 => 1.0.33}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../{1.0.32 => 1.0.33}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../test_values/node14-minimal-values.yaml | 0 .../templates/test_values/node14-values.yaml | 0 .../test_values/node16-minimal-values.yaml | 0 .../templates/test_values/node16-values.yaml | 0 .../test_values/node18-minimal-values.yaml | 0 .../templates/test_values/node18-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../community/odoo/{1.0.3 => 1.0.4}/README.md | 0 .../community/odoo/{1.0.3 => 1.0.4}/app.yaml | 6 +- .../odoo/{1.0.3 => 1.0.4}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../odoo/{1.0.3 => 1.0.4}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/macros/odoo.conf | 0 .../templates/test_values/basic-values.yaml | 0 .../templates/test_values/extra-values.yaml | 0 .../{1.1.9 => 1.1.10}/README.md | 0 .../{1.1.9 => 1.1.10}/app.yaml | 6 +- .../{1.1.9 => 1.1.10}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../{1.1.9 => 1.1.10}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../templates/test_values/https-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../organizr/{1.0.17 => 1.0.18}/README.md | 0 .../organizr/{1.0.17 => 1.0.18}/app.yaml | 6 +- .../{1.0.17 => 1.0.18}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../{1.0.17 => 1.0.18}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../overseerr/{1.0.17 => 1.0.18}/README.md | 0 .../overseerr/{1.0.17 => 1.0.18}/app.yaml | 6 +- .../{1.0.17 => 1.0.18}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../{1.0.17 => 1.0.18}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../palworld/{1.0.19 => 1.0.20}/README.md | 0 .../palworld/{1.0.19 => 1.0.20}/app.yaml | 6 +- .../{1.0.19 => 1.0.20}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../{1.0.19 => 1.0.20}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../templates/test_values/extra-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{1.0.11 => 1.0.12}/README.md | 0 .../paperless-ngx/{1.0.11 => 1.0.12}/app.yaml | 6 +- .../{1.0.11 => 1.0.12}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../{1.0.11 => 1.0.12}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../templates/test_values/trash-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../passbolt/{1.0.6 => 1.0.7}/README.md | 0 .../passbolt/{1.0.6 => 1.0.7}/app.yaml | 6 +- .../passbolt/{1.0.6 => 1.0.7}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../passbolt/{1.0.6 => 1.0.7}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../templates/test_values/https-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../pgadmin/{1.0.4 => 1.0.5}/README.md | 0 .../pgadmin/{1.0.4 => 1.0.5}/app.yaml | 6 +- .../pgadmin/{1.0.4 => 1.0.5}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../pgadmin/{1.0.4 => 1.0.5}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../templates/test_values/https-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../pigallery2/{1.0.5 => 1.0.6}/README.md | 0 .../pigallery2/{1.0.5 => 1.0.6}/app.yaml | 6 +- .../{1.0.5 => 1.0.6}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../{1.0.5 => 1.0.6}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../piwigo/{1.0.5 => 1.0.6}/README.md | 0 .../piwigo/{1.0.5 => 1.0.6}/app.yaml | 6 +- .../piwigo/{1.0.5 => 1.0.6}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../piwigo/{1.0.5 => 1.0.6}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../{1.0.5 => 1.0.6}/templates/macros/init.sh | 0 .../templates/test_values/basic-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../planka/{1.0.10 => 1.0.11}/README.md | 0 .../planka/{1.0.10 => 1.0.11}/app.yaml | 6 +- .../planka/{1.0.10 => 1.0.11}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../planka/{1.0.10 => 1.0.11}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{1.0.15 => 1.0.16}/README.md | 0 .../{1.0.15 => 1.0.16}/app.yaml | 6 +- .../{1.0.15 => 1.0.16}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../{1.0.15 => 1.0.16}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../portainer/{1.2.13 => 1.2.14}/README.md | 0 .../portainer/{1.2.13 => 1.2.14}/app.yaml | 6 +- .../{1.2.13 => 1.2.14}/ix_values.yaml | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../{1.2.13 => 1.2.14}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../templates/test_values/https-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../prowlarr/{1.2.12 => 1.2.13}/README.md | 0 .../prowlarr/{1.2.12 => 1.2.13}/app.yaml | 6 +- .../{1.2.12 => 1.2.13}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../{1.2.12 => 1.2.13}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../qbittorrent/{1.0.27 => 1.0.28}/README.md | 0 .../qbittorrent/{1.0.27 => 1.0.28}/app.yaml | 6 +- .../{1.0.27 => 1.0.28}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../{1.0.27 => 1.0.28}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../radarr/{1.1.11 => 1.1.12}/README.md | 0 .../radarr/{1.1.11 => 1.1.12}/app.yaml | 6 +- .../radarr/{1.1.11 => 1.1.12}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../radarr/{1.1.11 => 1.1.12}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../readarr/{1.0.18 => 1.0.19}/README.md | 0 .../readarr/{1.0.18 => 1.0.19}/app.yaml | 6 +- .../readarr/{1.0.18 => 1.0.19}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../readarr/{1.0.18 => 1.0.19}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../recyclarr/{1.0.7 => 1.0.8}/README.md | 0 .../recyclarr/{1.0.7 => 1.0.8}/app.yaml | 6 +- .../recyclarr/{1.0.7 => 1.0.8}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../recyclarr/{1.0.7 => 1.0.8}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../redis/{1.0.6 => 1.0.7}/README.md | 0 .../community/redis/{1.0.6 => 1.0.7}/app.yaml | 6 +- .../redis/{1.0.6 => 1.0.7}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../redis/{1.0.6 => 1.0.7}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../templates/test_values/noauth-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../roundcube/{1.0.6 => 1.0.7}/README.md | 0 .../roundcube/{1.0.6 => 1.0.7}/app.yaml | 6 +- .../roundcube/{1.0.6 => 1.0.7}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../roundcube/{1.0.6 => 1.0.7}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../rsyncd/{1.0.13 => 1.0.14}/README.md | 0 .../rsyncd/{1.0.13 => 1.0.14}/app.yaml | 6 +- .../rsyncd/{1.0.13 => 1.0.14}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../rsyncd/{1.0.13 => 1.0.14}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/rsync_macros/rsyncd.conf | 0 .../templates/test_values/basic-values.yaml | 0 .../templates/test_values/hostnet-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../rust-desk/{1.0.6 => 1.0.7}/README.md | 0 .../rust-desk/{1.0.6 => 1.0.7}/app.yaml | 6 +- .../rust-desk/{1.0.6 => 1.0.7}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../rust-desk/{1.0.6 => 1.0.7}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../sabnzbd/{1.0.6 => 1.0.7}/README.md | 0 .../sabnzbd/{1.0.6 => 1.0.7}/app.yaml | 6 +- .../sabnzbd/{1.0.6 => 1.0.7}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../sabnzbd/{1.0.6 => 1.0.7}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../searxng/{1.0.15 => 1.0.16}/README.md | 0 .../searxng/{1.0.15 => 1.0.16}/app.yaml | 6 +- .../searxng/{1.0.15 => 1.0.16}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../searxng/{1.0.15 => 1.0.16}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../sftpgo/{1.0.6 => 1.0.7}/README.md | 0 .../sftpgo/{1.0.6 => 1.0.7}/app.yaml | 6 +- .../sftpgo/{1.0.6 => 1.0.7}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../sftpgo/{1.0.6 => 1.0.7}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../templates/test_values/https-values.yaml | 0 .../templates/test_values/plugins-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../sonarr/{1.0.18 => 1.0.19}/README.md | 0 .../sonarr/{1.0.18 => 1.0.19}/app.yaml | 6 +- .../sonarr/{1.0.18 => 1.0.19}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../sonarr/{1.0.18 => 1.0.19}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../tailscale/{1.1.14 => 1.1.15}/README.md | 0 .../tailscale/{1.1.14 => 1.1.15}/app.yaml | 6 +- .../{1.1.14 => 1.1.15}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../{1.1.14 => 1.1.15}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../community/tailscale/v1_1_15}/util.py | 2 +- .../templates/test_values/basic-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../tautulli/{1.0.20 => 1.0.21}/README.md | 0 .../tautulli/{1.0.20 => 1.0.21}/app.yaml | 6 +- .../{1.0.20 => 1.0.21}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../{1.0.20 => 1.0.21}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../tdarr/{1.0.8 => 1.0.9}/README.md | 0 .../community/tdarr/{1.0.8 => 1.0.9}/app.yaml | 6 +- .../tdarr/{1.0.8 => 1.0.9}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../tdarr/{1.0.8 => 1.0.9}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../terraria/{1.0.5 => 1.0.6}/README.md | 0 .../terraria/{1.0.5 => 1.0.6}/app.yaml | 6 +- .../terraria/{1.0.5 => 1.0.6}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../terraria/{1.0.5 => 1.0.6}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../test_values/password-values.yaml | 0 .../templates/test_values/vanilla-values.yaml | 0 .../tftpd-hpa/{1.0.9 => 1.0.10}/README.md | 0 .../tftpd-hpa/{1.0.9 => 1.0.10}/app.yaml | 6 +- .../{1.0.9 => 1.0.10}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../{1.0.9 => 1.0.10}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/create-values.yaml | 0 .../test_values/readonly-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{1.0.5 => 1.0.6}/README.md | 0 .../{1.0.5 => 1.0.6}/app.yaml | 6 +- .../{1.0.5 => 1.0.6}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../{1.0.5 => 1.0.6}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../transmission/{1.0.5 => 1.0.6}/README.md | 0 .../transmission/{1.0.5 => 1.0.6}/app.yaml | 6 +- .../{1.0.5 => 1.0.6}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../{1.0.5 => 1.0.6}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/macros/setup.sh | 0 .../templates/test_values/basic-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../twofactor-auth/{1.0.6 => 1.0.7}/README.md | 0 .../twofactor-auth/{1.0.6 => 1.0.7}/app.yaml | 6 +- .../{1.0.6 => 1.0.7}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../{1.0.6 => 1.0.7}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../reverse-proxy-guard-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{1.2.10 => 1.2.11}/README.md | 0 .../{1.2.10 => 1.2.11}/app.yaml | 6 +- .../{1.2.10 => 1.2.11}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../{1.2.10 => 1.2.11}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../templates/test_values/https-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{1.0.16 => 1.0.17}/README.md | 0 .../{1.0.16 => 1.0.17}/app.yaml | 6 +- .../{1.0.16 => 1.0.17}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../{1.0.16 => 1.0.17}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../vaultwarden/{1.0.6 => 1.0.7}/README.md | 0 .../vaultwarden/{1.0.6 => 1.0.7}/app.yaml | 6 +- .../{1.0.6 => 1.0.7}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../{1.0.6 => 1.0.7}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../templates/test_values/https-values.yaml | 0 .../test_values/no-admin-values.yaml | 0 .../templates/test_values/no-ws-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../vikunja/{1.2.13 => 1.2.14}/README.md | 0 .../vikunja/{1.2.13 => 1.2.14}/app.yaml | 6 +- .../vikunja/{1.2.13 => 1.2.14}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../vikunja/{1.2.13 => 1.2.14}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../webdav/{1.0.12 => 1.0.13}/README.md | 0 .../webdav/{1.0.12 => 1.0.13}/app.yaml | 6 +- .../webdav/{1.0.12 => 1.0.13}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../webdav/{1.0.12 => 1.0.13}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/extra-values.yaml | 0 .../http-basicauth-other-user-values.yaml | 0 .../test_values/http-basicauth-values.yaml | 0 ...ttp-https-basicauth-other-user-values.yaml | 0 .../http-https-basicauth-values.yaml | 0 .../http-https-noauth-other-user-values.yaml | 0 .../test_values/http-https-noauth-values.yaml | 0 .../http-noauth-other-user-values.yaml | 0 .../test_values/http-noauth-values.yaml | 0 .../https-basicauth-other-user-values.yaml | 0 .../test_values/https-basicauth-values.yaml | 0 .../templates/webdav_macros/httpd.conf | 0 .../templates/webdav_macros/webdav_core.conf | 0 .../templates/webdav_macros/webdav_http.conf | 0 .../templates/webdav_macros/webdav_https.conf | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../whoogle/{1.0.19 => 1.0.20}/README.md | 0 .../whoogle/{1.0.19 => 1.0.20}/app.yaml | 6 +- .../whoogle/{1.0.19 => 1.0.20}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../whoogle/{1.0.19 => 1.0.20}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../wordpress/{1.0.6 => 1.0.7}/README.md | 0 .../wordpress/{1.0.6 => 1.0.7}/app.yaml | 6 +- .../wordpress/{1.0.6 => 1.0.7}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../wordpress/{1.0.6 => 1.0.7}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../zerotier/{1.0.18 => 1.0.19}/README.md | 0 .../zerotier/{1.0.18 => 1.0.19}/app.yaml | 6 +- .../{1.0.18 => 1.0.19}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../{1.0.18 => 1.0.19}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../templates/test_values/no-host-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../minio/{1.1.6 => 1.1.7}/README.md | 0 .../minio/{1.1.6 => 1.1.7}/app.yaml | 6 +- .../minio/{1.1.6 => 1.1.7}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../minio/{1.1.6 => 1.1.7}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../enterprise/minio/v1_1_7}/__init__.py | 0 .../library/enterprise/minio/v1_1_7}/data.py | 2 +- .../test_values/basic-multi-mode-values.yaml | 0 .../templates/test_values/basic-values.yaml | 0 .../templates/test_values/https-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../syncthing/{1.0.14 => 1.0.15}/README.md | 0 .../syncthing/{1.0.14 => 1.0.15}/app.yaml | 6 +- .../{1.0.14 => 1.0.15}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../{1.0.14 => 1.0.15}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../templates/test_values/https-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../collabora/{1.1.14 => 1.1.15}/README.md | 0 .../collabora/{1.1.14 => 1.1.15}/app.yaml | 6 +- .../{1.1.14 => 1.1.15}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../{1.1.14 => 1.1.15}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../templates/test_values/https-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../diskoverdata/{1.3.7 => 1.3.8}/README.md | 0 .../diskoverdata/{1.3.7 => 1.3.8}/app.yaml | 6 +- .../{1.3.7 => 1.3.8}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../{1.3.7 => 1.3.8}/questions.yaml | 0 .../templates/diskover_macros/crontab | 0 .../templates/diskover_macros/setup-cron.sh | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{1.1.11 => 1.1.12}/README.md | 0 .../{1.1.11 => 1.1.12}/app.yaml | 6 +- .../{1.1.11 => 1.1.12}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../{1.1.11 => 1.1.12}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../templates/test_values/https-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../stable/emby/{1.1.12 => 1.1.13}/README.md | 0 .../stable/emby/{1.1.12 => 1.1.13}/app.yaml | 6 +- .../emby/{1.1.12 => 1.1.13}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../emby/{1.1.12 => 1.1.13}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../templates/test_values/hostnet-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../{1.2.20 => 1.2.21}/README.md | 0 .../{1.2.20 => 1.2.21}/app.yaml | 6 +- .../{1.2.20 => 1.2.21}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../{1.2.20 => 1.2.21}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../ix-app/{1.0.10 => 1.0.11}/README.md | 0 .../stable/ix-app/{1.0.10 => 1.0.11}/app.yaml | 6 +- .../ix-app/{1.0.10 => 1.0.11}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../ix-app/{1.0.10 => 1.0.11}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../stable/minio/{1.1.12 => 1.1.13}/README.md | 0 .../stable/minio/{1.1.12 => 1.1.13}/app.yaml | 6 +- .../minio/{1.1.12 => 1.1.13}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../minio/{1.1.12 => 1.1.13}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../templates/test_values/https-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../netdata/{1.1.13 => 1.1.14}/README.md | 0 .../netdata/{1.1.13 => 1.1.14}/app.yaml | 6 +- .../netdata/{1.1.13 => 1.1.14}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../netdata/{1.1.13 => 1.1.14}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../nextcloud/{1.3.19 => 1.3.20}/README.md | 0 .../nextcloud/{1.3.19 => 1.3.20}/app.yaml | 9 +- .../{1.3.19 => 1.3.20}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../{1.3.19 => 1.3.20}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../templates/test_values/https-values.yaml | 0 .../test_values/same-vol-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../photoprism/{1.1.13 => 1.1.14}/README.md | 0 .../photoprism/{1.1.13 => 1.1.14}/app.yaml | 6 +- .../{1.1.13 => 1.1.14}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../{1.1.13 => 1.1.14}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../templates/test_values/host-values.yaml | 0 .../templates/test_values/https-values.yaml | 0 .../templates/test_values/pass-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../pihole/{1.1.10 => 1.1.11}/README.md | 0 .../stable/pihole/{1.1.10 => 1.1.11}/app.yaml | 6 +- .../pihole/{1.1.10 => 1.1.11}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../pihole/{1.1.10 => 1.1.11}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../templates/test_values/dhcp-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../stable/plex/{1.0.22 => 1.0.23}/README.md | 0 .../stable/plex/{1.0.22 => 1.0.23}/app.yaml | 6 +- .../plex/{1.0.22 => 1.0.23}/ix_values.yaml | 0 .../{1.0.22 => 1.0.23}/migrations/__init__.py | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../plex/{1.0.22 => 1.0.23}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../templates/test_values/hostnet-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../prometheus/{1.1.10 => 1.1.11}/README.md | 0 .../prometheus/{1.1.10 => 1.1.11}/app.yaml | 6 +- .../{1.1.10 => 1.1.11}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../{1.1.10 => 1.1.11}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../templates/test_values/hostnet-values.yaml | 0 .../stable/storj/{1.1.9 => 1.1.10}/README.md | 0 .../stable/storj/{1.1.9 => 1.1.10}/app.yaml | 6 +- .../storj/{1.1.9 => 1.1.10}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../storj/{1.1.9 => 1.1.10}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/macros/init.sh | 0 .../templates/test_values/basic-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../syncthing/{1.0.26 => 1.0.27}/README.md | 0 .../syncthing/{1.0.26 => 1.0.27}/app.yaml | 6 +- .../{1.0.26 => 1.0.27}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../{1.0.26 => 1.0.27}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../templates/test_values/host-values.yaml | 0 .../library/base_v1_1_3/healthchecks.py | 121 --------------- .../library/base_v1_1_3/permissions.py | 139 ------------------ .../wg-easy/{1.0.19 => 1.0.20}/README.md | 0 .../wg-easy/{1.0.19 => 1.0.20}/app.yaml | 6 +- .../wg-easy/{1.0.19 => 1.0.20}/ix_values.yaml | 0 .../migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migration_helpers/dns_config.py | 0 .../migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../wg-easy/{1.0.19 => 1.0.20}/questions.yaml | 0 .../templates/docker-compose.yaml | 0 .../library/base_v1_1_4}/__init__.py | 0 .../library/base_v1_1_4}/environment.py | 0 .../library/base_v1_1_4/healthchecks.py | 120 +++++++++++++++ .../templates/library/base_v1_1_4}/mariadb.py | 0 .../library/base_v1_1_4}/metadata.py | 0 .../templates/library/base_v1_1_4}/network.py | 0 .../library/base_v1_1_4/permissions.py | 139 ++++++++++++++++++ .../templates/library/base_v1_1_4}/ports.py | 0 .../library/base_v1_1_4}/postgres.py | 0 .../templates/library/base_v1_1_4}/redis.py | 0 .../library/base_v1_1_4}/resources.py | 0 .../library/base_v1_1_4}/security.py | 0 .../templates/library/base_v1_1_4}/storage.py | 0 .../templates/library/base_v1_1_4}/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../templates/test_values/hostnet-values.yaml | 0 3511 files changed, 28342 insertions(+), 28455 deletions(-) rename trains/community/actual-budget/{1.1.12 => 1.1.13}/README.md (100%) rename trains/community/actual-budget/{1.1.12 => 1.1.13}/app.yaml (89%) rename trains/community/actual-budget/{1.1.12 => 1.1.13}/ix_values.yaml (100%) rename trains/community/actual-budget/{1.1.12 => 1.1.13}/migrations/migrate_from_kubernetes (100%) rename trains/community/actual-budget/{1.1.12 => 1.1.13}/migrations/migration_helpers/__init__.py (100%) rename trains/community/actual-budget/{1.1.12 => 1.1.13}/migrations/migration_helpers/cpu.py (100%) rename trains/community/actual-budget/{1.1.12 => 1.1.13}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/actual-budget/{1.1.12 => 1.1.13}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/actual-budget/{1.1.12 => 1.1.13}/migrations/migration_helpers/memory.py (100%) rename trains/community/actual-budget/{1.1.12 => 1.1.13}/migrations/migration_helpers/resources.py (100%) rename trains/community/actual-budget/{1.1.12 => 1.1.13}/migrations/migration_helpers/storage.py (100%) rename trains/community/actual-budget/{1.1.12 => 1.1.13}/questions.yaml (100%) rename trains/community/actual-budget/{1.1.12 => 1.1.13}/templates/docker-compose.yaml (97%) rename trains/community/actual-budget/{1.1.12/templates/library/base_v1_1_3 => 1.1.13/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/actual-budget/{1.1.12/templates/library/base_v1_1_3 => 1.1.13/templates/library/base_v1_1_4}/environment.py (100%) rename trains/community/{audiobookshelf/1.2.13/templates/library/base_v1_1_3 => actual-budget/1.1.13/templates/library/base_v1_1_4}/healthchecks.py (92%) rename trains/community/actual-budget/{1.1.12/templates/library/base_v1_1_3 => 1.1.13/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/actual-budget/{1.1.12/templates/library/base_v1_1_3 => 1.1.13/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/actual-budget/{1.1.12/templates/library/base_v1_1_3 => 1.1.13/templates/library/base_v1_1_4}/network.py (100%) rename trains/community/{adguard-home/1.0.21/templates/library/base_v1_1_3 => actual-budget/1.1.13/templates/library/base_v1_1_4}/permissions.py (98%) rename trains/community/actual-budget/{1.1.12/templates/library/base_v1_1_3 => 1.1.13/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/actual-budget/{1.1.12/templates/library/base_v1_1_3 => 1.1.13/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/actual-budget/{1.1.12/templates/library/base_v1_1_3 => 1.1.13/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/actual-budget/{1.1.12/templates/library/base_v1_1_3 => 1.1.13/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/actual-budget/{1.1.12/templates/library/base_v1_1_3 => 1.1.13/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/actual-budget/{1.1.12/templates/library/base_v1_1_3 => 1.1.13/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/actual-budget/{1.1.12/templates/library/base_v1_1_3 => 1.1.13/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/actual-budget/{1.1.12 => 1.1.13}/templates/test_values/basic-values.yaml (100%) rename trains/community/actual-budget/{1.1.12 => 1.1.13}/templates/test_values/hostnet-values.yaml (100%) rename trains/community/actual-budget/{1.1.12 => 1.1.13}/templates/test_values/https-values.yaml (100%) rename trains/community/adguard-home/{1.0.21 => 1.0.22}/README.md (100%) rename trains/community/adguard-home/{1.0.21 => 1.0.22}/app.yaml (91%) rename trains/community/adguard-home/{1.0.21 => 1.0.22}/ix_values.yaml (100%) rename trains/community/adguard-home/{1.0.21 => 1.0.22}/migrations/migrate_from_kubernetes (100%) rename trains/community/adguard-home/{1.0.21 => 1.0.22}/migrations/migration_helpers/__init__.py (100%) rename trains/community/adguard-home/{1.0.21 => 1.0.22}/migrations/migration_helpers/cpu.py (100%) rename trains/community/adguard-home/{1.0.21 => 1.0.22}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/adguard-home/{1.0.21 => 1.0.22}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/adguard-home/{1.0.21 => 1.0.22}/migrations/migration_helpers/memory.py (100%) rename trains/community/adguard-home/{1.0.21 => 1.0.22}/migrations/migration_helpers/resources.py (100%) rename trains/community/adguard-home/{1.0.21 => 1.0.22}/migrations/migration_helpers/storage.py (100%) rename trains/community/adguard-home/{1.0.21 => 1.0.22}/questions.yaml (100%) rename trains/community/adguard-home/{1.0.21 => 1.0.22}/templates/docker-compose.yaml (96%) rename trains/community/adguard-home/{1.0.21/templates/library/base_v1_1_3 => 1.0.22/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/adguard-home/{1.0.21/templates/library/base_v1_1_3 => 1.0.22/templates/library/base_v1_1_4}/environment.py (100%) rename trains/community/adguard-home/{1.0.21/templates/library/base_v1_1_3 => 1.0.22/templates/library/base_v1_1_4}/healthchecks.py (92%) rename trains/community/adguard-home/{1.0.21/templates/library/base_v1_1_3 => 1.0.22/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/adguard-home/{1.0.21/templates/library/base_v1_1_3 => 1.0.22/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/adguard-home/{1.0.21/templates/library/base_v1_1_3 => 1.0.22/templates/library/base_v1_1_4}/network.py (100%) rename trains/community/{audiobookshelf/1.2.13/templates/library/base_v1_1_3 => adguard-home/1.0.22/templates/library/base_v1_1_4}/permissions.py (98%) rename trains/community/adguard-home/{1.0.21/templates/library/base_v1_1_3 => 1.0.22/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/adguard-home/{1.0.21/templates/library/base_v1_1_3 => 1.0.22/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/adguard-home/{1.0.21/templates/library/base_v1_1_3 => 1.0.22/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/adguard-home/{1.0.21/templates/library/base_v1_1_3 => 1.0.22/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/adguard-home/{1.0.21/templates/library/base_v1_1_3 => 1.0.22/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/adguard-home/{1.0.21/templates/library/base_v1_1_3 => 1.0.22/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/adguard-home/{1.0.21/templates/library/base_v1_1_3 => 1.0.22/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/adguard-home/{1.0.21 => 1.0.22}/templates/test_values/basic-values.yaml (100%) rename trains/community/adguard-home/{1.0.21 => 1.0.22}/templates/test_values/dhcp-values.yaml (100%) rename trains/community/audiobookshelf/{1.2.13 => 1.2.14}/README.md (100%) rename trains/community/audiobookshelf/{1.2.13 => 1.2.14}/app.yaml (90%) rename trains/community/audiobookshelf/{1.2.13 => 1.2.14}/ix_values.yaml (100%) rename trains/community/audiobookshelf/{1.2.13 => 1.2.14}/migrations/migrate_from_kubernetes (100%) rename trains/community/audiobookshelf/{1.2.13 => 1.2.14}/migrations/migration_helpers/__init__.py (100%) rename trains/community/audiobookshelf/{1.2.13 => 1.2.14}/migrations/migration_helpers/cpu.py (100%) rename trains/community/audiobookshelf/{1.2.13 => 1.2.14}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/audiobookshelf/{1.2.13 => 1.2.14}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/audiobookshelf/{1.2.13 => 1.2.14}/migrations/migration_helpers/memory.py (100%) rename trains/community/audiobookshelf/{1.2.13 => 1.2.14}/migrations/migration_helpers/resources.py (100%) rename trains/community/audiobookshelf/{1.2.13 => 1.2.14}/migrations/migration_helpers/storage.py (100%) rename trains/community/audiobookshelf/{1.2.13 => 1.2.14}/questions.yaml (100%) rename trains/community/audiobookshelf/{1.2.13 => 1.2.14}/templates/docker-compose.yaml (100%) rename trains/community/audiobookshelf/{1.2.13/templates/library/base_v1_1_3 => 1.2.14/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/audiobookshelf/{1.2.13/templates/library/base_v1_1_3 => 1.2.14/templates/library/base_v1_1_4}/environment.py (100%) rename trains/community/{actual-budget/1.1.12/templates/library/base_v1_1_3 => audiobookshelf/1.2.14/templates/library/base_v1_1_4}/healthchecks.py (92%) rename trains/community/audiobookshelf/{1.2.13/templates/library/base_v1_1_3 => 1.2.14/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/audiobookshelf/{1.2.13/templates/library/base_v1_1_3 => 1.2.14/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/audiobookshelf/{1.2.13/templates/library/base_v1_1_3 => 1.2.14/templates/library/base_v1_1_4}/network.py (100%) rename trains/community/{autobrr/1.1.13/templates/library/base_v1_1_3 => audiobookshelf/1.2.14/templates/library/base_v1_1_4}/permissions.py (98%) rename trains/community/audiobookshelf/{1.2.13/templates/library/base_v1_1_3 => 1.2.14/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/audiobookshelf/{1.2.13/templates/library/base_v1_1_3 => 1.2.14/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/audiobookshelf/{1.2.13/templates/library/base_v1_1_3 => 1.2.14/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/audiobookshelf/{1.2.13/templates/library/base_v1_1_3 => 1.2.14/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/audiobookshelf/{1.2.13/templates/library/base_v1_1_3 => 1.2.14/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/audiobookshelf/{1.2.13/templates/library/base_v1_1_3 => 1.2.14/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/audiobookshelf/{1.2.13/templates/library/base_v1_1_3 => 1.2.14/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/audiobookshelf/{1.2.13 => 1.2.14}/templates/test_values/basic-values.yaml (100%) rename trains/community/autobrr/{1.1.13 => 1.1.14}/README.md (100%) rename trains/community/autobrr/{1.1.13 => 1.1.14}/app.yaml (87%) rename trains/community/autobrr/{1.1.13 => 1.1.14}/ix_values.yaml (100%) rename trains/community/autobrr/{1.1.13 => 1.1.14}/migrations/migrate_from_kubernetes (100%) rename trains/community/autobrr/{1.1.13 => 1.1.14}/migrations/migration_helpers/__init__.py (100%) rename trains/community/autobrr/{1.1.13 => 1.1.14}/migrations/migration_helpers/cpu.py (100%) rename trains/community/autobrr/{1.1.13 => 1.1.14}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/autobrr/{1.1.13 => 1.1.14}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/autobrr/{1.1.13 => 1.1.14}/migrations/migration_helpers/memory.py (100%) rename trains/community/autobrr/{1.1.13 => 1.1.14}/migrations/migration_helpers/resources.py (100%) rename trains/community/autobrr/{1.1.13 => 1.1.14}/migrations/migration_helpers/storage.py (100%) rename trains/community/autobrr/{1.1.13 => 1.1.14}/questions.yaml (100%) rename trains/community/autobrr/{1.1.13 => 1.1.14}/templates/docker-compose.yaml (100%) rename trains/community/autobrr/{1.1.13/templates/library/base_v1_1_3 => 1.1.14/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/autobrr/{1.1.13/templates/library/base_v1_1_3 => 1.1.14/templates/library/base_v1_1_4}/environment.py (100%) rename trains/community/autobrr/{1.1.13/templates/library/base_v1_1_3 => 1.1.14/templates/library/base_v1_1_4}/healthchecks.py (92%) rename trains/community/autobrr/{1.1.13/templates/library/base_v1_1_3 => 1.1.14/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/autobrr/{1.1.13/templates/library/base_v1_1_3 => 1.1.14/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/autobrr/{1.1.13/templates/library/base_v1_1_3 => 1.1.14/templates/library/base_v1_1_4}/network.py (100%) rename trains/community/{actual-budget/1.1.12/templates/library/base_v1_1_3 => autobrr/1.1.14/templates/library/base_v1_1_4}/permissions.py (98%) rename trains/community/autobrr/{1.1.13/templates/library/base_v1_1_3 => 1.1.14/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/autobrr/{1.1.13/templates/library/base_v1_1_3 => 1.1.14/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/autobrr/{1.1.13/templates/library/base_v1_1_3 => 1.1.14/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/autobrr/{1.1.13/templates/library/base_v1_1_3 => 1.1.14/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/autobrr/{1.1.13/templates/library/base_v1_1_3 => 1.1.14/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/autobrr/{1.1.13/templates/library/base_v1_1_3 => 1.1.14/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/autobrr/{1.1.13/templates/library/base_v1_1_3 => 1.1.14/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/autobrr/{1.1.13 => 1.1.14}/templates/test_values/basic-values.yaml (100%) delete mode 100644 trains/community/bazarr/1.0.21/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/community/bazarr/1.0.21/templates/library/base_v1_1_3/permissions.py rename trains/community/bazarr/{1.0.21 => 1.0.22}/README.md (100%) rename trains/community/bazarr/{1.0.21 => 1.0.22}/app.yaml (87%) rename trains/community/bazarr/{1.0.21 => 1.0.22}/ix_values.yaml (100%) rename trains/community/bazarr/{1.0.21 => 1.0.22}/migrations/migrate_from_kubernetes (100%) rename trains/community/bazarr/{1.0.21 => 1.0.22}/migrations/migration_helpers/__init__.py (100%) rename trains/community/bazarr/{1.0.21 => 1.0.22}/migrations/migration_helpers/cpu.py (100%) rename trains/community/bazarr/{1.0.21 => 1.0.22}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/bazarr/{1.0.21 => 1.0.22}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/bazarr/{1.0.21 => 1.0.22}/migrations/migration_helpers/memory.py (100%) rename trains/community/bazarr/{1.0.21 => 1.0.22}/migrations/migration_helpers/resources.py (100%) rename trains/community/bazarr/{1.0.21 => 1.0.22}/migrations/migration_helpers/storage.py (100%) rename trains/community/bazarr/{1.0.21 => 1.0.22}/questions.yaml (100%) rename trains/community/bazarr/{1.0.21 => 1.0.22}/templates/docker-compose.yaml (100%) rename trains/community/bazarr/{1.0.21/templates/library/base_v1_1_3 => 1.0.22/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/bazarr/{1.0.21/templates/library/base_v1_1_3 => 1.0.22/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/community/bazarr/1.0.22/templates/library/base_v1_1_4/healthchecks.py rename trains/community/bazarr/{1.0.21/templates/library/base_v1_1_3 => 1.0.22/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/bazarr/{1.0.21/templates/library/base_v1_1_3 => 1.0.22/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/bazarr/{1.0.21/templates/library/base_v1_1_3 => 1.0.22/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/community/bazarr/1.0.22/templates/library/base_v1_1_4/permissions.py rename trains/community/bazarr/{1.0.21/templates/library/base_v1_1_3 => 1.0.22/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/bazarr/{1.0.21/templates/library/base_v1_1_3 => 1.0.22/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/bazarr/{1.0.21/templates/library/base_v1_1_3 => 1.0.22/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/bazarr/{1.0.21/templates/library/base_v1_1_3 => 1.0.22/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/bazarr/{1.0.21/templates/library/base_v1_1_3 => 1.0.22/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/bazarr/{1.0.21/templates/library/base_v1_1_3 => 1.0.22/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/bazarr/{1.0.21/templates/library/base_v1_1_3 => 1.0.22/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/bazarr/{1.0.21 => 1.0.22}/templates/test_values/basic-values.yaml (100%) delete mode 100644 trains/community/briefkasten/1.0.18/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/community/briefkasten/1.0.18/templates/library/base_v1_1_3/permissions.py rename trains/community/briefkasten/{1.0.18 => 1.0.19}/README.md (100%) rename trains/community/briefkasten/{1.0.18 => 1.0.19}/app.yaml (89%) rename trains/community/briefkasten/{1.0.18 => 1.0.19}/ix_values.yaml (100%) rename trains/community/briefkasten/{1.0.18 => 1.0.19}/migrations/migrate_from_kubernetes (100%) rename trains/community/briefkasten/{1.0.18 => 1.0.19}/migrations/migration_helpers/__init__.py (100%) rename trains/community/briefkasten/{1.0.18 => 1.0.19}/migrations/migration_helpers/cpu.py (100%) rename trains/community/briefkasten/{1.0.18 => 1.0.19}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/briefkasten/{1.0.18 => 1.0.19}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/briefkasten/{1.0.18 => 1.0.19}/migrations/migration_helpers/memory.py (100%) rename trains/community/briefkasten/{1.0.18 => 1.0.19}/migrations/migration_helpers/resources.py (100%) rename trains/community/briefkasten/{1.0.18 => 1.0.19}/migrations/migration_helpers/storage.py (100%) rename trains/community/briefkasten/{1.0.18 => 1.0.19}/questions.yaml (100%) rename trains/community/briefkasten/{1.0.18 => 1.0.19}/templates/docker-compose.yaml (98%) rename trains/community/briefkasten/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/briefkasten/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/community/briefkasten/1.0.19/templates/library/base_v1_1_4/healthchecks.py rename trains/community/briefkasten/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/briefkasten/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/briefkasten/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/community/briefkasten/1.0.19/templates/library/base_v1_1_4/permissions.py rename trains/community/briefkasten/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/briefkasten/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/briefkasten/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/briefkasten/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/briefkasten/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/briefkasten/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/briefkasten/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/briefkasten/{1.0.18 => 1.0.19}/templates/test_values/basic-values.yaml (100%) rename trains/community/briefkasten/{1.0.18 => 1.0.19}/templates/test_values/extra-values.yaml (100%) delete mode 100644 trains/community/castopod/1.0.8/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/community/castopod/1.0.8/templates/library/base_v1_1_3/permissions.py rename trains/community/castopod/{1.0.8 => 1.0.9}/README.md (100%) rename trains/community/castopod/{1.0.8 => 1.0.9}/app.yaml (92%) rename trains/community/castopod/{1.0.8 => 1.0.9}/ix_values.yaml (100%) rename trains/community/castopod/{1.0.8 => 1.0.9}/migrations/migrate_from_kubernetes (100%) rename trains/community/castopod/{1.0.8 => 1.0.9}/migrations/migration_helpers/__init__.py (100%) rename trains/community/castopod/{1.0.8 => 1.0.9}/migrations/migration_helpers/cpu.py (100%) rename trains/community/castopod/{1.0.8 => 1.0.9}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/castopod/{1.0.8 => 1.0.9}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/castopod/{1.0.8 => 1.0.9}/migrations/migration_helpers/memory.py (100%) rename trains/community/castopod/{1.0.8 => 1.0.9}/migrations/migration_helpers/resources.py (100%) rename trains/community/castopod/{1.0.8 => 1.0.9}/migrations/migration_helpers/storage.py (100%) rename trains/community/castopod/{1.0.8 => 1.0.9}/questions.yaml (100%) rename trains/community/castopod/{1.0.8 => 1.0.9}/templates/docker-compose.yaml (100%) rename trains/community/castopod/{1.0.8/templates/library/base_v1_1_3 => 1.0.9/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/castopod/{1.0.8/templates/library/base_v1_1_3 => 1.0.9/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/community/castopod/1.0.9/templates/library/base_v1_1_4/healthchecks.py rename trains/community/castopod/{1.0.8/templates/library/base_v1_1_3 => 1.0.9/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/castopod/{1.0.8/templates/library/base_v1_1_3 => 1.0.9/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/castopod/{1.0.8/templates/library/base_v1_1_3 => 1.0.9/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/community/castopod/1.0.9/templates/library/base_v1_1_4/permissions.py rename trains/community/castopod/{1.0.8/templates/library/base_v1_1_3 => 1.0.9/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/castopod/{1.0.8/templates/library/base_v1_1_3 => 1.0.9/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/castopod/{1.0.8/templates/library/base_v1_1_3 => 1.0.9/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/castopod/{1.0.8/templates/library/base_v1_1_3 => 1.0.9/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/castopod/{1.0.8/templates/library/base_v1_1_3 => 1.0.9/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/castopod/{1.0.8/templates/library/base_v1_1_3 => 1.0.9/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/castopod/{1.0.8/templates/library/base_v1_1_3 => 1.0.9/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/castopod/{1.0.8 => 1.0.9}/templates/test_values/2fa-values.yaml (100%) rename trains/community/castopod/{1.0.8 => 1.0.9}/templates/test_values/basic-values.yaml (100%) rename trains/community/castopod/{1.0.8 => 1.0.9}/templates/test_values/redirect-values.yaml (100%) delete mode 100644 trains/community/chia/1.0.14/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/community/chia/1.0.14/templates/library/base_v1_1_3/permissions.py rename trains/community/chia/{1.0.14 => 1.0.15}/README.md (100%) rename trains/community/chia/{1.0.14 => 1.0.15}/app.yaml (84%) rename trains/community/chia/{1.0.14 => 1.0.15}/ix_values.yaml (100%) rename trains/community/chia/{1.0.14 => 1.0.15}/migrations/migrate_from_kubernetes (100%) rename trains/community/chia/{1.0.14 => 1.0.15}/migrations/migration_helpers/__init__.py (100%) rename trains/community/chia/{1.0.14 => 1.0.15}/migrations/migration_helpers/cpu.py (100%) rename trains/community/chia/{1.0.14 => 1.0.15}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/chia/{1.0.14 => 1.0.15}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/chia/{1.0.14 => 1.0.15}/migrations/migration_helpers/memory.py (100%) rename trains/community/chia/{1.0.14 => 1.0.15}/migrations/migration_helpers/resources.py (100%) rename trains/community/chia/{1.0.14 => 1.0.15}/migrations/migration_helpers/storage.py (100%) rename trains/community/chia/{1.0.14 => 1.0.15}/questions.yaml (100%) rename trains/community/chia/{1.0.14 => 1.0.15}/templates/docker-compose.yaml (100%) rename trains/community/chia/{1.0.14/templates/library/base_v1_1_3 => 1.0.15/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/chia/{1.0.14/templates/library/base_v1_1_3 => 1.0.15/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/community/chia/1.0.15/templates/library/base_v1_1_4/healthchecks.py rename trains/community/chia/{1.0.14/templates/library/base_v1_1_3 => 1.0.15/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/chia/{1.0.14/templates/library/base_v1_1_3 => 1.0.15/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/chia/{1.0.14/templates/library/base_v1_1_3 => 1.0.15/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/community/chia/1.0.15/templates/library/base_v1_1_4/permissions.py rename trains/community/chia/{1.0.14/templates/library/base_v1_1_3 => 1.0.15/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/chia/{1.0.14/templates/library/base_v1_1_3 => 1.0.15/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/chia/{1.0.14/templates/library/base_v1_1_3 => 1.0.15/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/chia/{1.0.14/templates/library/base_v1_1_3 => 1.0.15/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/chia/{1.0.14/templates/library/base_v1_1_3 => 1.0.15/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/chia/{1.0.14/templates/library/base_v1_1_3 => 1.0.15/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/chia/{1.0.14/templates/library/base_v1_1_3 => 1.0.15/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/chia/{1.0.14 => 1.0.15}/templates/test_values/basic-values.yaml (100%) rename trains/community/chia/{1.0.14 => 1.0.15}/templates/test_values/farmer-values.yaml (100%) rename trains/community/clamav/{1.1.9 => 1.1.10}/README.md (100%) rename trains/community/clamav/{1.1.9 => 1.1.10}/app.yaml (89%) rename trains/community/clamav/{1.1.9 => 1.1.10}/ix_values.yaml (100%) rename trains/community/clamav/{1.1.9 => 1.1.10}/migrations/migrate_from_kubernetes (100%) rename trains/community/clamav/{1.1.9 => 1.1.10}/migrations/migration_helpers/__init__.py (100%) rename trains/community/clamav/{1.1.9 => 1.1.10}/migrations/migration_helpers/cpu.py (100%) rename trains/community/clamav/{1.1.9 => 1.1.10}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/clamav/{1.1.9 => 1.1.10}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/clamav/{1.1.9 => 1.1.10}/migrations/migration_helpers/memory.py (100%) rename trains/community/clamav/{1.1.9 => 1.1.10}/migrations/migration_helpers/resources.py (100%) rename trains/community/clamav/{1.1.9 => 1.1.10}/migrations/migration_helpers/storage.py (100%) rename trains/community/clamav/{1.1.9 => 1.1.10}/questions.yaml (100%) rename trains/community/clamav/{1.1.9 => 1.1.10}/templates/docker-compose.yaml (100%) rename trains/community/clamav/{1.1.9/templates/library/base_v1_1_3 => 1.1.10/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/clamav/{1.1.9/templates/library/base_v1_1_3 => 1.1.10/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/community/clamav/1.1.10/templates/library/base_v1_1_4/healthchecks.py rename trains/community/clamav/{1.1.9/templates/library/base_v1_1_3 => 1.1.10/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/clamav/{1.1.9/templates/library/base_v1_1_3 => 1.1.10/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/clamav/{1.1.9/templates/library/base_v1_1_3 => 1.1.10/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/community/clamav/1.1.10/templates/library/base_v1_1_4/permissions.py rename trains/community/clamav/{1.1.9/templates/library/base_v1_1_3 => 1.1.10/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/clamav/{1.1.9/templates/library/base_v1_1_3 => 1.1.10/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/clamav/{1.1.9/templates/library/base_v1_1_3 => 1.1.10/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/clamav/{1.1.9/templates/library/base_v1_1_3 => 1.1.10/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/clamav/{1.1.9/templates/library/base_v1_1_3 => 1.1.10/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/clamav/{1.1.9/templates/library/base_v1_1_3 => 1.1.10/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/clamav/{1.1.9/templates/library/base_v1_1_3 => 1.1.10/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/clamav/{1.1.9 => 1.1.10}/templates/test_values/basic-values.yaml (100%) rename trains/community/clamav/{1.1.9 => 1.1.10}/templates/test_values/milterd-values.yaml (100%) rename trains/community/clamav/{1.1.9 => 1.1.10}/templates/test_values/no-clamd-values.yaml (100%) rename trains/community/clamav/{1.1.9 => 1.1.10}/templates/test_values/no-freshclamd-values.yaml (100%) delete mode 100644 trains/community/clamav/1.1.9/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/community/clamav/1.1.9/templates/library/base_v1_1_3/permissions.py delete mode 100644 trains/community/cloudflared/1.1.12/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/community/cloudflared/1.1.12/templates/library/base_v1_1_3/permissions.py rename trains/community/cloudflared/{1.1.12 => 1.1.13}/README.md (100%) rename trains/community/cloudflared/{1.1.12 => 1.1.13}/app.yaml (86%) rename trains/community/cloudflared/{1.1.12 => 1.1.13}/ix_values.yaml (100%) rename trains/community/cloudflared/{1.1.12 => 1.1.13}/migrations/migrate_from_kubernetes (100%) rename trains/community/cloudflared/{1.1.12 => 1.1.13}/migrations/migration_helpers/__init__.py (100%) rename trains/community/cloudflared/{1.1.12 => 1.1.13}/migrations/migration_helpers/cpu.py (100%) rename trains/community/cloudflared/{1.1.12 => 1.1.13}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/cloudflared/{1.1.12 => 1.1.13}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/cloudflared/{1.1.12 => 1.1.13}/migrations/migration_helpers/memory.py (100%) rename trains/community/cloudflared/{1.1.12 => 1.1.13}/migrations/migration_helpers/resources.py (100%) rename trains/community/cloudflared/{1.1.12 => 1.1.13}/migrations/migration_helpers/storage.py (100%) rename trains/community/cloudflared/{1.1.12 => 1.1.13}/questions.yaml (100%) rename trains/community/cloudflared/{1.1.12 => 1.1.13}/templates/docker-compose.yaml (100%) rename trains/community/cloudflared/{1.1.12/templates/library/base_v1_1_3 => 1.1.13/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/cloudflared/{1.1.12/templates/library/base_v1_1_3 => 1.1.13/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/community/cloudflared/1.1.13/templates/library/base_v1_1_4/healthchecks.py rename trains/community/cloudflared/{1.1.12/templates/library/base_v1_1_3 => 1.1.13/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/cloudflared/{1.1.12/templates/library/base_v1_1_3 => 1.1.13/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/cloudflared/{1.1.12/templates/library/base_v1_1_3 => 1.1.13/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/community/cloudflared/1.1.13/templates/library/base_v1_1_4/permissions.py rename trains/community/cloudflared/{1.1.12/templates/library/base_v1_1_3 => 1.1.13/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/cloudflared/{1.1.12/templates/library/base_v1_1_3 => 1.1.13/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/cloudflared/{1.1.12/templates/library/base_v1_1_3 => 1.1.13/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/cloudflared/{1.1.12/templates/library/base_v1_1_3 => 1.1.13/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/cloudflared/{1.1.12/templates/library/base_v1_1_3 => 1.1.13/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/cloudflared/{1.1.12/templates/library/base_v1_1_3 => 1.1.13/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/cloudflared/{1.1.12/templates/library/base_v1_1_3 => 1.1.13/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/cloudflared/{1.1.12 => 1.1.13}/templates/test_values/basic-values.yaml (100%) delete mode 100644 trains/community/dashy/1.0.17/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/community/dashy/1.0.17/templates/library/base_v1_1_3/permissions.py rename trains/community/dashy/{1.0.17 => 1.0.18}/README.md (100%) rename trains/community/dashy/{1.0.17 => 1.0.18}/app.yaml (85%) rename trains/community/dashy/{1.0.17 => 1.0.18}/ix_values.yaml (100%) rename trains/community/dashy/{1.0.17 => 1.0.18}/migrations/migrate_from_kubernetes (100%) rename trains/community/dashy/{1.0.17 => 1.0.18}/migrations/migration_helpers/__init__.py (100%) rename trains/community/dashy/{1.0.17 => 1.0.18}/migrations/migration_helpers/cpu.py (100%) rename trains/community/dashy/{1.0.17 => 1.0.18}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/dashy/{1.0.17 => 1.0.18}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/dashy/{1.0.17 => 1.0.18}/migrations/migration_helpers/memory.py (100%) rename trains/community/dashy/{1.0.17 => 1.0.18}/migrations/migration_helpers/resources.py (100%) rename trains/community/dashy/{1.0.17 => 1.0.18}/migrations/migration_helpers/storage.py (100%) rename trains/community/dashy/{1.0.17 => 1.0.18}/questions.yaml (100%) rename trains/community/dashy/{1.0.17 => 1.0.18}/templates/docker-compose.yaml (100%) rename trains/community/dashy/{1.0.17/templates/library/base_v1_1_3 => 1.0.18/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/dashy/{1.0.17/templates/library/base_v1_1_3 => 1.0.18/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/community/dashy/1.0.18/templates/library/base_v1_1_4/healthchecks.py rename trains/community/dashy/{1.0.17/templates/library/base_v1_1_3 => 1.0.18/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/dashy/{1.0.17/templates/library/base_v1_1_3 => 1.0.18/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/dashy/{1.0.17/templates/library/base_v1_1_3 => 1.0.18/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/community/dashy/1.0.18/templates/library/base_v1_1_4/permissions.py rename trains/community/dashy/{1.0.17/templates/library/base_v1_1_3 => 1.0.18/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/dashy/{1.0.17/templates/library/base_v1_1_3 => 1.0.18/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/dashy/{1.0.17/templates/library/base_v1_1_3 => 1.0.18/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/dashy/{1.0.17/templates/library/base_v1_1_3 => 1.0.18/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/dashy/{1.0.17/templates/library/base_v1_1_3 => 1.0.18/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/dashy/{1.0.17/templates/library/base_v1_1_3 => 1.0.18/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/dashy/{1.0.17/templates/library/base_v1_1_3 => 1.0.18/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/dashy/{1.0.17 => 1.0.18}/templates/test_values/basic-values.yaml (100%) rename trains/community/dashy/{1.0.17 => 1.0.18}/templates/test_values/https-values.yaml (100%) delete mode 100644 trains/community/ddns-updater/1.0.23/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/community/ddns-updater/1.0.23/templates/library/base_v1_1_3/permissions.py rename trains/community/ddns-updater/{1.0.23 => 1.0.24}/README.md (100%) rename trains/community/ddns-updater/{1.0.23 => 1.0.24}/app.yaml (87%) rename trains/community/ddns-updater/{1.0.23 => 1.0.24}/ix_values.yaml (100%) rename trains/community/ddns-updater/{1.0.23 => 1.0.24}/migrations/migrate_from_kubernetes (100%) rename trains/community/ddns-updater/{1.0.23 => 1.0.24}/migrations/migration_helpers/__init__.py (100%) rename trains/community/ddns-updater/{1.0.23 => 1.0.24}/migrations/migration_helpers/cpu.py (100%) rename trains/community/ddns-updater/{1.0.23 => 1.0.24}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/ddns-updater/{1.0.23 => 1.0.24}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/ddns-updater/{1.0.23 => 1.0.24}/migrations/migration_helpers/memory.py (100%) rename trains/community/ddns-updater/{1.0.23 => 1.0.24}/migrations/migration_helpers/resources.py (100%) rename trains/community/ddns-updater/{1.0.23 => 1.0.24}/migrations/migration_helpers/storage.py (100%) rename trains/community/ddns-updater/{1.0.23 => 1.0.24}/questions.yaml (100%) rename trains/community/ddns-updater/{1.0.23 => 1.0.24}/templates/docker-compose.yaml (100%) rename trains/community/ddns-updater/{1.0.23/templates/library/base_v1_1_3 => 1.0.24/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/ddns-updater/{1.0.23/templates/library/base_v1_1_3 => 1.0.24/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/community/ddns-updater/1.0.24/templates/library/base_v1_1_4/healthchecks.py rename trains/community/ddns-updater/{1.0.23/templates/library/base_v1_1_3 => 1.0.24/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/ddns-updater/{1.0.23/templates/library/base_v1_1_3 => 1.0.24/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/ddns-updater/{1.0.23/templates/library/base_v1_1_3 => 1.0.24/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/community/ddns-updater/1.0.24/templates/library/base_v1_1_4/permissions.py rename trains/community/ddns-updater/{1.0.23/templates/library/base_v1_1_3 => 1.0.24/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/ddns-updater/{1.0.23/templates/library/base_v1_1_3 => 1.0.24/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/ddns-updater/{1.0.23/templates/library/base_v1_1_3 => 1.0.24/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/ddns-updater/{1.0.23/templates/library/base_v1_1_3 => 1.0.24/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/ddns-updater/{1.0.23/templates/library/base_v1_1_3 => 1.0.24/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/ddns-updater/{1.0.23/templates/library/base_v1_1_3 => 1.0.24/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/ddns-updater/{1.0.23/templates/library/base_v1_1_3 => 1.0.24/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/ddns-updater/{1.0.23/templates/library/community/ddns-updater/v1_0_23 => 1.0.24/templates/library/community/ddns-updater/v1_0_24}/__init__.py (100%) rename trains/community/ddns-updater/{1.0.23/templates/library/community/ddns-updater/v1_0_23 => 1.0.24/templates/library/community/ddns-updater/v1_0_24}/config.py (99%) rename trains/community/ddns-updater/{1.0.23 => 1.0.24}/templates/test_values/aliyun-values.yaml (100%) rename trains/community/ddns-updater/{1.0.23 => 1.0.24}/templates/test_values/allinkl-values.yaml (100%) rename trains/community/ddns-updater/{1.0.23 => 1.0.24}/templates/test_values/basic-values.yaml (100%) rename trains/community/ddns-updater/{1.0.23 => 1.0.24}/templates/test_values/cloudflare-values.yaml (100%) rename trains/community/ddns-updater/{1.0.23 => 1.0.24}/templates/test_values/dd24-values.yaml (100%) rename trains/community/ddns-updater/{1.0.23 => 1.0.24}/templates/test_values/ddnss-values.yaml (100%) rename trains/community/ddns-updater/{1.0.23 => 1.0.24}/templates/test_values/desec-values.yaml (100%) rename trains/community/ddns-updater/{1.0.23 => 1.0.24}/templates/test_values/digitalocean-values.yaml (100%) rename trains/community/ddns-updater/{1.0.23 => 1.0.24}/templates/test_values/dnsomatic-values.yaml (100%) rename trains/community/ddns-updater/{1.0.23 => 1.0.24}/templates/test_values/dnspod-values.yaml (100%) rename trains/community/ddns-updater/{1.0.23 => 1.0.24}/templates/test_values/dondominio-values.yaml (100%) rename trains/community/ddns-updater/{1.0.23 => 1.0.24}/templates/test_values/dreamhost-values.yaml (100%) rename trains/community/ddns-updater/{1.0.23 => 1.0.24}/templates/test_values/duckdns-values.yaml (100%) rename trains/community/ddns-updater/{1.0.23 => 1.0.24}/templates/test_values/dyn-values.yaml (100%) rename trains/community/ddns-updater/{1.0.23 => 1.0.24}/templates/test_values/dynu-values.yaml (100%) rename trains/community/ddns-updater/{1.0.23 => 1.0.24}/templates/test_values/dynv6-values.yaml (100%) rename trains/community/ddns-updater/{1.0.23 => 1.0.24}/templates/test_values/easydns-values.yaml (100%) rename trains/community/ddns-updater/{1.0.23 => 1.0.24}/templates/test_values/freedns-values.yaml (100%) rename trains/community/ddns-updater/{1.0.23 => 1.0.24}/templates/test_values/gandi-values.yaml (100%) rename trains/community/ddns-updater/{1.0.23 => 1.0.24}/templates/test_values/gcp-values.yaml (100%) rename trains/community/ddns-updater/{1.0.23 => 1.0.24}/templates/test_values/godaddy-values.yaml (100%) rename trains/community/ddns-updater/{1.0.23 => 1.0.24}/templates/test_values/goip-values.yaml (100%) rename trains/community/ddns-updater/{1.0.23 => 1.0.24}/templates/test_values/he-values.yaml (100%) rename trains/community/ddns-updater/{1.0.23 => 1.0.24}/templates/test_values/hetzner-values.yaml (100%) rename trains/community/ddns-updater/{1.0.23 => 1.0.24}/templates/test_values/infomaniak-values.yaml (100%) rename trains/community/ddns-updater/{1.0.23 => 1.0.24}/templates/test_values/inwx-values.yaml (100%) rename trains/community/ddns-updater/{1.0.23 => 1.0.24}/templates/test_values/ionos-values.yaml (100%) rename trains/community/ddns-updater/{1.0.23 => 1.0.24}/templates/test_values/linode-values.yaml (100%) rename trains/community/ddns-updater/{1.0.23 => 1.0.24}/templates/test_values/luadns-values.yaml (100%) rename trains/community/ddns-updater/{1.0.23 => 1.0.24}/templates/test_values/namecheap-values.yaml (100%) rename trains/community/ddns-updater/{1.0.23 => 1.0.24}/templates/test_values/namecom-values.yaml (100%) rename trains/community/ddns-updater/{1.0.23 => 1.0.24}/templates/test_values/netcup-values.yaml (100%) rename trains/community/ddns-updater/{1.0.23 => 1.0.24}/templates/test_values/njalla-values.yaml (100%) rename trains/community/ddns-updater/{1.0.23 => 1.0.24}/templates/test_values/noip-values.yaml (100%) rename trains/community/ddns-updater/{1.0.23 => 1.0.24}/templates/test_values/nowdns-values.yaml (100%) rename trains/community/ddns-updater/{1.0.23 => 1.0.24}/templates/test_values/opendns-values.yaml (100%) rename trains/community/ddns-updater/{1.0.23 => 1.0.24}/templates/test_values/ovh-values.yaml (100%) rename trains/community/ddns-updater/{1.0.23 => 1.0.24}/templates/test_values/porkbun-values.yaml (100%) rename trains/community/ddns-updater/{1.0.23 => 1.0.24}/templates/test_values/route53-values.yaml (100%) rename trains/community/ddns-updater/{1.0.23 => 1.0.24}/templates/test_values/selfhostde-values.yaml (100%) rename trains/community/ddns-updater/{1.0.23 => 1.0.24}/templates/test_values/servercow-values.yaml (100%) rename trains/community/ddns-updater/{1.0.23 => 1.0.24}/templates/test_values/spdyn-values.yaml (100%) rename trains/community/ddns-updater/{1.0.23 => 1.0.24}/templates/test_values/strato-values.yaml (100%) rename trains/community/ddns-updater/{1.0.23 => 1.0.24}/templates/test_values/variomedia-values.yaml (100%) rename trains/community/ddns-updater/{1.0.23 => 1.0.24}/templates/test_values/zoneedit-values.yaml (100%) delete mode 100644 trains/community/deluge/1.0.17/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/community/deluge/1.0.17/templates/library/base_v1_1_3/permissions.py rename trains/community/deluge/{1.0.17 => 1.0.18}/README.md (100%) rename trains/community/deluge/{1.0.17 => 1.0.18}/app.yaml (89%) rename trains/community/deluge/{1.0.17 => 1.0.18}/ix_values.yaml (100%) rename trains/community/deluge/{1.0.17 => 1.0.18}/migrations/migrate_from_kubernetes (100%) rename trains/community/deluge/{1.0.17 => 1.0.18}/migrations/migration_helpers/__init__.py (100%) rename trains/community/deluge/{1.0.17 => 1.0.18}/migrations/migration_helpers/cpu.py (100%) rename trains/community/deluge/{1.0.17 => 1.0.18}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/deluge/{1.0.17 => 1.0.18}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/deluge/{1.0.17 => 1.0.18}/migrations/migration_helpers/memory.py (100%) rename trains/community/deluge/{1.0.17 => 1.0.18}/migrations/migration_helpers/resources.py (100%) rename trains/community/deluge/{1.0.17 => 1.0.18}/migrations/migration_helpers/storage.py (100%) rename trains/community/deluge/{1.0.17 => 1.0.18}/questions.yaml (100%) rename trains/community/deluge/{1.0.17 => 1.0.18}/templates/docker-compose.yaml (100%) rename trains/community/deluge/{1.0.17/templates/library/base_v1_1_3 => 1.0.18/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/deluge/{1.0.17/templates/library/base_v1_1_3 => 1.0.18/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/community/deluge/1.0.18/templates/library/base_v1_1_4/healthchecks.py rename trains/community/deluge/{1.0.17/templates/library/base_v1_1_3 => 1.0.18/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/deluge/{1.0.17/templates/library/base_v1_1_3 => 1.0.18/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/deluge/{1.0.17/templates/library/base_v1_1_3 => 1.0.18/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/community/deluge/1.0.18/templates/library/base_v1_1_4/permissions.py rename trains/community/deluge/{1.0.17/templates/library/base_v1_1_3 => 1.0.18/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/deluge/{1.0.17/templates/library/base_v1_1_3 => 1.0.18/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/deluge/{1.0.17/templates/library/base_v1_1_3 => 1.0.18/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/deluge/{1.0.17/templates/library/base_v1_1_3 => 1.0.18/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/deluge/{1.0.17/templates/library/base_v1_1_3 => 1.0.18/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/deluge/{1.0.17/templates/library/base_v1_1_3 => 1.0.18/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/deluge/{1.0.17/templates/library/base_v1_1_3 => 1.0.18/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/deluge/{1.0.17 => 1.0.18}/templates/test_values/basic-values.yaml (100%) rename trains/community/deluge/{1.0.17 => 1.0.18}/templates/test_values/hostnet-values.yaml (100%) delete mode 100644 trains/community/distribution/1.0.18/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/community/distribution/1.0.18/templates/library/base_v1_1_3/permissions.py rename trains/community/distribution/{1.0.18 => 1.0.19}/README.md (100%) rename trains/community/distribution/{1.0.18 => 1.0.19}/app.yaml (86%) rename trains/community/distribution/{1.0.18 => 1.0.19}/ix_values.yaml (100%) rename trains/community/distribution/{1.0.18 => 1.0.19}/migrations/migrate_from_kubernetes (100%) rename trains/community/distribution/{1.0.18 => 1.0.19}/migrations/migration_helpers/__init__.py (100%) rename trains/community/distribution/{1.0.18 => 1.0.19}/migrations/migration_helpers/cpu.py (100%) rename trains/community/distribution/{1.0.18 => 1.0.19}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/distribution/{1.0.18 => 1.0.19}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/distribution/{1.0.18 => 1.0.19}/migrations/migration_helpers/memory.py (100%) rename trains/community/distribution/{1.0.18 => 1.0.19}/migrations/migration_helpers/resources.py (100%) rename trains/community/distribution/{1.0.18 => 1.0.19}/migrations/migration_helpers/storage.py (100%) rename trains/community/distribution/{1.0.18 => 1.0.19}/questions.yaml (100%) rename trains/community/distribution/{1.0.18 => 1.0.19}/templates/docker-compose.yaml (100%) rename trains/community/distribution/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/distribution/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/community/distribution/1.0.19/templates/library/base_v1_1_4/healthchecks.py rename trains/community/distribution/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/distribution/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/distribution/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/community/distribution/1.0.19/templates/library/base_v1_1_4/permissions.py rename trains/community/distribution/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/distribution/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/distribution/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/distribution/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/distribution/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/distribution/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/distribution/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/distribution/{1.0.18 => 1.0.19}/templates/test_values/auth-values.yaml (100%) rename trains/community/distribution/{1.0.18 => 1.0.19}/templates/test_values/basic-values.yaml (100%) rename trains/community/distribution/{1.0.18 => 1.0.19}/templates/test_values/https-values.yaml (100%) delete mode 100644 trains/community/dockge/1.0.16/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/community/dockge/1.0.16/templates/library/base_v1_1_3/permissions.py rename trains/community/dockge/{1.0.16 => 1.0.17}/README.md (100%) rename trains/community/dockge/{1.0.16 => 1.0.17}/app.yaml (91%) rename trains/community/dockge/{1.0.16 => 1.0.17}/ix_values.yaml (100%) rename trains/community/dockge/{1.0.16 => 1.0.17}/migrations/migration_helpers/__init__.py (100%) rename trains/community/dockge/{1.0.16 => 1.0.17}/migrations/migration_helpers/cpu.py (100%) rename trains/community/dockge/{1.0.16 => 1.0.17}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/dockge/{1.0.16 => 1.0.17}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/dockge/{1.0.16 => 1.0.17}/migrations/migration_helpers/memory.py (100%) rename trains/community/dockge/{1.0.16 => 1.0.17}/migrations/migration_helpers/resources.py (100%) rename trains/community/dockge/{1.0.16 => 1.0.17}/migrations/migration_helpers/storage.py (100%) rename trains/community/dockge/{1.0.16 => 1.0.17}/questions.yaml (100%) rename trains/community/dockge/{1.0.16 => 1.0.17}/templates/docker-compose.yaml (100%) rename trains/community/dockge/{1.0.16/templates/library/base_v1_1_3 => 1.0.17/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/dockge/{1.0.16/templates/library/base_v1_1_3 => 1.0.17/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/community/dockge/1.0.17/templates/library/base_v1_1_4/healthchecks.py rename trains/community/dockge/{1.0.16/templates/library/base_v1_1_3 => 1.0.17/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/dockge/{1.0.16/templates/library/base_v1_1_3 => 1.0.17/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/dockge/{1.0.16/templates/library/base_v1_1_3 => 1.0.17/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/community/dockge/1.0.17/templates/library/base_v1_1_4/permissions.py rename trains/community/dockge/{1.0.16/templates/library/base_v1_1_3 => 1.0.17/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/dockge/{1.0.16/templates/library/base_v1_1_3 => 1.0.17/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/dockge/{1.0.16/templates/library/base_v1_1_3 => 1.0.17/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/dockge/{1.0.16/templates/library/base_v1_1_3 => 1.0.17/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/dockge/{1.0.16/templates/library/base_v1_1_3 => 1.0.17/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/dockge/{1.0.16/templates/library/base_v1_1_3 => 1.0.17/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/dockge/{1.0.16/templates/library/base_v1_1_3 => 1.0.17/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/dockge/{1.0.16 => 1.0.17}/templates/test_values/basic-values.yaml (100%) rename trains/community/dockge/{1.0.16 => 1.0.17}/templates/test_values/https-values.yaml (100%) delete mode 100644 trains/community/drawio/1.1.10/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/community/drawio/1.1.10/templates/library/base_v1_1_3/permissions.py rename trains/community/drawio/{1.1.10 => 1.1.11}/README.md (100%) rename trains/community/drawio/{1.1.10 => 1.1.11}/app.yaml (88%) rename trains/community/drawio/{1.1.10 => 1.1.11}/ix_values.yaml (100%) rename trains/community/drawio/{1.1.10 => 1.1.11}/migrations/migrate_from_kubernetes (100%) rename trains/community/drawio/{1.1.10 => 1.1.11}/migrations/migration_helpers/__init__.py (100%) rename trains/community/drawio/{1.1.10 => 1.1.11}/migrations/migration_helpers/cpu.py (100%) rename trains/community/drawio/{1.1.10 => 1.1.11}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/drawio/{1.1.10 => 1.1.11}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/drawio/{1.1.10 => 1.1.11}/migrations/migration_helpers/memory.py (100%) rename trains/community/drawio/{1.1.10 => 1.1.11}/migrations/migration_helpers/resources.py (100%) rename trains/community/drawio/{1.1.10 => 1.1.11}/migrations/migration_helpers/storage.py (100%) rename trains/community/drawio/{1.1.10 => 1.1.11}/questions.yaml (100%) rename trains/community/drawio/{1.1.10 => 1.1.11}/templates/docker-compose.yaml (100%) rename trains/community/drawio/{1.1.10/templates/library/base_v1_1_3 => 1.1.11/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/drawio/{1.1.10/templates/library/base_v1_1_3 => 1.1.11/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/community/drawio/1.1.11/templates/library/base_v1_1_4/healthchecks.py rename trains/community/drawio/{1.1.10/templates/library/base_v1_1_3 => 1.1.11/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/drawio/{1.1.10/templates/library/base_v1_1_3 => 1.1.11/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/drawio/{1.1.10/templates/library/base_v1_1_3 => 1.1.11/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/community/drawio/1.1.11/templates/library/base_v1_1_4/permissions.py rename trains/community/drawio/{1.1.10/templates/library/base_v1_1_3 => 1.1.11/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/drawio/{1.1.10/templates/library/base_v1_1_3 => 1.1.11/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/drawio/{1.1.10/templates/library/base_v1_1_3 => 1.1.11/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/drawio/{1.1.10/templates/library/base_v1_1_3 => 1.1.11/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/drawio/{1.1.10/templates/library/base_v1_1_3 => 1.1.11/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/drawio/{1.1.10/templates/library/base_v1_1_3 => 1.1.11/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/drawio/{1.1.10/templates/library/base_v1_1_3 => 1.1.11/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/drawio/{1.1.10 => 1.1.11}/templates/test_values/basic-values.yaml (100%) delete mode 100644 trains/community/filebrowser/1.1.10/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/community/filebrowser/1.1.10/templates/library/base_v1_1_3/permissions.py rename trains/community/filebrowser/{1.1.10 => 1.1.11}/README.md (100%) rename trains/community/filebrowser/{1.1.10 => 1.1.11}/app.yaml (90%) rename trains/community/filebrowser/{1.1.10 => 1.1.11}/ix_values.yaml (100%) rename trains/community/filebrowser/{1.1.10 => 1.1.11}/migrations/migrate_from_kubernetes (100%) rename trains/community/filebrowser/{1.1.10 => 1.1.11}/migrations/migration_helpers/__init__.py (100%) rename trains/community/filebrowser/{1.1.10 => 1.1.11}/migrations/migration_helpers/cpu.py (100%) rename trains/community/filebrowser/{1.1.10 => 1.1.11}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/filebrowser/{1.1.10 => 1.1.11}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/filebrowser/{1.1.10 => 1.1.11}/migrations/migration_helpers/memory.py (100%) rename trains/community/filebrowser/{1.1.10 => 1.1.11}/migrations/migration_helpers/resources.py (100%) rename trains/community/filebrowser/{1.1.10 => 1.1.11}/migrations/migration_helpers/storage.py (100%) rename trains/community/filebrowser/{1.1.10 => 1.1.11}/questions.yaml (100%) rename trains/community/filebrowser/{1.1.10 => 1.1.11}/templates/docker-compose.yaml (100%) rename trains/community/filebrowser/{1.1.10/templates/library/base_v1_1_3 => 1.1.11/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/filebrowser/{1.1.10/templates/library/base_v1_1_3 => 1.1.11/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/community/filebrowser/1.1.11/templates/library/base_v1_1_4/healthchecks.py rename trains/community/filebrowser/{1.1.10/templates/library/base_v1_1_3 => 1.1.11/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/filebrowser/{1.1.10/templates/library/base_v1_1_3 => 1.1.11/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/filebrowser/{1.1.10/templates/library/base_v1_1_3 => 1.1.11/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/community/filebrowser/1.1.11/templates/library/base_v1_1_4/permissions.py rename trains/community/filebrowser/{1.1.10/templates/library/base_v1_1_3 => 1.1.11/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/filebrowser/{1.1.10/templates/library/base_v1_1_3 => 1.1.11/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/filebrowser/{1.1.10/templates/library/base_v1_1_3 => 1.1.11/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/filebrowser/{1.1.10/templates/library/base_v1_1_3 => 1.1.11/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/filebrowser/{1.1.10/templates/library/base_v1_1_3 => 1.1.11/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/filebrowser/{1.1.10/templates/library/base_v1_1_3 => 1.1.11/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/filebrowser/{1.1.10/templates/library/base_v1_1_3 => 1.1.11/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/filebrowser/{1.1.10 => 1.1.11}/templates/test_values/basic-values.yaml (100%) rename trains/community/filebrowser/{1.1.10 => 1.1.11}/templates/test_values/https-values.yaml (100%) delete mode 100644 trains/community/firefly-iii/1.2.17/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/community/firefly-iii/1.2.17/templates/library/base_v1_1_3/permissions.py rename trains/community/firefly-iii/{1.2.17 => 1.2.18}/README.md (100%) rename trains/community/firefly-iii/{1.2.17 => 1.2.18}/app.yaml (93%) rename trains/community/firefly-iii/{1.2.17 => 1.2.18}/ix_values.yaml (100%) rename trains/community/firefly-iii/{1.2.17 => 1.2.18}/migrations/migrate_from_kubernetes (100%) rename trains/community/firefly-iii/{1.2.17 => 1.2.18}/migrations/migration_helpers/__init__.py (100%) rename trains/community/firefly-iii/{1.2.17 => 1.2.18}/migrations/migration_helpers/cpu.py (100%) rename trains/community/firefly-iii/{1.2.17 => 1.2.18}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/firefly-iii/{1.2.17 => 1.2.18}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/firefly-iii/{1.2.17 => 1.2.18}/migrations/migration_helpers/memory.py (100%) rename trains/community/firefly-iii/{1.2.17 => 1.2.18}/migrations/migration_helpers/resources.py (100%) rename trains/community/firefly-iii/{1.2.17 => 1.2.18}/migrations/migration_helpers/storage.py (100%) rename trains/community/firefly-iii/{1.2.17 => 1.2.18}/questions.yaml (100%) rename trains/community/firefly-iii/{1.2.17 => 1.2.18}/templates/docker-compose.yaml (100%) rename trains/community/firefly-iii/{1.2.17/templates/library/base_v1_1_3 => 1.2.18/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/firefly-iii/{1.2.17/templates/library/base_v1_1_3 => 1.2.18/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/community/firefly-iii/1.2.18/templates/library/base_v1_1_4/healthchecks.py rename trains/community/firefly-iii/{1.2.17/templates/library/base_v1_1_3 => 1.2.18/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/firefly-iii/{1.2.17/templates/library/base_v1_1_3 => 1.2.18/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/firefly-iii/{1.2.17/templates/library/base_v1_1_3 => 1.2.18/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/community/firefly-iii/1.2.18/templates/library/base_v1_1_4/permissions.py rename trains/community/firefly-iii/{1.2.17/templates/library/base_v1_1_3 => 1.2.18/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/firefly-iii/{1.2.17/templates/library/base_v1_1_3 => 1.2.18/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/firefly-iii/{1.2.17/templates/library/base_v1_1_3 => 1.2.18/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/firefly-iii/{1.2.17/templates/library/base_v1_1_3 => 1.2.18/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/firefly-iii/{1.2.17/templates/library/base_v1_1_3 => 1.2.18/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/firefly-iii/{1.2.17/templates/library/base_v1_1_3 => 1.2.18/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/firefly-iii/{1.2.17/templates/library/base_v1_1_3 => 1.2.18/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/firefly-iii/{1.2.17 => 1.2.18}/templates/test_values/basic-values.yaml (100%) rename trains/community/firefly-iii/{1.2.17 => 1.2.18}/templates/test_values/importer-values.yaml (100%) delete mode 100644 trains/community/flame/1.0.18/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/community/flame/1.0.18/templates/library/base_v1_1_3/permissions.py rename trains/community/flame/{1.0.18 => 1.0.19}/README.md (100%) rename trains/community/flame/{1.0.18 => 1.0.19}/app.yaml (88%) rename trains/community/flame/{1.0.18 => 1.0.19}/ix_values.yaml (100%) rename trains/community/flame/{1.0.18 => 1.0.19}/migrations/migrate_from_kubernetes (100%) rename trains/community/flame/{1.0.18 => 1.0.19}/migrations/migration_helpers/__init__.py (100%) rename trains/community/flame/{1.0.18 => 1.0.19}/migrations/migration_helpers/cpu.py (100%) rename trains/community/flame/{1.0.18 => 1.0.19}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/flame/{1.0.18 => 1.0.19}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/flame/{1.0.18 => 1.0.19}/migrations/migration_helpers/memory.py (100%) rename trains/community/flame/{1.0.18 => 1.0.19}/migrations/migration_helpers/resources.py (100%) rename trains/community/flame/{1.0.18 => 1.0.19}/migrations/migration_helpers/storage.py (100%) rename trains/community/flame/{1.0.18 => 1.0.19}/questions.yaml (100%) rename trains/community/flame/{1.0.18 => 1.0.19}/templates/docker-compose.yaml (100%) rename trains/community/flame/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/flame/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/community/flame/1.0.19/templates/library/base_v1_1_4/healthchecks.py rename trains/community/flame/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/flame/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/flame/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/community/flame/1.0.19/templates/library/base_v1_1_4/permissions.py rename trains/community/flame/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/flame/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/flame/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/flame/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/flame/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/flame/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/flame/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/flame/{1.0.18 => 1.0.19}/templates/test_values/basic-values.yaml (100%) delete mode 100644 trains/community/freshrss/1.1.13/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/community/freshrss/1.1.13/templates/library/base_v1_1_3/permissions.py rename trains/community/freshrss/{1.1.13 => 1.1.14}/README.md (100%) rename trains/community/freshrss/{1.1.13 => 1.1.14}/app.yaml (90%) rename trains/community/freshrss/{1.1.13 => 1.1.14}/ix_values.yaml (100%) rename trains/community/freshrss/{1.1.13 => 1.1.14}/migrations/migrate_from_kubernetes (100%) rename trains/community/freshrss/{1.1.13 => 1.1.14}/migrations/migration_helpers/__init__.py (100%) rename trains/community/freshrss/{1.1.13 => 1.1.14}/migrations/migration_helpers/cpu.py (100%) rename trains/community/freshrss/{1.1.13 => 1.1.14}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/freshrss/{1.1.13 => 1.1.14}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/freshrss/{1.1.13 => 1.1.14}/migrations/migration_helpers/memory.py (100%) rename trains/community/freshrss/{1.1.13 => 1.1.14}/migrations/migration_helpers/resources.py (100%) rename trains/community/freshrss/{1.1.13 => 1.1.14}/migrations/migration_helpers/storage.py (100%) rename trains/community/freshrss/{1.1.13 => 1.1.14}/questions.yaml (100%) rename trains/community/freshrss/{1.1.13 => 1.1.14}/templates/docker-compose.yaml (100%) rename trains/community/freshrss/{1.1.13/templates/library/base_v1_1_3 => 1.1.14/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/freshrss/{1.1.13/templates/library/base_v1_1_3 => 1.1.14/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/community/freshrss/1.1.14/templates/library/base_v1_1_4/healthchecks.py rename trains/community/freshrss/{1.1.13/templates/library/base_v1_1_3 => 1.1.14/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/freshrss/{1.1.13/templates/library/base_v1_1_3 => 1.1.14/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/freshrss/{1.1.13/templates/library/base_v1_1_3 => 1.1.14/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/community/freshrss/1.1.14/templates/library/base_v1_1_4/permissions.py rename trains/community/freshrss/{1.1.13/templates/library/base_v1_1_3 => 1.1.14/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/freshrss/{1.1.13/templates/library/base_v1_1_3 => 1.1.14/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/freshrss/{1.1.13/templates/library/base_v1_1_3 => 1.1.14/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/freshrss/{1.1.13/templates/library/base_v1_1_3 => 1.1.14/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/freshrss/{1.1.13/templates/library/base_v1_1_3 => 1.1.14/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/freshrss/{1.1.13/templates/library/base_v1_1_3 => 1.1.14/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/freshrss/{1.1.13/templates/library/base_v1_1_3 => 1.1.14/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/freshrss/{1.1.13 => 1.1.14}/templates/test_values/basic-values.yaml (100%) delete mode 100644 trains/community/frigate/1.0.8/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/community/frigate/1.0.8/templates/library/base_v1_1_3/permissions.py rename trains/community/frigate/{1.0.8 => 1.0.9}/README.md (100%) rename trains/community/frigate/{1.0.8 => 1.0.9}/app.yaml (91%) rename trains/community/frigate/{1.0.8 => 1.0.9}/ix_values.yaml (100%) rename trains/community/frigate/{1.0.8 => 1.0.9}/migrations/migrate_from_kubernetes (100%) rename trains/community/frigate/{1.0.8 => 1.0.9}/migrations/migration_helpers/__init__.py (100%) rename trains/community/frigate/{1.0.8 => 1.0.9}/migrations/migration_helpers/cpu.py (100%) rename trains/community/frigate/{1.0.8 => 1.0.9}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/frigate/{1.0.8 => 1.0.9}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/frigate/{1.0.8 => 1.0.9}/migrations/migration_helpers/memory.py (100%) rename trains/community/frigate/{1.0.8 => 1.0.9}/migrations/migration_helpers/resources.py (100%) rename trains/community/frigate/{1.0.8 => 1.0.9}/migrations/migration_helpers/storage.py (100%) rename trains/community/frigate/{1.0.8 => 1.0.9}/questions.yaml (100%) rename trains/community/frigate/{1.0.8 => 1.0.9}/templates/docker-compose.yaml (100%) rename trains/community/frigate/{1.0.8/templates/library/base_v1_1_3 => 1.0.9/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/frigate/{1.0.8/templates/library/base_v1_1_3 => 1.0.9/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/community/frigate/1.0.9/templates/library/base_v1_1_4/healthchecks.py rename trains/community/frigate/{1.0.8/templates/library/base_v1_1_3 => 1.0.9/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/frigate/{1.0.8/templates/library/base_v1_1_3 => 1.0.9/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/frigate/{1.0.8/templates/library/base_v1_1_3 => 1.0.9/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/community/frigate/1.0.9/templates/library/base_v1_1_4/permissions.py rename trains/community/frigate/{1.0.8/templates/library/base_v1_1_3 => 1.0.9/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/frigate/{1.0.8/templates/library/base_v1_1_3 => 1.0.9/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/frigate/{1.0.8/templates/library/base_v1_1_3 => 1.0.9/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/frigate/{1.0.8/templates/library/base_v1_1_3 => 1.0.9/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/frigate/{1.0.8/templates/library/base_v1_1_3 => 1.0.9/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/frigate/{1.0.8/templates/library/base_v1_1_3 => 1.0.9/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/frigate/{1.0.8/templates/library/base_v1_1_3 => 1.0.9/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/frigate/{1.0.8 => 1.0.9}/templates/test_values/basic-values.yaml (100%) delete mode 100644 trains/community/fscrawler/1.0.16/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/community/fscrawler/1.0.16/templates/library/base_v1_1_3/permissions.py rename trains/community/fscrawler/{1.0.16 => 1.0.17}/README.md (100%) rename trains/community/fscrawler/{1.0.16 => 1.0.17}/app.yaml (86%) rename trains/community/fscrawler/{1.0.16 => 1.0.17}/ix_values.yaml (100%) rename trains/community/fscrawler/{1.0.16 => 1.0.17}/migrations/migrate_from_kubernetes (100%) rename trains/community/fscrawler/{1.0.16 => 1.0.17}/migrations/migration_helpers/__init__.py (100%) rename trains/community/fscrawler/{1.0.16 => 1.0.17}/migrations/migration_helpers/cpu.py (100%) rename trains/community/fscrawler/{1.0.16 => 1.0.17}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/fscrawler/{1.0.16 => 1.0.17}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/fscrawler/{1.0.16 => 1.0.17}/migrations/migration_helpers/memory.py (100%) rename trains/community/fscrawler/{1.0.16 => 1.0.17}/migrations/migration_helpers/resources.py (100%) rename trains/community/fscrawler/{1.0.16 => 1.0.17}/migrations/migration_helpers/storage.py (100%) rename trains/community/fscrawler/{1.0.16 => 1.0.17}/questions.yaml (100%) rename trains/community/fscrawler/{1.0.16 => 1.0.17}/templates/docker-compose.yaml (100%) rename trains/community/fscrawler/{1.0.16/templates/library/base_v1_1_3 => 1.0.17/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/fscrawler/{1.0.16/templates/library/base_v1_1_3 => 1.0.17/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/community/fscrawler/1.0.17/templates/library/base_v1_1_4/healthchecks.py rename trains/community/fscrawler/{1.0.16/templates/library/base_v1_1_3 => 1.0.17/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/fscrawler/{1.0.16/templates/library/base_v1_1_3 => 1.0.17/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/fscrawler/{1.0.16/templates/library/base_v1_1_3 => 1.0.17/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/community/fscrawler/1.0.17/templates/library/base_v1_1_4/permissions.py rename trains/community/fscrawler/{1.0.16/templates/library/base_v1_1_3 => 1.0.17/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/fscrawler/{1.0.16/templates/library/base_v1_1_3 => 1.0.17/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/fscrawler/{1.0.16/templates/library/base_v1_1_3 => 1.0.17/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/fscrawler/{1.0.16/templates/library/base_v1_1_3 => 1.0.17/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/fscrawler/{1.0.16/templates/library/base_v1_1_3 => 1.0.17/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/fscrawler/{1.0.16/templates/library/base_v1_1_3 => 1.0.17/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/fscrawler/{1.0.16/templates/library/base_v1_1_3 => 1.0.17/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/fscrawler/{1.0.16 => 1.0.17}/templates/test_values/basic-values.yaml (100%) rename trains/community/fscrawler/{1.0.16 => 1.0.17}/templates/test_values/job-values.yaml (100%) rename trains/community/fscrawler/{1.0.16 => 1.0.17}/templates/test_values/no-ocr-values.yaml (100%) rename trains/community/fscrawler/{1.0.16 => 1.0.17}/templates/test_values/rest-values.yaml (100%) delete mode 100644 trains/community/gitea/1.0.11/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/community/gitea/1.0.11/templates/library/base_v1_1_3/permissions.py rename trains/community/gitea/{1.0.11 => 1.0.12}/README.md (100%) rename trains/community/gitea/{1.0.11 => 1.0.12}/app.yaml (88%) rename trains/community/gitea/{1.0.11 => 1.0.12}/ix_values.yaml (100%) rename trains/community/gitea/{1.0.11 => 1.0.12}/migrations/migrate_from_kubernetes (100%) rename trains/community/gitea/{1.0.11 => 1.0.12}/migrations/migration_helpers/__init__.py (100%) rename trains/community/gitea/{1.0.11 => 1.0.12}/migrations/migration_helpers/cpu.py (100%) rename trains/community/gitea/{1.0.11 => 1.0.12}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/gitea/{1.0.11 => 1.0.12}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/gitea/{1.0.11 => 1.0.12}/migrations/migration_helpers/memory.py (100%) rename trains/community/gitea/{1.0.11 => 1.0.12}/migrations/migration_helpers/resources.py (100%) rename trains/community/gitea/{1.0.11 => 1.0.12}/migrations/migration_helpers/storage.py (100%) rename trains/community/gitea/{1.0.11 => 1.0.12}/questions.yaml (100%) rename trains/community/gitea/{1.0.11 => 1.0.12}/templates/docker-compose.yaml (100%) rename trains/community/gitea/{1.0.11/templates/library/base_v1_1_3 => 1.0.12/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/gitea/{1.0.11/templates/library/base_v1_1_3 => 1.0.12/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/community/gitea/1.0.12/templates/library/base_v1_1_4/healthchecks.py rename trains/community/gitea/{1.0.11/templates/library/base_v1_1_3 => 1.0.12/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/gitea/{1.0.11/templates/library/base_v1_1_3 => 1.0.12/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/gitea/{1.0.11/templates/library/base_v1_1_3 => 1.0.12/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/community/gitea/1.0.12/templates/library/base_v1_1_4/permissions.py rename trains/community/gitea/{1.0.11/templates/library/base_v1_1_3 => 1.0.12/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/gitea/{1.0.11/templates/library/base_v1_1_3 => 1.0.12/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/gitea/{1.0.11/templates/library/base_v1_1_3 => 1.0.12/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/gitea/{1.0.11/templates/library/base_v1_1_3 => 1.0.12/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/gitea/{1.0.11/templates/library/base_v1_1_3 => 1.0.12/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/gitea/{1.0.11/templates/library/base_v1_1_3 => 1.0.12/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/gitea/{1.0.11/templates/library/base_v1_1_3 => 1.0.12/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/gitea/{1.0.11 => 1.0.12}/templates/test_values/basic-values.yaml (100%) rename trains/community/gitea/{1.0.11 => 1.0.12}/templates/test_values/https-values.yaml (100%) delete mode 100644 trains/community/grafana/1.1.11/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/community/grafana/1.1.11/templates/library/base_v1_1_3/permissions.py rename trains/community/grafana/{1.1.11 => 1.1.12}/README.md (100%) rename trains/community/grafana/{1.1.11 => 1.1.12}/app.yaml (88%) rename trains/community/grafana/{1.1.11 => 1.1.12}/ix_values.yaml (100%) rename trains/community/grafana/{1.1.11 => 1.1.12}/migrations/migrate_from_kubernetes (100%) rename trains/community/grafana/{1.1.11 => 1.1.12}/migrations/migration_helpers/__init__.py (100%) rename trains/community/grafana/{1.1.11 => 1.1.12}/migrations/migration_helpers/cpu.py (100%) rename trains/community/grafana/{1.1.11 => 1.1.12}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/grafana/{1.1.11 => 1.1.12}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/grafana/{1.1.11 => 1.1.12}/migrations/migration_helpers/memory.py (100%) rename trains/community/grafana/{1.1.11 => 1.1.12}/migrations/migration_helpers/resources.py (100%) rename trains/community/grafana/{1.1.11 => 1.1.12}/migrations/migration_helpers/storage.py (100%) rename trains/community/grafana/{1.1.11 => 1.1.12}/questions.yaml (100%) rename trains/community/grafana/{1.1.11 => 1.1.12}/templates/docker-compose.yaml (100%) rename trains/community/grafana/{1.1.11/templates/library/base_v1_1_3 => 1.1.12/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/grafana/{1.1.11/templates/library/base_v1_1_3 => 1.1.12/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/community/grafana/1.1.12/templates/library/base_v1_1_4/healthchecks.py rename trains/community/grafana/{1.1.11/templates/library/base_v1_1_3 => 1.1.12/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/grafana/{1.1.11/templates/library/base_v1_1_3 => 1.1.12/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/grafana/{1.1.11/templates/library/base_v1_1_3 => 1.1.12/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/community/grafana/1.1.12/templates/library/base_v1_1_4/permissions.py rename trains/community/grafana/{1.1.11/templates/library/base_v1_1_3 => 1.1.12/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/grafana/{1.1.11/templates/library/base_v1_1_3 => 1.1.12/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/grafana/{1.1.11/templates/library/base_v1_1_3 => 1.1.12/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/grafana/{1.1.11/templates/library/base_v1_1_3 => 1.1.12/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/grafana/{1.1.11/templates/library/base_v1_1_3 => 1.1.12/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/grafana/{1.1.11/templates/library/base_v1_1_3 => 1.1.12/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/grafana/{1.1.11/templates/library/base_v1_1_3 => 1.1.12/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/grafana/{1.1.11 => 1.1.12}/templates/test_values/basic-values.yaml (100%) rename trains/community/grafana/{1.1.11 => 1.1.12}/templates/test_values/https-values.yaml (100%) delete mode 100644 trains/community/handbrake/2.0.10/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/community/handbrake/2.0.10/templates/library/base_v1_1_3/permissions.py rename trains/community/handbrake/{2.0.10 => 2.0.11}/README.md (100%) rename trains/community/handbrake/{2.0.10 => 2.0.11}/app.yaml (92%) rename trains/community/handbrake/{2.0.10 => 2.0.11}/ix_values.yaml (100%) rename trains/community/handbrake/{2.0.10 => 2.0.11}/migrations/migrate_from_kubernetes (100%) rename trains/community/handbrake/{2.0.10 => 2.0.11}/migrations/migration_helpers/__init__.py (100%) rename trains/community/handbrake/{2.0.10 => 2.0.11}/migrations/migration_helpers/cpu.py (100%) rename trains/community/handbrake/{2.0.10 => 2.0.11}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/handbrake/{2.0.10 => 2.0.11}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/handbrake/{2.0.10 => 2.0.11}/migrations/migration_helpers/memory.py (100%) rename trains/community/handbrake/{2.0.10 => 2.0.11}/migrations/migration_helpers/resources.py (100%) rename trains/community/handbrake/{2.0.10 => 2.0.11}/migrations/migration_helpers/storage.py (100%) rename trains/community/handbrake/{2.0.10 => 2.0.11}/questions.yaml (100%) rename trains/community/handbrake/{2.0.10 => 2.0.11}/templates/docker-compose.yaml (100%) rename trains/community/handbrake/{2.0.10/templates/library/base_v1_1_3 => 2.0.11/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/handbrake/{2.0.10/templates/library/base_v1_1_3 => 2.0.11/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/community/handbrake/2.0.11/templates/library/base_v1_1_4/healthchecks.py rename trains/community/handbrake/{2.0.10/templates/library/base_v1_1_3 => 2.0.11/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/handbrake/{2.0.10/templates/library/base_v1_1_3 => 2.0.11/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/handbrake/{2.0.10/templates/library/base_v1_1_3 => 2.0.11/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/community/handbrake/2.0.11/templates/library/base_v1_1_4/permissions.py rename trains/community/handbrake/{2.0.10/templates/library/base_v1_1_3 => 2.0.11/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/handbrake/{2.0.10/templates/library/base_v1_1_3 => 2.0.11/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/handbrake/{2.0.10/templates/library/base_v1_1_3 => 2.0.11/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/handbrake/{2.0.10/templates/library/base_v1_1_3 => 2.0.11/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/handbrake/{2.0.10/templates/library/base_v1_1_3 => 2.0.11/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/handbrake/{2.0.10/templates/library/base_v1_1_3 => 2.0.11/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/handbrake/{2.0.10/templates/library/base_v1_1_3 => 2.0.11/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/handbrake/{2.0.10 => 2.0.11}/templates/test_values/basic-values.yaml (100%) rename trains/community/handbrake/{2.0.10 => 2.0.11}/templates/test_values/secure-values.yaml (100%) delete mode 100644 trains/community/homarr/1.0.18/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/community/homarr/1.0.18/templates/library/base_v1_1_3/permissions.py rename trains/community/homarr/{1.0.18 => 1.0.19}/README.md (100%) rename trains/community/homarr/{1.0.18 => 1.0.19}/app.yaml (87%) rename trains/community/homarr/{1.0.18 => 1.0.19}/ix_values.yaml (100%) rename trains/community/homarr/{1.0.18 => 1.0.19}/migrations/migrate_from_kubernetes (100%) rename trains/community/homarr/{1.0.18 => 1.0.19}/migrations/migration_helpers/__init__.py (100%) rename trains/community/homarr/{1.0.18 => 1.0.19}/migrations/migration_helpers/cpu.py (100%) rename trains/community/homarr/{1.0.18 => 1.0.19}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/homarr/{1.0.18 => 1.0.19}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/homarr/{1.0.18 => 1.0.19}/migrations/migration_helpers/memory.py (100%) rename trains/community/homarr/{1.0.18 => 1.0.19}/migrations/migration_helpers/resources.py (100%) rename trains/community/homarr/{1.0.18 => 1.0.19}/migrations/migration_helpers/storage.py (100%) rename trains/community/homarr/{1.0.18 => 1.0.19}/questions.yaml (100%) rename trains/community/homarr/{1.0.18 => 1.0.19}/templates/docker-compose.yaml (100%) rename trains/community/homarr/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/homarr/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/community/homarr/1.0.19/templates/library/base_v1_1_4/healthchecks.py rename trains/community/homarr/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/homarr/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/homarr/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/community/homarr/1.0.19/templates/library/base_v1_1_4/permissions.py rename trains/community/homarr/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/homarr/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/homarr/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/homarr/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/homarr/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/homarr/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/homarr/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/homarr/{1.0.18 => 1.0.19}/templates/test_values/basic-values.yaml (100%) rename trains/community/homarr/{1.0.18 => 1.0.19}/templates/test_values/extra-values.yaml (100%) delete mode 100644 trains/community/homepage/1.0.21/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/community/homepage/1.0.21/templates/library/base_v1_1_3/permissions.py rename trains/community/homepage/{1.0.21 => 1.0.22}/README.md (100%) rename trains/community/homepage/{1.0.21 => 1.0.22}/app.yaml (90%) rename trains/community/homepage/{1.0.21 => 1.0.22}/ix_values.yaml (100%) rename trains/community/homepage/{1.0.21 => 1.0.22}/migrations/migrate_from_kubernetes (100%) rename trains/community/homepage/{1.0.21 => 1.0.22}/migrations/migration_helpers/__init__.py (100%) rename trains/community/homepage/{1.0.21 => 1.0.22}/migrations/migration_helpers/cpu.py (100%) rename trains/community/homepage/{1.0.21 => 1.0.22}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/homepage/{1.0.21 => 1.0.22}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/homepage/{1.0.21 => 1.0.22}/migrations/migration_helpers/memory.py (100%) rename trains/community/homepage/{1.0.21 => 1.0.22}/migrations/migration_helpers/resources.py (100%) rename trains/community/homepage/{1.0.21 => 1.0.22}/migrations/migration_helpers/storage.py (100%) rename trains/community/homepage/{1.0.21 => 1.0.22}/questions.yaml (100%) rename trains/community/homepage/{1.0.21 => 1.0.22}/templates/docker-compose.yaml (100%) rename trains/community/homepage/{1.0.21/templates/library/base_v1_1_3 => 1.0.22/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/homepage/{1.0.21/templates/library/base_v1_1_3 => 1.0.22/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/community/homepage/1.0.22/templates/library/base_v1_1_4/healthchecks.py rename trains/community/homepage/{1.0.21/templates/library/base_v1_1_3 => 1.0.22/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/homepage/{1.0.21/templates/library/base_v1_1_3 => 1.0.22/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/homepage/{1.0.21/templates/library/base_v1_1_3 => 1.0.22/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/community/homepage/1.0.22/templates/library/base_v1_1_4/permissions.py rename trains/community/homepage/{1.0.21/templates/library/base_v1_1_3 => 1.0.22/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/homepage/{1.0.21/templates/library/base_v1_1_3 => 1.0.22/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/homepage/{1.0.21/templates/library/base_v1_1_3 => 1.0.22/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/homepage/{1.0.21/templates/library/base_v1_1_3 => 1.0.22/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/homepage/{1.0.21/templates/library/base_v1_1_3 => 1.0.22/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/homepage/{1.0.21/templates/library/base_v1_1_3 => 1.0.22/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/homepage/{1.0.21/templates/library/base_v1_1_3 => 1.0.22/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/homepage/{1.0.21 => 1.0.22}/templates/test_values/basic-values.yaml (100%) rename trains/community/homer/{2.0.9 => 2.0.10}/README.md (100%) rename trains/community/homer/{2.0.9 => 2.0.10}/app.yaml (86%) rename trains/community/homer/{2.0.9 => 2.0.10}/ix_values.yaml (100%) rename trains/community/homer/{2.0.9 => 2.0.10}/migrations/migrate_from_kubernetes (100%) rename trains/community/homer/{2.0.9 => 2.0.10}/migrations/migration_helpers/__init__.py (100%) rename trains/community/homer/{2.0.9 => 2.0.10}/migrations/migration_helpers/cpu.py (100%) rename trains/community/homer/{2.0.9 => 2.0.10}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/homer/{2.0.9 => 2.0.10}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/homer/{2.0.9 => 2.0.10}/migrations/migration_helpers/memory.py (100%) rename trains/community/homer/{2.0.9 => 2.0.10}/migrations/migration_helpers/resources.py (100%) rename trains/community/homer/{2.0.9 => 2.0.10}/migrations/migration_helpers/storage.py (100%) rename trains/community/homer/{2.0.9 => 2.0.10}/questions.yaml (100%) rename trains/community/homer/{2.0.9 => 2.0.10}/templates/docker-compose.yaml (100%) rename trains/community/homer/{2.0.9/templates/library/base_v1_1_3 => 2.0.10/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/homer/{2.0.9/templates/library/base_v1_1_3 => 2.0.10/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/community/homer/2.0.10/templates/library/base_v1_1_4/healthchecks.py rename trains/community/homer/{2.0.9/templates/library/base_v1_1_3 => 2.0.10/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/homer/{2.0.9/templates/library/base_v1_1_3 => 2.0.10/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/homer/{2.0.9/templates/library/base_v1_1_3 => 2.0.10/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/community/homer/2.0.10/templates/library/base_v1_1_4/permissions.py rename trains/community/homer/{2.0.9/templates/library/base_v1_1_3 => 2.0.10/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/homer/{2.0.9/templates/library/base_v1_1_3 => 2.0.10/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/homer/{2.0.9/templates/library/base_v1_1_3 => 2.0.10/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/homer/{2.0.9/templates/library/base_v1_1_3 => 2.0.10/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/homer/{2.0.9/templates/library/base_v1_1_3 => 2.0.10/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/homer/{2.0.9/templates/library/base_v1_1_3 => 2.0.10/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/homer/{2.0.9/templates/library/base_v1_1_3 => 2.0.10/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/homer/{2.0.9 => 2.0.10}/templates/test_values/basic-values.yaml (100%) rename trains/community/homer/{2.0.9 => 2.0.10}/templates/test_values/no-assets-values.yaml (100%) delete mode 100644 trains/community/homer/2.0.9/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/community/homer/2.0.9/templates/library/base_v1_1_3/permissions.py delete mode 100644 trains/community/immich/1.6.18/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/community/immich/1.6.18/templates/library/base_v1_1_3/permissions.py rename trains/community/immich/{1.6.18 => 1.6.19}/README.md (100%) rename trains/community/immich/{1.6.18 => 1.6.19}/app.yaml (90%) rename trains/community/immich/{1.6.18 => 1.6.19}/ix_values.yaml (100%) rename trains/community/immich/{1.6.18 => 1.6.19}/migrations/migrate_from_kubernetes (100%) rename trains/community/immich/{1.6.18 => 1.6.19}/migrations/migration_helpers/__init__.py (100%) rename trains/community/immich/{1.6.18 => 1.6.19}/migrations/migration_helpers/cpu.py (100%) rename trains/community/immich/{1.6.18 => 1.6.19}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/immich/{1.6.18 => 1.6.19}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/immich/{1.6.18 => 1.6.19}/migrations/migration_helpers/memory.py (100%) rename trains/community/immich/{1.6.18 => 1.6.19}/migrations/migration_helpers/resources.py (100%) rename trains/community/immich/{1.6.18 => 1.6.19}/migrations/migration_helpers/storage.py (100%) rename trains/community/immich/{1.6.18 => 1.6.19}/questions.yaml (100%) rename trains/community/immich/{1.6.18 => 1.6.19}/templates/docker-compose.yaml (98%) rename trains/community/immich/{1.6.18/templates/library/base_v1_1_3 => 1.6.19/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/immich/{1.6.18/templates/library/base_v1_1_3 => 1.6.19/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/community/immich/1.6.19/templates/library/base_v1_1_4/healthchecks.py rename trains/community/immich/{1.6.18/templates/library/base_v1_1_3 => 1.6.19/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/immich/{1.6.18/templates/library/base_v1_1_3 => 1.6.19/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/immich/{1.6.18/templates/library/base_v1_1_3 => 1.6.19/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/community/immich/1.6.19/templates/library/base_v1_1_4/permissions.py rename trains/community/immich/{1.6.18/templates/library/base_v1_1_3 => 1.6.19/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/immich/{1.6.18/templates/library/base_v1_1_3 => 1.6.19/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/immich/{1.6.18/templates/library/base_v1_1_3 => 1.6.19/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/immich/{1.6.18/templates/library/base_v1_1_3 => 1.6.19/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/immich/{1.6.18/templates/library/base_v1_1_3 => 1.6.19/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/immich/{1.6.18/templates/library/base_v1_1_3 => 1.6.19/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/immich/{1.6.18/templates/library/base_v1_1_3 => 1.6.19/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/immich/{1.6.18 => 1.6.19}/templates/test_values/basic-values.yaml (100%) delete mode 100644 trains/community/invidious/1.0.10/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/community/invidious/1.0.10/templates/library/base_v1_1_3/permissions.py rename trains/community/invidious/{1.0.10 => 1.0.11}/README.md (100%) rename trains/community/invidious/{1.0.10 => 1.0.11}/app.yaml (90%) rename trains/community/invidious/{1.0.10 => 1.0.11}/ix_values.yaml (100%) rename trains/community/invidious/{1.0.10 => 1.0.11}/migrations/migrate_from_kubernetes (100%) rename trains/community/invidious/{1.0.10 => 1.0.11}/migrations/migration_helpers/__init__.py (100%) rename trains/community/invidious/{1.0.10 => 1.0.11}/migrations/migration_helpers/cpu.py (100%) rename trains/community/invidious/{1.0.10 => 1.0.11}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/invidious/{1.0.10 => 1.0.11}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/invidious/{1.0.10 => 1.0.11}/migrations/migration_helpers/memory.py (100%) rename trains/community/invidious/{1.0.10 => 1.0.11}/migrations/migration_helpers/resources.py (100%) rename trains/community/invidious/{1.0.10 => 1.0.11}/migrations/migration_helpers/storage.py (100%) rename trains/community/invidious/{1.0.10 => 1.0.11}/questions.yaml (100%) rename trains/community/invidious/{1.0.10 => 1.0.11}/templates/docker-compose.yaml (100%) rename trains/community/invidious/{1.0.10/templates/library/base_v1_1_3 => 1.0.11/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/invidious/{1.0.10/templates/library/base_v1_1_3 => 1.0.11/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/community/invidious/1.0.11/templates/library/base_v1_1_4/healthchecks.py rename trains/community/invidious/{1.0.10/templates/library/base_v1_1_3 => 1.0.11/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/invidious/{1.0.10/templates/library/base_v1_1_3 => 1.0.11/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/invidious/{1.0.10/templates/library/base_v1_1_3 => 1.0.11/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/community/invidious/1.0.11/templates/library/base_v1_1_4/permissions.py rename trains/community/invidious/{1.0.10/templates/library/base_v1_1_3 => 1.0.11/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/invidious/{1.0.10/templates/library/base_v1_1_3 => 1.0.11/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/invidious/{1.0.10/templates/library/base_v1_1_3 => 1.0.11/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/invidious/{1.0.10/templates/library/base_v1_1_3 => 1.0.11/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/invidious/{1.0.10/templates/library/base_v1_1_3 => 1.0.11/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/invidious/{1.0.10/templates/library/base_v1_1_3 => 1.0.11/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/invidious/{1.0.10/templates/library/base_v1_1_3 => 1.0.11/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/invidious/{1.0.10 => 1.0.11}/templates/macros/config.sh (100%) rename trains/community/invidious/{1.0.10 => 1.0.11}/templates/test_values/basic-values.yaml (100%) rename trains/community/invidious/{1.0.10 => 1.0.11}/templates/test_values/no-sig-values.yaml (100%) delete mode 100644 trains/community/ipfs/1.0.18/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/community/ipfs/1.0.18/templates/library/base_v1_1_3/permissions.py rename trains/community/ipfs/{1.0.18 => 1.0.19}/README.md (100%) rename trains/community/ipfs/{1.0.18 => 1.0.19}/app.yaml (86%) rename trains/community/ipfs/{1.0.18 => 1.0.19}/ix_values.yaml (100%) rename trains/community/ipfs/{1.0.18 => 1.0.19}/migrations/migrate_from_kubernetes (100%) rename trains/community/ipfs/{1.0.18 => 1.0.19}/migrations/migration_helpers/__init__.py (100%) rename trains/community/ipfs/{1.0.18 => 1.0.19}/migrations/migration_helpers/cpu.py (100%) rename trains/community/ipfs/{1.0.18 => 1.0.19}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/ipfs/{1.0.18 => 1.0.19}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/ipfs/{1.0.18 => 1.0.19}/migrations/migration_helpers/memory.py (100%) rename trains/community/ipfs/{1.0.18 => 1.0.19}/migrations/migration_helpers/resources.py (100%) rename trains/community/ipfs/{1.0.18 => 1.0.19}/migrations/migration_helpers/storage.py (100%) rename trains/community/ipfs/{1.0.18 => 1.0.19}/questions.yaml (100%) rename trains/community/ipfs/{1.0.18 => 1.0.19}/templates/docker-compose.yaml (100%) rename trains/community/ipfs/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/ipfs/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/community/ipfs/1.0.19/templates/library/base_v1_1_4/healthchecks.py rename trains/community/ipfs/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/ipfs/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/ipfs/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/community/ipfs/1.0.19/templates/library/base_v1_1_4/permissions.py rename trains/community/ipfs/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/ipfs/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/ipfs/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/ipfs/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/ipfs/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/ipfs/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/ipfs/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/ipfs/{1.0.18 => 1.0.19}/templates/test_values/basic-values.yaml (100%) delete mode 100644 trains/community/jellyfin/1.0.24/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/community/jellyfin/1.0.24/templates/library/base_v1_1_3/permissions.py rename trains/community/jellyfin/{1.0.24 => 1.0.25}/README.md (100%) rename trains/community/jellyfin/{1.0.24 => 1.0.25}/app.yaml (87%) rename trains/community/jellyfin/{1.0.24 => 1.0.25}/ix_values.yaml (100%) rename trains/community/jellyfin/{1.0.24 => 1.0.25}/migrations/migrate_from_kubernetes (100%) rename trains/community/jellyfin/{1.0.24 => 1.0.25}/migrations/migration_helpers/__init__.py (100%) rename trains/community/jellyfin/{1.0.24 => 1.0.25}/migrations/migration_helpers/cpu.py (100%) rename trains/community/jellyfin/{1.0.24 => 1.0.25}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/jellyfin/{1.0.24 => 1.0.25}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/jellyfin/{1.0.24 => 1.0.25}/migrations/migration_helpers/memory.py (100%) rename trains/community/jellyfin/{1.0.24 => 1.0.25}/migrations/migration_helpers/resources.py (100%) rename trains/community/jellyfin/{1.0.24 => 1.0.25}/migrations/migration_helpers/storage.py (100%) rename trains/community/jellyfin/{1.0.24 => 1.0.25}/questions.yaml (100%) rename trains/community/jellyfin/{1.0.24 => 1.0.25}/templates/docker-compose.yaml (100%) rename trains/community/jellyfin/{1.0.24/templates/library/base_v1_1_3 => 1.0.25/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/jellyfin/{1.0.24/templates/library/base_v1_1_3 => 1.0.25/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/community/jellyfin/1.0.25/templates/library/base_v1_1_4/healthchecks.py rename trains/community/jellyfin/{1.0.24/templates/library/base_v1_1_3 => 1.0.25/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/jellyfin/{1.0.24/templates/library/base_v1_1_3 => 1.0.25/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/jellyfin/{1.0.24/templates/library/base_v1_1_3 => 1.0.25/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/community/jellyfin/1.0.25/templates/library/base_v1_1_4/permissions.py rename trains/community/jellyfin/{1.0.24/templates/library/base_v1_1_3 => 1.0.25/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/jellyfin/{1.0.24/templates/library/base_v1_1_3 => 1.0.25/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/jellyfin/{1.0.24/templates/library/base_v1_1_3 => 1.0.25/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/jellyfin/{1.0.24/templates/library/base_v1_1_3 => 1.0.25/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/jellyfin/{1.0.24/templates/library/base_v1_1_3 => 1.0.25/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/jellyfin/{1.0.24/templates/library/base_v1_1_3 => 1.0.25/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/jellyfin/{1.0.24/templates/library/base_v1_1_3 => 1.0.25/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/jellyfin/{1.0.24 => 1.0.25}/templates/test_values/basic-values.yaml (100%) delete mode 100644 trains/community/jellyseerr/1.0.18/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/community/jellyseerr/1.0.18/templates/library/base_v1_1_3/permissions.py rename trains/community/jellyseerr/{1.0.18 => 1.0.19}/README.md (100%) rename trains/community/jellyseerr/{1.0.18 => 1.0.19}/app.yaml (87%) rename trains/community/jellyseerr/{1.0.18 => 1.0.19}/ix_values.yaml (100%) rename trains/community/jellyseerr/{1.0.18 => 1.0.19}/migrations/migrate_from_kubernetes (100%) rename trains/community/jellyseerr/{1.0.18 => 1.0.19}/migrations/migration_helpers/__init__.py (100%) rename trains/community/jellyseerr/{1.0.18 => 1.0.19}/migrations/migration_helpers/cpu.py (100%) rename trains/community/jellyseerr/{1.0.18 => 1.0.19}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/jellyseerr/{1.0.18 => 1.0.19}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/jellyseerr/{1.0.18 => 1.0.19}/migrations/migration_helpers/memory.py (100%) rename trains/community/jellyseerr/{1.0.18 => 1.0.19}/migrations/migration_helpers/resources.py (100%) rename trains/community/jellyseerr/{1.0.18 => 1.0.19}/migrations/migration_helpers/storage.py (100%) rename trains/community/jellyseerr/{1.0.18 => 1.0.19}/questions.yaml (100%) rename trains/community/jellyseerr/{1.0.18 => 1.0.19}/templates/docker-compose.yaml (100%) rename trains/community/jellyseerr/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/jellyseerr/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/community/jellyseerr/1.0.19/templates/library/base_v1_1_4/healthchecks.py rename trains/community/jellyseerr/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/jellyseerr/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/jellyseerr/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/community/jellyseerr/1.0.19/templates/library/base_v1_1_4/permissions.py rename trains/community/jellyseerr/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/jellyseerr/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/jellyseerr/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/jellyseerr/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/jellyseerr/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/jellyseerr/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/jellyseerr/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/jellyseerr/{1.0.18 => 1.0.19}/templates/test_values/basic-values.yaml (100%) delete mode 100644 trains/community/jenkins/1.0.12/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/community/jenkins/1.0.12/templates/library/base_v1_1_3/permissions.py rename trains/community/jenkins/{1.0.12 => 1.0.13}/README.md (100%) rename trains/community/jenkins/{1.0.12 => 1.0.13}/app.yaml (87%) rename trains/community/jenkins/{1.0.12 => 1.0.13}/ix_values.yaml (100%) rename trains/community/jenkins/{1.0.12 => 1.0.13}/migrations/migrate_from_kubernetes (100%) rename trains/community/jenkins/{1.0.12 => 1.0.13}/migrations/migration_helpers/__init__.py (100%) rename trains/community/jenkins/{1.0.12 => 1.0.13}/migrations/migration_helpers/cpu.py (100%) rename trains/community/jenkins/{1.0.12 => 1.0.13}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/jenkins/{1.0.12 => 1.0.13}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/jenkins/{1.0.12 => 1.0.13}/migrations/migration_helpers/memory.py (100%) rename trains/community/jenkins/{1.0.12 => 1.0.13}/migrations/migration_helpers/resources.py (100%) rename trains/community/jenkins/{1.0.12 => 1.0.13}/migrations/migration_helpers/storage.py (100%) rename trains/community/jenkins/{1.0.12 => 1.0.13}/questions.yaml (100%) rename trains/community/jenkins/{1.0.12 => 1.0.13}/templates/docker-compose.yaml (100%) rename trains/community/jenkins/{1.0.12/templates/library/base_v1_1_3 => 1.0.13/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/jenkins/{1.0.12/templates/library/base_v1_1_3 => 1.0.13/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/community/jenkins/1.0.13/templates/library/base_v1_1_4/healthchecks.py rename trains/community/jenkins/{1.0.12/templates/library/base_v1_1_3 => 1.0.13/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/jenkins/{1.0.12/templates/library/base_v1_1_3 => 1.0.13/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/jenkins/{1.0.12/templates/library/base_v1_1_3 => 1.0.13/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/community/jenkins/1.0.13/templates/library/base_v1_1_4/permissions.py rename trains/community/jenkins/{1.0.12/templates/library/base_v1_1_3 => 1.0.13/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/jenkins/{1.0.12/templates/library/base_v1_1_3 => 1.0.13/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/jenkins/{1.0.12/templates/library/base_v1_1_3 => 1.0.13/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/jenkins/{1.0.12/templates/library/base_v1_1_3 => 1.0.13/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/jenkins/{1.0.12/templates/library/base_v1_1_3 => 1.0.13/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/jenkins/{1.0.12/templates/library/base_v1_1_3 => 1.0.13/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/jenkins/{1.0.12/templates/library/base_v1_1_3 => 1.0.13/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/jenkins/{1.0.12 => 1.0.13}/templates/test_values/basic-values.yaml (100%) rename trains/community/jenkins/{1.0.12 => 1.0.13}/templates/test_values/https-values.yaml (100%) delete mode 100644 trains/community/joplin/1.1.10/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/community/joplin/1.1.10/templates/library/base_v1_1_3/permissions.py rename trains/community/joplin/{1.1.10 => 1.1.11}/README.md (100%) rename trains/community/joplin/{1.1.10 => 1.1.11}/app.yaml (89%) rename trains/community/joplin/{1.1.10 => 1.1.11}/ix_values.yaml (100%) rename trains/community/joplin/{1.1.10 => 1.1.11}/migrations/migrate_from_kubernetes (100%) rename trains/community/joplin/{1.1.10 => 1.1.11}/migrations/migration_helpers/__init__.py (100%) rename trains/community/joplin/{1.1.10 => 1.1.11}/migrations/migration_helpers/cpu.py (100%) rename trains/community/joplin/{1.1.10 => 1.1.11}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/joplin/{1.1.10 => 1.1.11}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/joplin/{1.1.10 => 1.1.11}/migrations/migration_helpers/memory.py (100%) rename trains/community/joplin/{1.1.10 => 1.1.11}/migrations/migration_helpers/resources.py (100%) rename trains/community/joplin/{1.1.10 => 1.1.11}/migrations/migration_helpers/storage.py (100%) rename trains/community/joplin/{1.1.10 => 1.1.11}/questions.yaml (100%) rename trains/community/joplin/{1.1.10 => 1.1.11}/templates/docker-compose.yaml (98%) rename trains/community/joplin/{1.1.10/templates/library/base_v1_1_3 => 1.1.11/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/joplin/{1.1.10/templates/library/base_v1_1_3 => 1.1.11/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/community/joplin/1.1.11/templates/library/base_v1_1_4/healthchecks.py rename trains/community/joplin/{1.1.10/templates/library/base_v1_1_3 => 1.1.11/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/joplin/{1.1.10/templates/library/base_v1_1_3 => 1.1.11/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/joplin/{1.1.10/templates/library/base_v1_1_3 => 1.1.11/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/community/joplin/1.1.11/templates/library/base_v1_1_4/permissions.py rename trains/community/joplin/{1.1.10/templates/library/base_v1_1_3 => 1.1.11/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/joplin/{1.1.10/templates/library/base_v1_1_3 => 1.1.11/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/joplin/{1.1.10/templates/library/base_v1_1_3 => 1.1.11/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/joplin/{1.1.10/templates/library/base_v1_1_3 => 1.1.11/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/joplin/{1.1.10/templates/library/base_v1_1_3 => 1.1.11/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/joplin/{1.1.10/templates/library/base_v1_1_3 => 1.1.11/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/joplin/{1.1.10/templates/library/base_v1_1_3 => 1.1.11/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/joplin/{1.1.10 => 1.1.11}/templates/test_values/basic-values.yaml (100%) delete mode 100644 trains/community/kapowarr/1.0.18/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/community/kapowarr/1.0.18/templates/library/base_v1_1_3/permissions.py rename trains/community/kapowarr/{1.0.18 => 1.0.19}/README.md (100%) rename trains/community/kapowarr/{1.0.18 => 1.0.19}/app.yaml (87%) rename trains/community/kapowarr/{1.0.18 => 1.0.19}/ix_values.yaml (100%) rename trains/community/kapowarr/{1.0.18 => 1.0.19}/migrations/migrate_from_kubernetes (100%) rename trains/community/kapowarr/{1.0.18 => 1.0.19}/migrations/migration_helpers/__init__.py (100%) rename trains/community/kapowarr/{1.0.18 => 1.0.19}/migrations/migration_helpers/cpu.py (100%) rename trains/community/kapowarr/{1.0.18 => 1.0.19}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/kapowarr/{1.0.18 => 1.0.19}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/kapowarr/{1.0.18 => 1.0.19}/migrations/migration_helpers/memory.py (100%) rename trains/community/kapowarr/{1.0.18 => 1.0.19}/migrations/migration_helpers/resources.py (100%) rename trains/community/kapowarr/{1.0.18 => 1.0.19}/migrations/migration_helpers/storage.py (100%) rename trains/community/kapowarr/{1.0.18 => 1.0.19}/questions.yaml (100%) rename trains/community/kapowarr/{1.0.18 => 1.0.19}/templates/docker-compose.yaml (100%) rename trains/community/kapowarr/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/kapowarr/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/community/kapowarr/1.0.19/templates/library/base_v1_1_4/healthchecks.py rename trains/community/kapowarr/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/kapowarr/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/kapowarr/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/community/kapowarr/1.0.19/templates/library/base_v1_1_4/permissions.py rename trains/community/kapowarr/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/kapowarr/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/kapowarr/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/kapowarr/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/kapowarr/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/kapowarr/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/kapowarr/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/kapowarr/{1.0.18 => 1.0.19}/templates/test_values/basic-values.yaml (100%) delete mode 100644 trains/community/kavita/1.0.18/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/community/kavita/1.0.18/templates/library/base_v1_1_3/permissions.py rename trains/community/kavita/{1.0.18 => 1.0.19}/README.md (100%) rename trains/community/kavita/{1.0.18 => 1.0.19}/app.yaml (92%) rename trains/community/kavita/{1.0.18 => 1.0.19}/ix_values.yaml (100%) rename trains/community/kavita/{1.0.18 => 1.0.19}/migrations/migrate_from_kubernetes (100%) rename trains/community/kavita/{1.0.18 => 1.0.19}/migrations/migration_helpers/__init__.py (100%) rename trains/community/kavita/{1.0.18 => 1.0.19}/migrations/migration_helpers/cpu.py (100%) rename trains/community/kavita/{1.0.18 => 1.0.19}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/kavita/{1.0.18 => 1.0.19}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/kavita/{1.0.18 => 1.0.19}/migrations/migration_helpers/memory.py (100%) rename trains/community/kavita/{1.0.18 => 1.0.19}/migrations/migration_helpers/resources.py (100%) rename trains/community/kavita/{1.0.18 => 1.0.19}/migrations/migration_helpers/storage.py (100%) rename trains/community/kavita/{1.0.18 => 1.0.19}/questions.yaml (100%) rename trains/community/kavita/{1.0.18 => 1.0.19}/templates/docker-compose.yaml (100%) rename trains/community/kavita/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/kavita/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/community/kavita/1.0.19/templates/library/base_v1_1_4/healthchecks.py rename trains/community/kavita/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/kavita/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/kavita/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/community/kavita/1.0.19/templates/library/base_v1_1_4/permissions.py rename trains/community/kavita/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/kavita/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/kavita/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/kavita/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/kavita/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/kavita/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/kavita/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/kavita/{1.0.18 => 1.0.19}/templates/test_values/basic-values.yaml (100%) delete mode 100644 trains/community/komga/1.1.13/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/community/komga/1.1.13/templates/library/base_v1_1_3/permissions.py rename trains/community/komga/{1.1.13 => 1.1.14}/README.md (100%) rename trains/community/komga/{1.1.13 => 1.1.14}/app.yaml (86%) rename trains/community/komga/{1.1.13 => 1.1.14}/ix_values.yaml (100%) rename trains/community/komga/{1.1.13 => 1.1.14}/migrations/migrate_from_kubernetes (100%) rename trains/community/komga/{1.1.13 => 1.1.14}/migrations/migration_helpers/__init__.py (100%) rename trains/community/komga/{1.1.13 => 1.1.14}/migrations/migration_helpers/cpu.py (100%) rename trains/community/komga/{1.1.13 => 1.1.14}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/komga/{1.1.13 => 1.1.14}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/komga/{1.1.13 => 1.1.14}/migrations/migration_helpers/memory.py (100%) rename trains/community/komga/{1.1.13 => 1.1.14}/migrations/migration_helpers/resources.py (100%) rename trains/community/komga/{1.1.13 => 1.1.14}/migrations/migration_helpers/storage.py (100%) rename trains/community/komga/{1.1.13 => 1.1.14}/questions.yaml (100%) rename trains/community/komga/{1.1.13 => 1.1.14}/templates/docker-compose.yaml (100%) rename trains/community/komga/{1.1.13/templates/library/base_v1_1_3 => 1.1.14/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/komga/{1.1.13/templates/library/base_v1_1_3 => 1.1.14/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/community/komga/1.1.14/templates/library/base_v1_1_4/healthchecks.py rename trains/community/komga/{1.1.13/templates/library/base_v1_1_3 => 1.1.14/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/komga/{1.1.13/templates/library/base_v1_1_3 => 1.1.14/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/komga/{1.1.13/templates/library/base_v1_1_3 => 1.1.14/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/community/komga/1.1.14/templates/library/base_v1_1_4/permissions.py rename trains/community/komga/{1.1.13/templates/library/base_v1_1_3 => 1.1.14/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/komga/{1.1.13/templates/library/base_v1_1_3 => 1.1.14/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/komga/{1.1.13/templates/library/base_v1_1_3 => 1.1.14/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/komga/{1.1.13/templates/library/base_v1_1_3 => 1.1.14/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/komga/{1.1.13/templates/library/base_v1_1_3 => 1.1.14/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/komga/{1.1.13/templates/library/base_v1_1_3 => 1.1.14/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/komga/{1.1.13/templates/library/base_v1_1_3 => 1.1.14/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/komga/{1.1.13 => 1.1.14}/templates/test_values/basic-values.yaml (100%) delete mode 100644 trains/community/lidarr/1.1.11/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/community/lidarr/1.1.11/templates/library/base_v1_1_3/permissions.py rename trains/community/lidarr/{1.1.11 => 1.1.12}/README.md (100%) rename trains/community/lidarr/{1.1.11 => 1.1.12}/app.yaml (88%) rename trains/community/lidarr/{1.1.11 => 1.1.12}/ix_values.yaml (100%) rename trains/community/lidarr/{1.1.11 => 1.1.12}/migrations/migrate_from_kubernetes (100%) rename trains/community/lidarr/{1.1.11 => 1.1.12}/migrations/migration_helpers/__init__.py (100%) rename trains/community/lidarr/{1.1.11 => 1.1.12}/migrations/migration_helpers/cpu.py (100%) rename trains/community/lidarr/{1.1.11 => 1.1.12}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/lidarr/{1.1.11 => 1.1.12}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/lidarr/{1.1.11 => 1.1.12}/migrations/migration_helpers/memory.py (100%) rename trains/community/lidarr/{1.1.11 => 1.1.12}/migrations/migration_helpers/resources.py (100%) rename trains/community/lidarr/{1.1.11 => 1.1.12}/migrations/migration_helpers/storage.py (100%) rename trains/community/lidarr/{1.1.11 => 1.1.12}/questions.yaml (100%) rename trains/community/lidarr/{1.1.11 => 1.1.12}/templates/docker-compose.yaml (100%) rename trains/community/lidarr/{1.1.11/templates/library/base_v1_1_3 => 1.1.12/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/lidarr/{1.1.11/templates/library/base_v1_1_3 => 1.1.12/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/community/lidarr/1.1.12/templates/library/base_v1_1_4/healthchecks.py rename trains/community/lidarr/{1.1.11/templates/library/base_v1_1_3 => 1.1.12/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/lidarr/{1.1.11/templates/library/base_v1_1_3 => 1.1.12/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/lidarr/{1.1.11/templates/library/base_v1_1_3 => 1.1.12/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/community/lidarr/1.1.12/templates/library/base_v1_1_4/permissions.py rename trains/community/lidarr/{1.1.11/templates/library/base_v1_1_3 => 1.1.12/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/lidarr/{1.1.11/templates/library/base_v1_1_3 => 1.1.12/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/lidarr/{1.1.11/templates/library/base_v1_1_3 => 1.1.12/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/lidarr/{1.1.11/templates/library/base_v1_1_3 => 1.1.12/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/lidarr/{1.1.11/templates/library/base_v1_1_3 => 1.1.12/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/lidarr/{1.1.11/templates/library/base_v1_1_3 => 1.1.12/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/lidarr/{1.1.11/templates/library/base_v1_1_3 => 1.1.12/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/lidarr/{1.1.11 => 1.1.12}/templates/test_values/basic-values.yaml (100%) delete mode 100644 trains/community/linkding/1.0.16/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/community/linkding/1.0.16/templates/library/base_v1_1_3/permissions.py rename trains/community/linkding/{1.0.16 => 1.0.17}/README.md (100%) rename trains/community/linkding/{1.0.16 => 1.0.17}/app.yaml (87%) rename trains/community/linkding/{1.0.16 => 1.0.17}/ix_values.yaml (100%) rename trains/community/linkding/{1.0.16 => 1.0.17}/migrations/migrate_from_kubernetes (100%) rename trains/community/linkding/{1.0.16 => 1.0.17}/migrations/migration_helpers/__init__.py (100%) rename trains/community/linkding/{1.0.16 => 1.0.17}/migrations/migration_helpers/cpu.py (100%) rename trains/community/linkding/{1.0.16 => 1.0.17}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/linkding/{1.0.16 => 1.0.17}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/linkding/{1.0.16 => 1.0.17}/migrations/migration_helpers/memory.py (100%) rename trains/community/linkding/{1.0.16 => 1.0.17}/migrations/migration_helpers/resources.py (100%) rename trains/community/linkding/{1.0.16 => 1.0.17}/migrations/migration_helpers/storage.py (100%) rename trains/community/linkding/{1.0.16 => 1.0.17}/questions.yaml (100%) rename trains/community/linkding/{1.0.16 => 1.0.17}/templates/docker-compose.yaml (100%) rename trains/community/linkding/{1.0.16/templates/library/base_v1_1_3 => 1.0.17/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/linkding/{1.0.16/templates/library/base_v1_1_3 => 1.0.17/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/community/linkding/1.0.17/templates/library/base_v1_1_4/healthchecks.py rename trains/community/linkding/{1.0.16/templates/library/base_v1_1_3 => 1.0.17/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/linkding/{1.0.16/templates/library/base_v1_1_3 => 1.0.17/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/linkding/{1.0.16/templates/library/base_v1_1_3 => 1.0.17/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/community/linkding/1.0.17/templates/library/base_v1_1_4/permissions.py rename trains/community/linkding/{1.0.16/templates/library/base_v1_1_3 => 1.0.17/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/linkding/{1.0.16/templates/library/base_v1_1_3 => 1.0.17/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/linkding/{1.0.16/templates/library/base_v1_1_3 => 1.0.17/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/linkding/{1.0.16/templates/library/base_v1_1_3 => 1.0.17/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/linkding/{1.0.16/templates/library/base_v1_1_3 => 1.0.17/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/linkding/{1.0.16/templates/library/base_v1_1_3 => 1.0.17/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/linkding/{1.0.16/templates/library/base_v1_1_3 => 1.0.17/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/linkding/{1.0.16 => 1.0.17}/templates/test_values/basic-values.yaml (100%) rename trains/community/linkding/{1.0.16 => 1.0.17}/templates/test_values/plus-values.yaml (100%) delete mode 100644 trains/community/listmonk/1.0.8/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/community/listmonk/1.0.8/templates/library/base_v1_1_3/permissions.py rename trains/community/listmonk/{1.0.8 => 1.0.9}/README.md (100%) rename trains/community/listmonk/{1.0.8 => 1.0.9}/app.yaml (89%) rename trains/community/listmonk/{1.0.8 => 1.0.9}/ix_values.yaml (100%) rename trains/community/listmonk/{1.0.8 => 1.0.9}/migrations/migrate_from_kubernetes (100%) rename trains/community/listmonk/{1.0.8 => 1.0.9}/migrations/migration_helpers/__init__.py (100%) rename trains/community/listmonk/{1.0.8 => 1.0.9}/migrations/migration_helpers/cpu.py (100%) rename trains/community/listmonk/{1.0.8 => 1.0.9}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/listmonk/{1.0.8 => 1.0.9}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/listmonk/{1.0.8 => 1.0.9}/migrations/migration_helpers/memory.py (100%) rename trains/community/listmonk/{1.0.8 => 1.0.9}/migrations/migration_helpers/resources.py (100%) rename trains/community/listmonk/{1.0.8 => 1.0.9}/migrations/migration_helpers/storage.py (100%) rename trains/community/listmonk/{1.0.8 => 1.0.9}/questions.yaml (100%) rename trains/community/listmonk/{1.0.8 => 1.0.9}/templates/docker-compose.yaml (100%) rename trains/community/listmonk/{1.0.8/templates/library/base_v1_1_3 => 1.0.9/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/listmonk/{1.0.8/templates/library/base_v1_1_3 => 1.0.9/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/community/listmonk/1.0.9/templates/library/base_v1_1_4/healthchecks.py rename trains/community/listmonk/{1.0.8/templates/library/base_v1_1_3 => 1.0.9/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/listmonk/{1.0.8/templates/library/base_v1_1_3 => 1.0.9/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/listmonk/{1.0.8/templates/library/base_v1_1_3 => 1.0.9/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/community/listmonk/1.0.9/templates/library/base_v1_1_4/permissions.py rename trains/community/listmonk/{1.0.8/templates/library/base_v1_1_3 => 1.0.9/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/listmonk/{1.0.8/templates/library/base_v1_1_3 => 1.0.9/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/listmonk/{1.0.8/templates/library/base_v1_1_3 => 1.0.9/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/listmonk/{1.0.8/templates/library/base_v1_1_3 => 1.0.9/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/listmonk/{1.0.8/templates/library/base_v1_1_3 => 1.0.9/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/listmonk/{1.0.8/templates/library/base_v1_1_3 => 1.0.9/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/listmonk/{1.0.8/templates/library/base_v1_1_3 => 1.0.9/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/listmonk/{1.0.8 => 1.0.9}/templates/test_values/basic-values.yaml (100%) delete mode 100644 trains/community/logseq/1.0.17/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/community/logseq/1.0.17/templates/library/base_v1_1_3/permissions.py rename trains/community/logseq/{1.0.17 => 1.0.18}/README.md (100%) rename trains/community/logseq/{1.0.17 => 1.0.18}/app.yaml (84%) rename trains/community/logseq/{1.0.17 => 1.0.18}/ix_values.yaml (100%) rename trains/community/logseq/{1.0.17 => 1.0.18}/migrations/migrate_from_kubernetes (100%) rename trains/community/logseq/{1.0.17 => 1.0.18}/migrations/migration_helpers/__init__.py (100%) rename trains/community/logseq/{1.0.17 => 1.0.18}/migrations/migration_helpers/cpu.py (100%) rename trains/community/logseq/{1.0.17 => 1.0.18}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/logseq/{1.0.17 => 1.0.18}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/logseq/{1.0.17 => 1.0.18}/migrations/migration_helpers/memory.py (100%) rename trains/community/logseq/{1.0.17 => 1.0.18}/migrations/migration_helpers/resources.py (100%) rename trains/community/logseq/{1.0.17 => 1.0.18}/migrations/migration_helpers/storage.py (100%) rename trains/community/logseq/{1.0.17 => 1.0.18}/questions.yaml (100%) rename trains/community/logseq/{1.0.17 => 1.0.18}/templates/docker-compose.yaml (100%) rename trains/community/logseq/{1.0.17/templates/library/base_v1_1_3 => 1.0.18/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/logseq/{1.0.17/templates/library/base_v1_1_3 => 1.0.18/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/community/logseq/1.0.18/templates/library/base_v1_1_4/healthchecks.py rename trains/community/logseq/{1.0.17/templates/library/base_v1_1_3 => 1.0.18/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/logseq/{1.0.17/templates/library/base_v1_1_3 => 1.0.18/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/logseq/{1.0.17/templates/library/base_v1_1_3 => 1.0.18/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/community/logseq/1.0.18/templates/library/base_v1_1_4/permissions.py rename trains/community/logseq/{1.0.17/templates/library/base_v1_1_3 => 1.0.18/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/logseq/{1.0.17/templates/library/base_v1_1_3 => 1.0.18/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/logseq/{1.0.17/templates/library/base_v1_1_3 => 1.0.18/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/logseq/{1.0.17/templates/library/base_v1_1_3 => 1.0.18/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/logseq/{1.0.17/templates/library/base_v1_1_3 => 1.0.18/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/logseq/{1.0.17/templates/library/base_v1_1_3 => 1.0.18/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/logseq/{1.0.17/templates/library/base_v1_1_3 => 1.0.18/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/logseq/{1.0.17 => 1.0.18}/templates/test_values/basic-values.yaml (100%) rename trains/community/logseq/{1.0.17 => 1.0.18}/templates/test_values/https-values.yaml (100%) rename trains/community/mealie/{1.2.9 => 1.2.10}/README.md (100%) rename trains/community/mealie/{1.2.9 => 1.2.10}/app.yaml (86%) rename trains/community/mealie/{1.2.9 => 1.2.10}/ix_values.yaml (100%) rename trains/community/mealie/{1.2.9 => 1.2.10}/migrations/migrate_from_kubernetes (100%) rename trains/community/mealie/{1.2.9 => 1.2.10}/migrations/migration_helpers/__init__.py (100%) rename trains/community/mealie/{1.2.9 => 1.2.10}/migrations/migration_helpers/cpu.py (100%) rename trains/community/mealie/{1.2.9 => 1.2.10}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/mealie/{1.2.9 => 1.2.10}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/mealie/{1.2.9 => 1.2.10}/migrations/migration_helpers/memory.py (100%) rename trains/community/mealie/{1.2.9 => 1.2.10}/migrations/migration_helpers/resources.py (100%) rename trains/community/mealie/{1.2.9 => 1.2.10}/migrations/migration_helpers/storage.py (100%) rename trains/community/mealie/{1.2.9 => 1.2.10}/questions.yaml (100%) rename trains/community/mealie/{1.2.9 => 1.2.10}/templates/docker-compose.yaml (100%) rename trains/community/mealie/{1.2.9/templates/library/base_v1_1_3 => 1.2.10/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/mealie/{1.2.9/templates/library/base_v1_1_3 => 1.2.10/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/community/mealie/1.2.10/templates/library/base_v1_1_4/healthchecks.py rename trains/community/mealie/{1.2.9/templates/library/base_v1_1_3 => 1.2.10/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/mealie/{1.2.9/templates/library/base_v1_1_3 => 1.2.10/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/mealie/{1.2.9/templates/library/base_v1_1_3 => 1.2.10/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/community/mealie/1.2.10/templates/library/base_v1_1_4/permissions.py rename trains/community/mealie/{1.2.9/templates/library/base_v1_1_3 => 1.2.10/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/mealie/{1.2.9/templates/library/base_v1_1_3 => 1.2.10/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/mealie/{1.2.9/templates/library/base_v1_1_3 => 1.2.10/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/mealie/{1.2.9/templates/library/base_v1_1_3 => 1.2.10/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/mealie/{1.2.9/templates/library/base_v1_1_3 => 1.2.10/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/mealie/{1.2.9/templates/library/base_v1_1_3 => 1.2.10/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/mealie/{1.2.9/templates/library/base_v1_1_3 => 1.2.10/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/mealie/{1.2.9 => 1.2.10}/templates/test_values/basic-values.yaml (100%) delete mode 100644 trains/community/mealie/1.2.9/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/community/mealie/1.2.9/templates/library/base_v1_1_3/permissions.py delete mode 100644 trains/community/metube/1.1.16/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/community/metube/1.1.16/templates/library/base_v1_1_3/permissions.py rename trains/community/metube/{1.1.16 => 1.1.17}/README.md (100%) rename trains/community/metube/{1.1.16 => 1.1.17}/app.yaml (86%) rename trains/community/metube/{1.1.16 => 1.1.17}/ix_values.yaml (100%) rename trains/community/metube/{1.1.16 => 1.1.17}/migrations/migrate_from_kubernetes (100%) rename trains/community/metube/{1.1.16 => 1.1.17}/migrations/migration_helpers/__init__.py (100%) rename trains/community/metube/{1.1.16 => 1.1.17}/migrations/migration_helpers/cpu.py (100%) rename trains/community/metube/{1.1.16 => 1.1.17}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/metube/{1.1.16 => 1.1.17}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/metube/{1.1.16 => 1.1.17}/migrations/migration_helpers/memory.py (100%) rename trains/community/metube/{1.1.16 => 1.1.17}/migrations/migration_helpers/resources.py (100%) rename trains/community/metube/{1.1.16 => 1.1.17}/migrations/migration_helpers/storage.py (100%) rename trains/community/metube/{1.1.16 => 1.1.17}/questions.yaml (100%) rename trains/community/metube/{1.1.16 => 1.1.17}/templates/docker-compose.yaml (100%) rename trains/community/metube/{1.1.16/templates/library/base_v1_1_3 => 1.1.17/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/metube/{1.1.16/templates/library/base_v1_1_3 => 1.1.17/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/community/metube/1.1.17/templates/library/base_v1_1_4/healthchecks.py rename trains/community/metube/{1.1.16/templates/library/base_v1_1_3 => 1.1.17/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/metube/{1.1.16/templates/library/base_v1_1_3 => 1.1.17/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/metube/{1.1.16/templates/library/base_v1_1_3 => 1.1.17/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/community/metube/1.1.17/templates/library/base_v1_1_4/permissions.py rename trains/community/metube/{1.1.16/templates/library/base_v1_1_3 => 1.1.17/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/metube/{1.1.16/templates/library/base_v1_1_3 => 1.1.17/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/metube/{1.1.16/templates/library/base_v1_1_3 => 1.1.17/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/metube/{1.1.16/templates/library/base_v1_1_3 => 1.1.17/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/metube/{1.1.16/templates/library/base_v1_1_3 => 1.1.17/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/metube/{1.1.16/templates/library/base_v1_1_3 => 1.1.17/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/metube/{1.1.16/templates/library/base_v1_1_3 => 1.1.17/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/metube/{1.1.16 => 1.1.17}/templates/test_values/basic-values.yaml (100%) delete mode 100644 trains/community/minecraft/1.11.17/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/community/minecraft/1.11.17/templates/library/base_v1_1_3/permissions.py rename trains/community/minecraft/{1.11.17 => 1.11.18}/README.md (100%) rename trains/community/minecraft/{1.11.17 => 1.11.18}/app.yaml (89%) rename trains/community/minecraft/{1.11.17 => 1.11.18}/ix_values.yaml (100%) rename trains/community/minecraft/{1.11.17 => 1.11.18}/migrations/migrate_from_kubernetes (100%) rename trains/community/minecraft/{1.11.17 => 1.11.18}/migrations/migration_helpers/__init__.py (100%) rename trains/community/minecraft/{1.11.17 => 1.11.18}/migrations/migration_helpers/cpu.py (100%) rename trains/community/minecraft/{1.11.17 => 1.11.18}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/minecraft/{1.11.17 => 1.11.18}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/minecraft/{1.11.17 => 1.11.18}/migrations/migration_helpers/memory.py (100%) rename trains/community/minecraft/{1.11.17 => 1.11.18}/migrations/migration_helpers/resources.py (100%) rename trains/community/minecraft/{1.11.17 => 1.11.18}/migrations/migration_helpers/storage.py (100%) rename trains/community/minecraft/{1.11.17 => 1.11.18}/questions.yaml (100%) rename trains/community/minecraft/{1.11.17 => 1.11.18}/templates/docker-compose.yaml (100%) rename trains/community/minecraft/{1.11.17/templates/library/base_v1_1_3 => 1.11.18/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/minecraft/{1.11.17/templates/library/base_v1_1_3 => 1.11.18/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/community/minecraft/1.11.18/templates/library/base_v1_1_4/healthchecks.py rename trains/community/minecraft/{1.11.17/templates/library/base_v1_1_3 => 1.11.18/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/minecraft/{1.11.17/templates/library/base_v1_1_3 => 1.11.18/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/minecraft/{1.11.17/templates/library/base_v1_1_3 => 1.11.18/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/community/minecraft/1.11.18/templates/library/base_v1_1_4/permissions.py rename trains/community/minecraft/{1.11.17/templates/library/base_v1_1_3 => 1.11.18/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/minecraft/{1.11.17/templates/library/base_v1_1_3 => 1.11.18/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/minecraft/{1.11.17/templates/library/base_v1_1_3 => 1.11.18/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/minecraft/{1.11.17/templates/library/base_v1_1_3 => 1.11.18/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/minecraft/{1.11.17/templates/library/base_v1_1_3 => 1.11.18/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/minecraft/{1.11.17/templates/library/base_v1_1_3 => 1.11.18/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/minecraft/{1.11.17/templates/library/base_v1_1_3 => 1.11.18/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/minecraft/{1.11.17 => 1.11.18}/templates/test_values/java11-j9-vanilla-values.yaml (100%) rename trains/community/minecraft/{1.11.17 => 1.11.18}/templates/test_values/java11-jdk-vanilla-values.yaml (100%) rename trains/community/minecraft/{1.11.17 => 1.11.18}/templates/test_values/java11-vanilla-values.yaml (100%) rename trains/community/minecraft/{1.11.17 => 1.11.18}/templates/test_values/java17-alpine-vanilla-values.yaml (100%) rename trains/community/minecraft/{1.11.17 => 1.11.18}/templates/test_values/java17-gce-vanilla-values.yaml (100%) rename trains/community/minecraft/{1.11.17 => 1.11.18}/templates/test_values/java17-j9-vanilla-values.yaml (100%) rename trains/community/minecraft/{1.11.17 => 1.11.18}/templates/test_values/java17-jdk-vanilla-values.yaml (100%) rename trains/community/minecraft/{1.11.17 => 1.11.18}/templates/test_values/java17-vanilla-values.yaml (100%) rename trains/community/minecraft/{1.11.17 => 1.11.18}/templates/test_values/java19-vanilla-values.yaml (100%) rename trains/community/minecraft/{1.11.17 => 1.11.18}/templates/test_values/java21-alpine-vanila-values.yaml (100%) rename trains/community/minecraft/{1.11.17 => 1.11.18}/templates/test_values/java21-graalvm-vanila-values.yaml (100%) rename trains/community/minecraft/{1.11.17 => 1.11.18}/templates/test_values/java21-vanila-values.yaml (100%) rename trains/community/minecraft/{1.11.17 => 1.11.18}/templates/test_values/java8-gce-vanilla-values.yaml (100%) rename trains/community/minecraft/{1.11.17 => 1.11.18}/templates/test_values/java8-j9-vanilla-values.yaml (100%) rename trains/community/minecraft/{1.11.17 => 1.11.18}/templates/test_values/java8-jdk-vanilla-values.yaml (100%) rename trains/community/minecraft/{1.11.17 => 1.11.18}/templates/test_values/java8-vanilla-values.yaml (100%) delete mode 100644 trains/community/mineos/1.0.17/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/community/mineos/1.0.17/templates/library/base_v1_1_3/permissions.py rename trains/community/mineos/{1.0.17 => 1.0.18}/README.md (100%) rename trains/community/mineos/{1.0.17 => 1.0.18}/app.yaml (91%) rename trains/community/mineos/{1.0.17 => 1.0.18}/ix_values.yaml (100%) rename trains/community/mineos/{1.0.17 => 1.0.18}/migrations/migrate_from_kubernetes (100%) rename trains/community/mineos/{1.0.17 => 1.0.18}/migrations/migration_helpers/__init__.py (100%) rename trains/community/mineos/{1.0.17 => 1.0.18}/migrations/migration_helpers/cpu.py (100%) rename trains/community/mineos/{1.0.17 => 1.0.18}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/mineos/{1.0.17 => 1.0.18}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/mineos/{1.0.17 => 1.0.18}/migrations/migration_helpers/memory.py (100%) rename trains/community/mineos/{1.0.17 => 1.0.18}/migrations/migration_helpers/resources.py (100%) rename trains/community/mineos/{1.0.17 => 1.0.18}/migrations/migration_helpers/storage.py (100%) rename trains/community/mineos/{1.0.17 => 1.0.18}/questions.yaml (100%) rename trains/community/mineos/{1.0.17 => 1.0.18}/templates/docker-compose.yaml (100%) rename trains/community/mineos/{1.0.17/templates/library/base_v1_1_3 => 1.0.18/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/mineos/{1.0.17/templates/library/base_v1_1_3 => 1.0.18/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/community/mineos/1.0.18/templates/library/base_v1_1_4/healthchecks.py rename trains/community/mineos/{1.0.17/templates/library/base_v1_1_3 => 1.0.18/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/mineos/{1.0.17/templates/library/base_v1_1_3 => 1.0.18/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/mineos/{1.0.17/templates/library/base_v1_1_3 => 1.0.18/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/community/mineos/1.0.18/templates/library/base_v1_1_4/permissions.py rename trains/community/mineos/{1.0.17/templates/library/base_v1_1_3 => 1.0.18/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/mineos/{1.0.17/templates/library/base_v1_1_3 => 1.0.18/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/mineos/{1.0.17/templates/library/base_v1_1_3 => 1.0.18/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/mineos/{1.0.17/templates/library/base_v1_1_3 => 1.0.18/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/mineos/{1.0.17/templates/library/base_v1_1_3 => 1.0.18/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/mineos/{1.0.17/templates/library/base_v1_1_3 => 1.0.18/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/mineos/{1.0.17/templates/library/base_v1_1_3 => 1.0.18/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/mineos/{1.0.17 => 1.0.18}/templates/test_values/basic-values.yaml (100%) rename trains/community/mineos/{1.0.17 => 1.0.18}/templates/test_values/https-values.yaml (100%) rename trains/community/mumble/{1.1.9 => 1.1.10}/README.md (100%) rename trains/community/mumble/{1.1.9 => 1.1.10}/app.yaml (84%) rename trains/community/mumble/{1.1.9 => 1.1.10}/ix_values.yaml (100%) rename trains/community/mumble/{1.1.9 => 1.1.10}/migrations/migrate_from_kubernetes (100%) rename trains/community/mumble/{1.1.9 => 1.1.10}/migrations/migration_helpers/__init__.py (100%) rename trains/community/mumble/{1.1.9 => 1.1.10}/migrations/migration_helpers/cpu.py (100%) rename trains/community/mumble/{1.1.9 => 1.1.10}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/mumble/{1.1.9 => 1.1.10}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/mumble/{1.1.9 => 1.1.10}/migrations/migration_helpers/memory.py (100%) rename trains/community/mumble/{1.1.9 => 1.1.10}/migrations/migration_helpers/resources.py (100%) rename trains/community/mumble/{1.1.9 => 1.1.10}/migrations/migration_helpers/storage.py (100%) rename trains/community/mumble/{1.1.9 => 1.1.10}/questions.yaml (100%) rename trains/community/mumble/{1.1.9 => 1.1.10}/templates/docker-compose.yaml (100%) rename trains/community/mumble/{1.1.9/templates/library/base_v1_1_3 => 1.1.10/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/mumble/{1.1.9/templates/library/base_v1_1_3 => 1.1.10/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/community/mumble/1.1.10/templates/library/base_v1_1_4/healthchecks.py rename trains/community/mumble/{1.1.9/templates/library/base_v1_1_3 => 1.1.10/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/mumble/{1.1.9/templates/library/base_v1_1_3 => 1.1.10/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/mumble/{1.1.9/templates/library/base_v1_1_3 => 1.1.10/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/community/mumble/1.1.10/templates/library/base_v1_1_4/permissions.py rename trains/community/mumble/{1.1.9/templates/library/base_v1_1_3 => 1.1.10/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/mumble/{1.1.9/templates/library/base_v1_1_3 => 1.1.10/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/mumble/{1.1.9/templates/library/base_v1_1_3 => 1.1.10/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/mumble/{1.1.9/templates/library/base_v1_1_3 => 1.1.10/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/mumble/{1.1.9/templates/library/base_v1_1_3 => 1.1.10/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/mumble/{1.1.9/templates/library/base_v1_1_3 => 1.1.10/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/mumble/{1.1.9/templates/library/base_v1_1_3 => 1.1.10/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/mumble/{1.1.9 => 1.1.10}/templates/test_values/basic-values.yaml (100%) rename trains/community/mumble/{1.1.9 => 1.1.10}/templates/test_values/https-values.yaml (100%) delete mode 100644 trains/community/mumble/1.1.9/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/community/mumble/1.1.9/templates/library/base_v1_1_3/permissions.py delete mode 100644 trains/community/n8n/1.3.22/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/community/n8n/1.3.22/templates/library/base_v1_1_3/permissions.py rename trains/community/n8n/{1.3.22 => 1.3.23}/README.md (100%) rename trains/community/n8n/{1.3.22 => 1.3.23}/app.yaml (90%) rename trains/community/n8n/{1.3.22 => 1.3.23}/ix_values.yaml (100%) rename trains/community/n8n/{1.3.22 => 1.3.23}/migrations/migrate_from_kubernetes (100%) rename trains/community/n8n/{1.3.22 => 1.3.23}/migrations/migration_helpers/__init__.py (100%) rename trains/community/n8n/{1.3.22 => 1.3.23}/migrations/migration_helpers/cpu.py (100%) rename trains/community/n8n/{1.3.22 => 1.3.23}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/n8n/{1.3.22 => 1.3.23}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/n8n/{1.3.22 => 1.3.23}/migrations/migration_helpers/memory.py (100%) rename trains/community/n8n/{1.3.22 => 1.3.23}/migrations/migration_helpers/resources.py (100%) rename trains/community/n8n/{1.3.22 => 1.3.23}/migrations/migration_helpers/storage.py (100%) rename trains/community/n8n/{1.3.22 => 1.3.23}/questions.yaml (100%) rename trains/community/n8n/{1.3.22 => 1.3.23}/templates/docker-compose.yaml (100%) rename trains/community/n8n/{1.3.22/templates/library/base_v1_1_3 => 1.3.23/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/n8n/{1.3.22/templates/library/base_v1_1_3 => 1.3.23/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/community/n8n/1.3.23/templates/library/base_v1_1_4/healthchecks.py rename trains/community/n8n/{1.3.22/templates/library/base_v1_1_3 => 1.3.23/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/n8n/{1.3.22/templates/library/base_v1_1_3 => 1.3.23/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/n8n/{1.3.22/templates/library/base_v1_1_3 => 1.3.23/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/community/n8n/1.3.23/templates/library/base_v1_1_4/permissions.py rename trains/community/n8n/{1.3.22/templates/library/base_v1_1_3 => 1.3.23/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/n8n/{1.3.22/templates/library/base_v1_1_3 => 1.3.23/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/n8n/{1.3.22/templates/library/base_v1_1_3 => 1.3.23/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/n8n/{1.3.22/templates/library/base_v1_1_3 => 1.3.23/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/n8n/{1.3.22/templates/library/base_v1_1_3 => 1.3.23/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/n8n/{1.3.22/templates/library/base_v1_1_3 => 1.3.23/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/n8n/{1.3.22/templates/library/base_v1_1_3 => 1.3.23/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/n8n/{1.3.22 => 1.3.23}/templates/test_values/basic-values.yaml (100%) rename trains/community/n8n/{1.3.22 => 1.3.23}/templates/test_values/https-values.yaml (100%) delete mode 100644 trains/community/navidrome/1.0.23/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/community/navidrome/1.0.23/templates/library/base_v1_1_3/permissions.py rename trains/community/navidrome/{1.0.23 => 1.0.24}/README.md (100%) rename trains/community/navidrome/{1.0.23 => 1.0.24}/app.yaml (87%) rename trains/community/navidrome/{1.0.23 => 1.0.24}/ix_values.yaml (100%) rename trains/community/navidrome/{1.0.23 => 1.0.24}/migrations/migrate_from_kubernetes (100%) rename trains/community/navidrome/{1.0.23 => 1.0.24}/migrations/migration_helpers/__init__.py (100%) rename trains/community/navidrome/{1.0.23 => 1.0.24}/migrations/migration_helpers/cpu.py (100%) rename trains/community/navidrome/{1.0.23 => 1.0.24}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/navidrome/{1.0.23 => 1.0.24}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/navidrome/{1.0.23 => 1.0.24}/migrations/migration_helpers/memory.py (100%) rename trains/community/navidrome/{1.0.23 => 1.0.24}/migrations/migration_helpers/resources.py (100%) rename trains/community/navidrome/{1.0.23 => 1.0.24}/migrations/migration_helpers/storage.py (100%) rename trains/community/navidrome/{1.0.23 => 1.0.24}/questions.yaml (100%) rename trains/community/navidrome/{1.0.23 => 1.0.24}/templates/docker-compose.yaml (100%) rename trains/community/navidrome/{1.0.23/templates/library/base_v1_1_3 => 1.0.24/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/navidrome/{1.0.23/templates/library/base_v1_1_3 => 1.0.24/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/community/navidrome/1.0.24/templates/library/base_v1_1_4/healthchecks.py rename trains/community/navidrome/{1.0.23/templates/library/base_v1_1_3 => 1.0.24/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/navidrome/{1.0.23/templates/library/base_v1_1_3 => 1.0.24/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/navidrome/{1.0.23/templates/library/base_v1_1_3 => 1.0.24/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/community/navidrome/1.0.24/templates/library/base_v1_1_4/permissions.py rename trains/community/navidrome/{1.0.23/templates/library/base_v1_1_3 => 1.0.24/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/navidrome/{1.0.23/templates/library/base_v1_1_3 => 1.0.24/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/navidrome/{1.0.23/templates/library/base_v1_1_3 => 1.0.24/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/navidrome/{1.0.23/templates/library/base_v1_1_3 => 1.0.24/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/navidrome/{1.0.23/templates/library/base_v1_1_3 => 1.0.24/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/navidrome/{1.0.23/templates/library/base_v1_1_3 => 1.0.24/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/navidrome/{1.0.23/templates/library/base_v1_1_3 => 1.0.24/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/navidrome/{1.0.23 => 1.0.24}/templates/test_values/basic-values.yaml (100%) delete mode 100644 trains/community/netbootxyz/1.0.18/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/community/netbootxyz/1.0.18/templates/library/base_v1_1_3/permissions.py rename trains/community/netbootxyz/{1.0.18 => 1.0.19}/README.md (100%) rename trains/community/netbootxyz/{1.0.18 => 1.0.19}/app.yaml (92%) rename trains/community/netbootxyz/{1.0.18 => 1.0.19}/ix_values.yaml (100%) rename trains/community/netbootxyz/{1.0.18 => 1.0.19}/migrations/migrate_from_kubernetes (100%) rename trains/community/netbootxyz/{1.0.18 => 1.0.19}/migrations/migration_helpers/__init__.py (100%) rename trains/community/netbootxyz/{1.0.18 => 1.0.19}/migrations/migration_helpers/cpu.py (100%) rename trains/community/netbootxyz/{1.0.18 => 1.0.19}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/netbootxyz/{1.0.18 => 1.0.19}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/netbootxyz/{1.0.18 => 1.0.19}/migrations/migration_helpers/memory.py (100%) rename trains/community/netbootxyz/{1.0.18 => 1.0.19}/migrations/migration_helpers/resources.py (100%) rename trains/community/netbootxyz/{1.0.18 => 1.0.19}/migrations/migration_helpers/storage.py (100%) rename trains/community/netbootxyz/{1.0.18 => 1.0.19}/questions.yaml (100%) rename trains/community/netbootxyz/{1.0.18 => 1.0.19}/templates/docker-compose.yaml (100%) rename trains/community/netbootxyz/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/netbootxyz/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/community/netbootxyz/1.0.19/templates/library/base_v1_1_4/healthchecks.py rename trains/community/netbootxyz/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/netbootxyz/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/netbootxyz/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/community/netbootxyz/1.0.19/templates/library/base_v1_1_4/permissions.py rename trains/community/netbootxyz/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/netbootxyz/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/netbootxyz/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/netbootxyz/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/netbootxyz/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/netbootxyz/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/netbootxyz/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/netbootxyz/{1.0.18 => 1.0.19}/templates/test_values/basic-values.yaml (100%) delete mode 100644 trains/community/nginx-proxy-manager/1.0.19/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/community/nginx-proxy-manager/1.0.19/templates/library/base_v1_1_3/permissions.py rename trains/community/nginx-proxy-manager/{1.0.19 => 1.0.20}/README.md (100%) rename trains/community/nginx-proxy-manager/{1.0.19 => 1.0.20}/app.yaml (92%) rename trains/community/nginx-proxy-manager/{1.0.19 => 1.0.20}/ix_values.yaml (100%) rename trains/community/nginx-proxy-manager/{1.0.19 => 1.0.20}/migrations/migrate_from_kubernetes (100%) rename trains/community/nginx-proxy-manager/{1.0.19 => 1.0.20}/migrations/migration_helpers/__init__.py (100%) rename trains/community/nginx-proxy-manager/{1.0.19 => 1.0.20}/migrations/migration_helpers/cpu.py (100%) rename trains/community/nginx-proxy-manager/{1.0.19 => 1.0.20}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/nginx-proxy-manager/{1.0.19 => 1.0.20}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/nginx-proxy-manager/{1.0.19 => 1.0.20}/migrations/migration_helpers/memory.py (100%) rename trains/community/nginx-proxy-manager/{1.0.19 => 1.0.20}/migrations/migration_helpers/resources.py (100%) rename trains/community/nginx-proxy-manager/{1.0.19 => 1.0.20}/migrations/migration_helpers/storage.py (100%) rename trains/community/nginx-proxy-manager/{1.0.19 => 1.0.20}/questions.yaml (100%) rename trains/community/nginx-proxy-manager/{1.0.19 => 1.0.20}/templates/docker-compose.yaml (100%) rename trains/community/nginx-proxy-manager/{1.0.19/templates/library/base_v1_1_3 => 1.0.20/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/nginx-proxy-manager/{1.0.19/templates/library/base_v1_1_3 => 1.0.20/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/community/nginx-proxy-manager/1.0.20/templates/library/base_v1_1_4/healthchecks.py rename trains/community/nginx-proxy-manager/{1.0.19/templates/library/base_v1_1_3 => 1.0.20/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/nginx-proxy-manager/{1.0.19/templates/library/base_v1_1_3 => 1.0.20/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/nginx-proxy-manager/{1.0.19/templates/library/base_v1_1_3 => 1.0.20/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/community/nginx-proxy-manager/1.0.20/templates/library/base_v1_1_4/permissions.py rename trains/community/nginx-proxy-manager/{1.0.19/templates/library/base_v1_1_3 => 1.0.20/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/nginx-proxy-manager/{1.0.19/templates/library/base_v1_1_3 => 1.0.20/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/nginx-proxy-manager/{1.0.19/templates/library/base_v1_1_3 => 1.0.20/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/nginx-proxy-manager/{1.0.19/templates/library/base_v1_1_3 => 1.0.20/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/nginx-proxy-manager/{1.0.19/templates/library/base_v1_1_3 => 1.0.20/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/nginx-proxy-manager/{1.0.19/templates/library/base_v1_1_3 => 1.0.20/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/nginx-proxy-manager/{1.0.19/templates/library/base_v1_1_3 => 1.0.20/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/nginx-proxy-manager/{1.0.19 => 1.0.20}/templates/test_values/basic-values.yaml (100%) delete mode 100644 trains/community/node-red/1.0.32/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/community/node-red/1.0.32/templates/library/base_v1_1_3/permissions.py rename trains/community/node-red/{1.0.32 => 1.0.33}/README.md (100%) rename trains/community/node-red/{1.0.32 => 1.0.33}/app.yaml (86%) rename trains/community/node-red/{1.0.32 => 1.0.33}/ix_values.yaml (100%) rename trains/community/node-red/{1.0.32 => 1.0.33}/migrations/migrate_from_kubernetes (100%) rename trains/community/node-red/{1.0.32 => 1.0.33}/migrations/migration_helpers/__init__.py (100%) rename trains/community/node-red/{1.0.32 => 1.0.33}/migrations/migration_helpers/cpu.py (100%) rename trains/community/node-red/{1.0.32 => 1.0.33}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/node-red/{1.0.32 => 1.0.33}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/node-red/{1.0.32 => 1.0.33}/migrations/migration_helpers/memory.py (100%) rename trains/community/node-red/{1.0.32 => 1.0.33}/migrations/migration_helpers/resources.py (100%) rename trains/community/node-red/{1.0.32 => 1.0.33}/migrations/migration_helpers/storage.py (100%) rename trains/community/node-red/{1.0.32 => 1.0.33}/questions.yaml (100%) rename trains/community/node-red/{1.0.32 => 1.0.33}/templates/docker-compose.yaml (100%) rename trains/community/node-red/{1.0.32/templates/library/base_v1_1_3 => 1.0.33/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/node-red/{1.0.32/templates/library/base_v1_1_3 => 1.0.33/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/community/node-red/1.0.33/templates/library/base_v1_1_4/healthchecks.py rename trains/community/node-red/{1.0.32/templates/library/base_v1_1_3 => 1.0.33/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/node-red/{1.0.32/templates/library/base_v1_1_3 => 1.0.33/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/node-red/{1.0.32/templates/library/base_v1_1_3 => 1.0.33/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/community/node-red/1.0.33/templates/library/base_v1_1_4/permissions.py rename trains/community/node-red/{1.0.32/templates/library/base_v1_1_3 => 1.0.33/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/node-red/{1.0.32/templates/library/base_v1_1_3 => 1.0.33/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/node-red/{1.0.32/templates/library/base_v1_1_3 => 1.0.33/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/node-red/{1.0.32/templates/library/base_v1_1_3 => 1.0.33/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/node-red/{1.0.32/templates/library/base_v1_1_3 => 1.0.33/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/node-red/{1.0.32/templates/library/base_v1_1_3 => 1.0.33/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/node-red/{1.0.32/templates/library/base_v1_1_3 => 1.0.33/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/node-red/{1.0.32 => 1.0.33}/templates/test_values/node14-minimal-values.yaml (100%) rename trains/community/node-red/{1.0.32 => 1.0.33}/templates/test_values/node14-values.yaml (100%) rename trains/community/node-red/{1.0.32 => 1.0.33}/templates/test_values/node16-minimal-values.yaml (100%) rename trains/community/node-red/{1.0.32 => 1.0.33}/templates/test_values/node16-values.yaml (100%) rename trains/community/node-red/{1.0.32 => 1.0.33}/templates/test_values/node18-minimal-values.yaml (100%) rename trains/community/node-red/{1.0.32 => 1.0.33}/templates/test_values/node18-values.yaml (100%) delete mode 100644 trains/community/odoo/1.0.3/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/community/odoo/1.0.3/templates/library/base_v1_1_3/permissions.py rename trains/community/odoo/{1.0.3 => 1.0.4}/README.md (100%) rename trains/community/odoo/{1.0.3 => 1.0.4}/app.yaml (86%) rename trains/community/odoo/{1.0.3 => 1.0.4}/ix_values.yaml (100%) rename trains/community/odoo/{1.0.3 => 1.0.4}/migrations/migrate_from_kubernetes (100%) rename trains/community/odoo/{1.0.3 => 1.0.4}/migrations/migration_helpers/__init__.py (100%) rename trains/community/odoo/{1.0.3 => 1.0.4}/migrations/migration_helpers/cpu.py (100%) rename trains/community/odoo/{1.0.3 => 1.0.4}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/odoo/{1.0.3 => 1.0.4}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/odoo/{1.0.3 => 1.0.4}/migrations/migration_helpers/memory.py (100%) rename trains/community/odoo/{1.0.3 => 1.0.4}/migrations/migration_helpers/resources.py (100%) rename trains/community/odoo/{1.0.3 => 1.0.4}/migrations/migration_helpers/storage.py (100%) rename trains/community/odoo/{1.0.3 => 1.0.4}/questions.yaml (100%) rename trains/community/odoo/{1.0.3 => 1.0.4}/templates/docker-compose.yaml (100%) rename trains/community/odoo/{1.0.3/templates/library/base_v1_1_3 => 1.0.4/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/odoo/{1.0.3/templates/library/base_v1_1_3 => 1.0.4/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/community/odoo/1.0.4/templates/library/base_v1_1_4/healthchecks.py rename trains/community/odoo/{1.0.3/templates/library/base_v1_1_3 => 1.0.4/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/odoo/{1.0.3/templates/library/base_v1_1_3 => 1.0.4/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/odoo/{1.0.3/templates/library/base_v1_1_3 => 1.0.4/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/community/odoo/1.0.4/templates/library/base_v1_1_4/permissions.py rename trains/community/odoo/{1.0.3/templates/library/base_v1_1_3 => 1.0.4/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/odoo/{1.0.3/templates/library/base_v1_1_3 => 1.0.4/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/odoo/{1.0.3/templates/library/base_v1_1_3 => 1.0.4/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/odoo/{1.0.3/templates/library/base_v1_1_3 => 1.0.4/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/odoo/{1.0.3/templates/library/base_v1_1_3 => 1.0.4/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/odoo/{1.0.3/templates/library/base_v1_1_3 => 1.0.4/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/odoo/{1.0.3/templates/library/base_v1_1_3 => 1.0.4/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/odoo/{1.0.3 => 1.0.4}/templates/macros/odoo.conf (100%) rename trains/community/odoo/{1.0.3 => 1.0.4}/templates/test_values/basic-values.yaml (100%) rename trains/community/odoo/{1.0.3 => 1.0.4}/templates/test_values/extra-values.yaml (100%) rename trains/community/omada-controller/{1.1.9 => 1.1.10}/README.md (100%) rename trains/community/omada-controller/{1.1.9 => 1.1.10}/app.yaml (91%) rename trains/community/omada-controller/{1.1.9 => 1.1.10}/ix_values.yaml (100%) rename trains/community/omada-controller/{1.1.9 => 1.1.10}/migrations/migrate_from_kubernetes (100%) rename trains/community/omada-controller/{1.1.9 => 1.1.10}/migrations/migration_helpers/__init__.py (100%) rename trains/community/omada-controller/{1.1.9 => 1.1.10}/migrations/migration_helpers/cpu.py (100%) rename trains/community/omada-controller/{1.1.9 => 1.1.10}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/omada-controller/{1.1.9 => 1.1.10}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/omada-controller/{1.1.9 => 1.1.10}/migrations/migration_helpers/memory.py (100%) rename trains/community/omada-controller/{1.1.9 => 1.1.10}/migrations/migration_helpers/resources.py (100%) rename trains/community/omada-controller/{1.1.9 => 1.1.10}/migrations/migration_helpers/storage.py (100%) rename trains/community/omada-controller/{1.1.9 => 1.1.10}/questions.yaml (100%) rename trains/community/omada-controller/{1.1.9 => 1.1.10}/templates/docker-compose.yaml (100%) rename trains/community/omada-controller/{1.1.9/templates/library/base_v1_1_3 => 1.1.10/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/omada-controller/{1.1.9/templates/library/base_v1_1_3 => 1.1.10/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/community/omada-controller/1.1.10/templates/library/base_v1_1_4/healthchecks.py rename trains/community/omada-controller/{1.1.9/templates/library/base_v1_1_3 => 1.1.10/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/omada-controller/{1.1.9/templates/library/base_v1_1_3 => 1.1.10/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/omada-controller/{1.1.9/templates/library/base_v1_1_3 => 1.1.10/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/community/omada-controller/1.1.10/templates/library/base_v1_1_4/permissions.py rename trains/community/omada-controller/{1.1.9/templates/library/base_v1_1_3 => 1.1.10/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/omada-controller/{1.1.9/templates/library/base_v1_1_3 => 1.1.10/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/omada-controller/{1.1.9/templates/library/base_v1_1_3 => 1.1.10/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/omada-controller/{1.1.9/templates/library/base_v1_1_3 => 1.1.10/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/omada-controller/{1.1.9/templates/library/base_v1_1_3 => 1.1.10/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/omada-controller/{1.1.9/templates/library/base_v1_1_3 => 1.1.10/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/omada-controller/{1.1.9/templates/library/base_v1_1_3 => 1.1.10/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/omada-controller/{1.1.9 => 1.1.10}/templates/test_values/basic-values.yaml (100%) rename trains/community/omada-controller/{1.1.9 => 1.1.10}/templates/test_values/https-values.yaml (100%) delete mode 100644 trains/community/omada-controller/1.1.9/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/community/omada-controller/1.1.9/templates/library/base_v1_1_3/permissions.py delete mode 100644 trains/community/organizr/1.0.17/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/community/organizr/1.0.17/templates/library/base_v1_1_3/permissions.py rename trains/community/organizr/{1.0.17 => 1.0.18}/README.md (100%) rename trains/community/organizr/{1.0.17 => 1.0.18}/app.yaml (91%) rename trains/community/organizr/{1.0.17 => 1.0.18}/ix_values.yaml (100%) rename trains/community/organizr/{1.0.17 => 1.0.18}/migrations/migrate_from_kubernetes (100%) rename trains/community/organizr/{1.0.17 => 1.0.18}/migrations/migration_helpers/__init__.py (100%) rename trains/community/organizr/{1.0.17 => 1.0.18}/migrations/migration_helpers/cpu.py (100%) rename trains/community/organizr/{1.0.17 => 1.0.18}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/organizr/{1.0.17 => 1.0.18}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/organizr/{1.0.17 => 1.0.18}/migrations/migration_helpers/memory.py (100%) rename trains/community/organizr/{1.0.17 => 1.0.18}/migrations/migration_helpers/resources.py (100%) rename trains/community/organizr/{1.0.17 => 1.0.18}/migrations/migration_helpers/storage.py (100%) rename trains/community/organizr/{1.0.17 => 1.0.18}/questions.yaml (100%) rename trains/community/organizr/{1.0.17 => 1.0.18}/templates/docker-compose.yaml (100%) rename trains/community/organizr/{1.0.17/templates/library/base_v1_1_3 => 1.0.18/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/organizr/{1.0.17/templates/library/base_v1_1_3 => 1.0.18/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/community/organizr/1.0.18/templates/library/base_v1_1_4/healthchecks.py rename trains/community/organizr/{1.0.17/templates/library/base_v1_1_3 => 1.0.18/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/organizr/{1.0.17/templates/library/base_v1_1_3 => 1.0.18/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/organizr/{1.0.17/templates/library/base_v1_1_3 => 1.0.18/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/community/organizr/1.0.18/templates/library/base_v1_1_4/permissions.py rename trains/community/organizr/{1.0.17/templates/library/base_v1_1_3 => 1.0.18/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/organizr/{1.0.17/templates/library/base_v1_1_3 => 1.0.18/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/organizr/{1.0.17/templates/library/base_v1_1_3 => 1.0.18/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/organizr/{1.0.17/templates/library/base_v1_1_3 => 1.0.18/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/organizr/{1.0.17/templates/library/base_v1_1_3 => 1.0.18/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/organizr/{1.0.17/templates/library/base_v1_1_3 => 1.0.18/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/organizr/{1.0.17/templates/library/base_v1_1_3 => 1.0.18/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/organizr/{1.0.17 => 1.0.18}/templates/test_values/basic-values.yaml (100%) delete mode 100644 trains/community/overseerr/1.0.17/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/community/overseerr/1.0.17/templates/library/base_v1_1_3/permissions.py rename trains/community/overseerr/{1.0.17 => 1.0.18}/README.md (100%) rename trains/community/overseerr/{1.0.17 => 1.0.18}/app.yaml (85%) rename trains/community/overseerr/{1.0.17 => 1.0.18}/ix_values.yaml (100%) rename trains/community/overseerr/{1.0.17 => 1.0.18}/migrations/migrate_from_kubernetes (100%) rename trains/community/overseerr/{1.0.17 => 1.0.18}/migrations/migration_helpers/__init__.py (100%) rename trains/community/overseerr/{1.0.17 => 1.0.18}/migrations/migration_helpers/cpu.py (100%) rename trains/community/overseerr/{1.0.17 => 1.0.18}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/overseerr/{1.0.17 => 1.0.18}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/overseerr/{1.0.17 => 1.0.18}/migrations/migration_helpers/memory.py (100%) rename trains/community/overseerr/{1.0.17 => 1.0.18}/migrations/migration_helpers/resources.py (100%) rename trains/community/overseerr/{1.0.17 => 1.0.18}/migrations/migration_helpers/storage.py (100%) rename trains/community/overseerr/{1.0.17 => 1.0.18}/questions.yaml (100%) rename trains/community/overseerr/{1.0.17 => 1.0.18}/templates/docker-compose.yaml (100%) rename trains/community/overseerr/{1.0.17/templates/library/base_v1_1_3 => 1.0.18/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/overseerr/{1.0.17/templates/library/base_v1_1_3 => 1.0.18/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/community/overseerr/1.0.18/templates/library/base_v1_1_4/healthchecks.py rename trains/community/overseerr/{1.0.17/templates/library/base_v1_1_3 => 1.0.18/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/overseerr/{1.0.17/templates/library/base_v1_1_3 => 1.0.18/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/overseerr/{1.0.17/templates/library/base_v1_1_3 => 1.0.18/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/community/overseerr/1.0.18/templates/library/base_v1_1_4/permissions.py rename trains/community/overseerr/{1.0.17/templates/library/base_v1_1_3 => 1.0.18/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/overseerr/{1.0.17/templates/library/base_v1_1_3 => 1.0.18/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/overseerr/{1.0.17/templates/library/base_v1_1_3 => 1.0.18/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/overseerr/{1.0.17/templates/library/base_v1_1_3 => 1.0.18/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/overseerr/{1.0.17/templates/library/base_v1_1_3 => 1.0.18/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/overseerr/{1.0.17/templates/library/base_v1_1_3 => 1.0.18/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/overseerr/{1.0.17/templates/library/base_v1_1_3 => 1.0.18/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/overseerr/{1.0.17 => 1.0.18}/templates/test_values/basic-values.yaml (100%) delete mode 100644 trains/community/palworld/1.0.19/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/community/palworld/1.0.19/templates/library/base_v1_1_3/permissions.py rename trains/community/palworld/{1.0.19 => 1.0.20}/README.md (100%) rename trains/community/palworld/{1.0.19 => 1.0.20}/app.yaml (92%) rename trains/community/palworld/{1.0.19 => 1.0.20}/ix_values.yaml (100%) rename trains/community/palworld/{1.0.19 => 1.0.20}/migrations/migrate_from_kubernetes (100%) rename trains/community/palworld/{1.0.19 => 1.0.20}/migrations/migration_helpers/__init__.py (100%) rename trains/community/palworld/{1.0.19 => 1.0.20}/migrations/migration_helpers/cpu.py (100%) rename trains/community/palworld/{1.0.19 => 1.0.20}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/palworld/{1.0.19 => 1.0.20}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/palworld/{1.0.19 => 1.0.20}/migrations/migration_helpers/memory.py (100%) rename trains/community/palworld/{1.0.19 => 1.0.20}/migrations/migration_helpers/resources.py (100%) rename trains/community/palworld/{1.0.19 => 1.0.20}/migrations/migration_helpers/storage.py (100%) rename trains/community/palworld/{1.0.19 => 1.0.20}/questions.yaml (100%) rename trains/community/palworld/{1.0.19 => 1.0.20}/templates/docker-compose.yaml (100%) rename trains/community/palworld/{1.0.19/templates/library/base_v1_1_3 => 1.0.20/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/palworld/{1.0.19/templates/library/base_v1_1_3 => 1.0.20/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/community/palworld/1.0.20/templates/library/base_v1_1_4/healthchecks.py rename trains/community/palworld/{1.0.19/templates/library/base_v1_1_3 => 1.0.20/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/palworld/{1.0.19/templates/library/base_v1_1_3 => 1.0.20/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/palworld/{1.0.19/templates/library/base_v1_1_3 => 1.0.20/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/community/palworld/1.0.20/templates/library/base_v1_1_4/permissions.py rename trains/community/palworld/{1.0.19/templates/library/base_v1_1_3 => 1.0.20/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/palworld/{1.0.19/templates/library/base_v1_1_3 => 1.0.20/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/palworld/{1.0.19/templates/library/base_v1_1_3 => 1.0.20/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/palworld/{1.0.19/templates/library/base_v1_1_3 => 1.0.20/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/palworld/{1.0.19/templates/library/base_v1_1_3 => 1.0.20/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/palworld/{1.0.19/templates/library/base_v1_1_3 => 1.0.20/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/palworld/{1.0.19/templates/library/base_v1_1_3 => 1.0.20/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/palworld/{1.0.19 => 1.0.20}/templates/test_values/basic-values.yaml (100%) rename trains/community/palworld/{1.0.19 => 1.0.20}/templates/test_values/extra-values.yaml (100%) delete mode 100644 trains/community/paperless-ngx/1.0.11/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/community/paperless-ngx/1.0.11/templates/library/base_v1_1_3/permissions.py rename trains/community/paperless-ngx/{1.0.11 => 1.0.12}/README.md (100%) rename trains/community/paperless-ngx/{1.0.11 => 1.0.12}/app.yaml (94%) rename trains/community/paperless-ngx/{1.0.11 => 1.0.12}/ix_values.yaml (100%) rename trains/community/paperless-ngx/{1.0.11 => 1.0.12}/migrations/migrate_from_kubernetes (100%) rename trains/community/paperless-ngx/{1.0.11 => 1.0.12}/migrations/migration_helpers/__init__.py (100%) rename trains/community/paperless-ngx/{1.0.11 => 1.0.12}/migrations/migration_helpers/cpu.py (100%) rename trains/community/paperless-ngx/{1.0.11 => 1.0.12}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/paperless-ngx/{1.0.11 => 1.0.12}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/paperless-ngx/{1.0.11 => 1.0.12}/migrations/migration_helpers/memory.py (100%) rename trains/community/paperless-ngx/{1.0.11 => 1.0.12}/migrations/migration_helpers/resources.py (100%) rename trains/community/paperless-ngx/{1.0.11 => 1.0.12}/migrations/migration_helpers/storage.py (100%) rename trains/community/paperless-ngx/{1.0.11 => 1.0.12}/questions.yaml (100%) rename trains/community/paperless-ngx/{1.0.11 => 1.0.12}/templates/docker-compose.yaml (100%) rename trains/community/paperless-ngx/{1.0.11/templates/library/base_v1_1_3 => 1.0.12/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/paperless-ngx/{1.0.11/templates/library/base_v1_1_3 => 1.0.12/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/community/paperless-ngx/1.0.12/templates/library/base_v1_1_4/healthchecks.py rename trains/community/paperless-ngx/{1.0.11/templates/library/base_v1_1_3 => 1.0.12/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/paperless-ngx/{1.0.11/templates/library/base_v1_1_3 => 1.0.12/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/paperless-ngx/{1.0.11/templates/library/base_v1_1_3 => 1.0.12/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/community/paperless-ngx/1.0.12/templates/library/base_v1_1_4/permissions.py rename trains/community/paperless-ngx/{1.0.11/templates/library/base_v1_1_3 => 1.0.12/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/paperless-ngx/{1.0.11/templates/library/base_v1_1_3 => 1.0.12/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/paperless-ngx/{1.0.11/templates/library/base_v1_1_3 => 1.0.12/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/paperless-ngx/{1.0.11/templates/library/base_v1_1_3 => 1.0.12/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/paperless-ngx/{1.0.11/templates/library/base_v1_1_3 => 1.0.12/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/paperless-ngx/{1.0.11/templates/library/base_v1_1_3 => 1.0.12/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/paperless-ngx/{1.0.11/templates/library/base_v1_1_3 => 1.0.12/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/paperless-ngx/{1.0.11 => 1.0.12}/templates/test_values/basic-values.yaml (100%) rename trains/community/paperless-ngx/{1.0.11 => 1.0.12}/templates/test_values/trash-values.yaml (100%) delete mode 100644 trains/community/passbolt/1.0.6/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/community/passbolt/1.0.6/templates/library/base_v1_1_3/permissions.py rename trains/community/passbolt/{1.0.6 => 1.0.7}/README.md (100%) rename trains/community/passbolt/{1.0.6 => 1.0.7}/app.yaml (90%) rename trains/community/passbolt/{1.0.6 => 1.0.7}/ix_values.yaml (100%) rename trains/community/passbolt/{1.0.6 => 1.0.7}/migrations/migrate_from_kubernetes (100%) rename trains/community/passbolt/{1.0.6 => 1.0.7}/migrations/migration_helpers/__init__.py (100%) rename trains/community/passbolt/{1.0.6 => 1.0.7}/migrations/migration_helpers/cpu.py (100%) rename trains/community/passbolt/{1.0.6 => 1.0.7}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/passbolt/{1.0.6 => 1.0.7}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/passbolt/{1.0.6 => 1.0.7}/migrations/migration_helpers/memory.py (100%) rename trains/community/passbolt/{1.0.6 => 1.0.7}/migrations/migration_helpers/resources.py (100%) rename trains/community/passbolt/{1.0.6 => 1.0.7}/migrations/migration_helpers/storage.py (100%) rename trains/community/passbolt/{1.0.6 => 1.0.7}/questions.yaml (100%) rename trains/community/passbolt/{1.0.6 => 1.0.7}/templates/docker-compose.yaml (100%) rename trains/community/passbolt/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/passbolt/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/community/passbolt/1.0.7/templates/library/base_v1_1_4/healthchecks.py rename trains/community/passbolt/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/passbolt/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/passbolt/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/community/passbolt/1.0.7/templates/library/base_v1_1_4/permissions.py rename trains/community/passbolt/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/passbolt/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/passbolt/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/passbolt/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/passbolt/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/passbolt/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/passbolt/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/passbolt/{1.0.6 => 1.0.7}/templates/test_values/basic-values.yaml (100%) rename trains/community/passbolt/{1.0.6 => 1.0.7}/templates/test_values/https-values.yaml (100%) delete mode 100644 trains/community/pgadmin/1.0.4/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/community/pgadmin/1.0.4/templates/library/base_v1_1_3/permissions.py rename trains/community/pgadmin/{1.0.4 => 1.0.5}/README.md (100%) rename trains/community/pgadmin/{1.0.4 => 1.0.5}/app.yaml (89%) rename trains/community/pgadmin/{1.0.4 => 1.0.5}/ix_values.yaml (100%) rename trains/community/pgadmin/{1.0.4 => 1.0.5}/migrations/migrate_from_kubernetes (100%) rename trains/community/pgadmin/{1.0.4 => 1.0.5}/migrations/migration_helpers/__init__.py (100%) rename trains/community/pgadmin/{1.0.4 => 1.0.5}/migrations/migration_helpers/cpu.py (100%) rename trains/community/pgadmin/{1.0.4 => 1.0.5}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/pgadmin/{1.0.4 => 1.0.5}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/pgadmin/{1.0.4 => 1.0.5}/migrations/migration_helpers/memory.py (100%) rename trains/community/pgadmin/{1.0.4 => 1.0.5}/migrations/migration_helpers/resources.py (100%) rename trains/community/pgadmin/{1.0.4 => 1.0.5}/migrations/migration_helpers/storage.py (100%) rename trains/community/pgadmin/{1.0.4 => 1.0.5}/questions.yaml (100%) rename trains/community/pgadmin/{1.0.4 => 1.0.5}/templates/docker-compose.yaml (100%) rename trains/community/pgadmin/{1.0.4/templates/library/base_v1_1_3 => 1.0.5/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/pgadmin/{1.0.4/templates/library/base_v1_1_3 => 1.0.5/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/community/pgadmin/1.0.5/templates/library/base_v1_1_4/healthchecks.py rename trains/community/pgadmin/{1.0.4/templates/library/base_v1_1_3 => 1.0.5/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/pgadmin/{1.0.4/templates/library/base_v1_1_3 => 1.0.5/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/pgadmin/{1.0.4/templates/library/base_v1_1_3 => 1.0.5/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/community/pgadmin/1.0.5/templates/library/base_v1_1_4/permissions.py rename trains/community/pgadmin/{1.0.4/templates/library/base_v1_1_3 => 1.0.5/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/pgadmin/{1.0.4/templates/library/base_v1_1_3 => 1.0.5/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/pgadmin/{1.0.4/templates/library/base_v1_1_3 => 1.0.5/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/pgadmin/{1.0.4/templates/library/base_v1_1_3 => 1.0.5/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/pgadmin/{1.0.4/templates/library/base_v1_1_3 => 1.0.5/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/pgadmin/{1.0.4/templates/library/base_v1_1_3 => 1.0.5/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/pgadmin/{1.0.4/templates/library/base_v1_1_3 => 1.0.5/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/pgadmin/{1.0.4 => 1.0.5}/templates/test_values/basic-values.yaml (100%) rename trains/community/pgadmin/{1.0.4 => 1.0.5}/templates/test_values/https-values.yaml (100%) delete mode 100644 trains/community/pigallery2/1.0.5/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/community/pigallery2/1.0.5/templates/library/base_v1_1_3/permissions.py rename trains/community/pigallery2/{1.0.5 => 1.0.6}/README.md (100%) rename trains/community/pigallery2/{1.0.5 => 1.0.6}/app.yaml (92%) rename trains/community/pigallery2/{1.0.5 => 1.0.6}/ix_values.yaml (100%) rename trains/community/pigallery2/{1.0.5 => 1.0.6}/migrations/migrate_from_kubernetes (100%) rename trains/community/pigallery2/{1.0.5 => 1.0.6}/migrations/migration_helpers/__init__.py (100%) rename trains/community/pigallery2/{1.0.5 => 1.0.6}/migrations/migration_helpers/cpu.py (100%) rename trains/community/pigallery2/{1.0.5 => 1.0.6}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/pigallery2/{1.0.5 => 1.0.6}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/pigallery2/{1.0.5 => 1.0.6}/migrations/migration_helpers/memory.py (100%) rename trains/community/pigallery2/{1.0.5 => 1.0.6}/migrations/migration_helpers/resources.py (100%) rename trains/community/pigallery2/{1.0.5 => 1.0.6}/migrations/migration_helpers/storage.py (100%) rename trains/community/pigallery2/{1.0.5 => 1.0.6}/questions.yaml (100%) rename trains/community/pigallery2/{1.0.5 => 1.0.6}/templates/docker-compose.yaml (100%) rename trains/community/pigallery2/{1.0.5/templates/library/base_v1_1_3 => 1.0.6/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/pigallery2/{1.0.5/templates/library/base_v1_1_3 => 1.0.6/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/community/pigallery2/1.0.6/templates/library/base_v1_1_4/healthchecks.py rename trains/community/pigallery2/{1.0.5/templates/library/base_v1_1_3 => 1.0.6/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/pigallery2/{1.0.5/templates/library/base_v1_1_3 => 1.0.6/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/pigallery2/{1.0.5/templates/library/base_v1_1_3 => 1.0.6/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/community/pigallery2/1.0.6/templates/library/base_v1_1_4/permissions.py rename trains/community/pigallery2/{1.0.5/templates/library/base_v1_1_3 => 1.0.6/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/pigallery2/{1.0.5/templates/library/base_v1_1_3 => 1.0.6/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/pigallery2/{1.0.5/templates/library/base_v1_1_3 => 1.0.6/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/pigallery2/{1.0.5/templates/library/base_v1_1_3 => 1.0.6/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/pigallery2/{1.0.5/templates/library/base_v1_1_3 => 1.0.6/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/pigallery2/{1.0.5/templates/library/base_v1_1_3 => 1.0.6/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/pigallery2/{1.0.5/templates/library/base_v1_1_3 => 1.0.6/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/pigallery2/{1.0.5 => 1.0.6}/templates/test_values/basic-values.yaml (100%) delete mode 100644 trains/community/piwigo/1.0.5/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/community/piwigo/1.0.5/templates/library/base_v1_1_3/permissions.py rename trains/community/piwigo/{1.0.5 => 1.0.6}/README.md (100%) rename trains/community/piwigo/{1.0.5 => 1.0.6}/app.yaml (92%) rename trains/community/piwigo/{1.0.5 => 1.0.6}/ix_values.yaml (100%) rename trains/community/piwigo/{1.0.5 => 1.0.6}/migrations/migrate_from_kubernetes (100%) rename trains/community/piwigo/{1.0.5 => 1.0.6}/migrations/migration_helpers/__init__.py (100%) rename trains/community/piwigo/{1.0.5 => 1.0.6}/migrations/migration_helpers/cpu.py (100%) rename trains/community/piwigo/{1.0.5 => 1.0.6}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/piwigo/{1.0.5 => 1.0.6}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/piwigo/{1.0.5 => 1.0.6}/migrations/migration_helpers/memory.py (100%) rename trains/community/piwigo/{1.0.5 => 1.0.6}/migrations/migration_helpers/resources.py (100%) rename trains/community/piwigo/{1.0.5 => 1.0.6}/migrations/migration_helpers/storage.py (100%) rename trains/community/piwigo/{1.0.5 => 1.0.6}/questions.yaml (100%) rename trains/community/piwigo/{1.0.5 => 1.0.6}/templates/docker-compose.yaml (100%) rename trains/community/piwigo/{1.0.5/templates/library/base_v1_1_3 => 1.0.6/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/piwigo/{1.0.5/templates/library/base_v1_1_3 => 1.0.6/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/community/piwigo/1.0.6/templates/library/base_v1_1_4/healthchecks.py rename trains/community/piwigo/{1.0.5/templates/library/base_v1_1_3 => 1.0.6/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/piwigo/{1.0.5/templates/library/base_v1_1_3 => 1.0.6/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/piwigo/{1.0.5/templates/library/base_v1_1_3 => 1.0.6/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/community/piwigo/1.0.6/templates/library/base_v1_1_4/permissions.py rename trains/community/piwigo/{1.0.5/templates/library/base_v1_1_3 => 1.0.6/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/piwigo/{1.0.5/templates/library/base_v1_1_3 => 1.0.6/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/piwigo/{1.0.5/templates/library/base_v1_1_3 => 1.0.6/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/piwigo/{1.0.5/templates/library/base_v1_1_3 => 1.0.6/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/piwigo/{1.0.5/templates/library/base_v1_1_3 => 1.0.6/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/piwigo/{1.0.5/templates/library/base_v1_1_3 => 1.0.6/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/piwigo/{1.0.5/templates/library/base_v1_1_3 => 1.0.6/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/piwigo/{1.0.5 => 1.0.6}/templates/macros/init.sh (100%) rename trains/community/piwigo/{1.0.5 => 1.0.6}/templates/test_values/basic-values.yaml (100%) delete mode 100644 trains/community/planka/1.0.10/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/community/planka/1.0.10/templates/library/base_v1_1_3/permissions.py rename trains/community/planka/{1.0.10 => 1.0.11}/README.md (100%) rename trains/community/planka/{1.0.10 => 1.0.11}/app.yaml (88%) rename trains/community/planka/{1.0.10 => 1.0.11}/ix_values.yaml (100%) rename trains/community/planka/{1.0.10 => 1.0.11}/migrations/migrate_from_kubernetes (100%) rename trains/community/planka/{1.0.10 => 1.0.11}/migrations/migration_helpers/__init__.py (100%) rename trains/community/planka/{1.0.10 => 1.0.11}/migrations/migration_helpers/cpu.py (100%) rename trains/community/planka/{1.0.10 => 1.0.11}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/planka/{1.0.10 => 1.0.11}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/planka/{1.0.10 => 1.0.11}/migrations/migration_helpers/memory.py (100%) rename trains/community/planka/{1.0.10 => 1.0.11}/migrations/migration_helpers/resources.py (100%) rename trains/community/planka/{1.0.10 => 1.0.11}/migrations/migration_helpers/storage.py (100%) rename trains/community/planka/{1.0.10 => 1.0.11}/questions.yaml (100%) rename trains/community/planka/{1.0.10 => 1.0.11}/templates/docker-compose.yaml (100%) rename trains/community/planka/{1.0.10/templates/library/base_v1_1_3 => 1.0.11/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/planka/{1.0.10/templates/library/base_v1_1_3 => 1.0.11/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/community/planka/1.0.11/templates/library/base_v1_1_4/healthchecks.py rename trains/community/planka/{1.0.10/templates/library/base_v1_1_3 => 1.0.11/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/planka/{1.0.10/templates/library/base_v1_1_3 => 1.0.11/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/planka/{1.0.10/templates/library/base_v1_1_3 => 1.0.11/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/community/planka/1.0.11/templates/library/base_v1_1_4/permissions.py rename trains/community/planka/{1.0.10/templates/library/base_v1_1_3 => 1.0.11/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/planka/{1.0.10/templates/library/base_v1_1_3 => 1.0.11/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/planka/{1.0.10/templates/library/base_v1_1_3 => 1.0.11/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/planka/{1.0.10/templates/library/base_v1_1_3 => 1.0.11/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/planka/{1.0.10/templates/library/base_v1_1_3 => 1.0.11/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/planka/{1.0.10/templates/library/base_v1_1_3 => 1.0.11/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/planka/{1.0.10/templates/library/base_v1_1_3 => 1.0.11/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/planka/{1.0.10 => 1.0.11}/templates/test_values/basic-values.yaml (100%) delete mode 100644 trains/community/plex-auto-languages/1.0.15/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/community/plex-auto-languages/1.0.15/templates/library/base_v1_1_3/permissions.py rename trains/community/plex-auto-languages/{1.0.15 => 1.0.16}/README.md (100%) rename trains/community/plex-auto-languages/{1.0.15 => 1.0.16}/app.yaml (86%) rename trains/community/plex-auto-languages/{1.0.15 => 1.0.16}/ix_values.yaml (100%) rename trains/community/plex-auto-languages/{1.0.15 => 1.0.16}/migrations/migrate_from_kubernetes (100%) rename trains/community/plex-auto-languages/{1.0.15 => 1.0.16}/migrations/migration_helpers/__init__.py (100%) rename trains/community/plex-auto-languages/{1.0.15 => 1.0.16}/migrations/migration_helpers/cpu.py (100%) rename trains/community/plex-auto-languages/{1.0.15 => 1.0.16}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/plex-auto-languages/{1.0.15 => 1.0.16}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/plex-auto-languages/{1.0.15 => 1.0.16}/migrations/migration_helpers/memory.py (100%) rename trains/community/plex-auto-languages/{1.0.15 => 1.0.16}/migrations/migration_helpers/resources.py (100%) rename trains/community/plex-auto-languages/{1.0.15 => 1.0.16}/migrations/migration_helpers/storage.py (100%) rename trains/community/plex-auto-languages/{1.0.15 => 1.0.16}/questions.yaml (100%) rename trains/community/plex-auto-languages/{1.0.15 => 1.0.16}/templates/docker-compose.yaml (100%) rename trains/community/plex-auto-languages/{1.0.15/templates/library/base_v1_1_3 => 1.0.16/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/plex-auto-languages/{1.0.15/templates/library/base_v1_1_3 => 1.0.16/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/community/plex-auto-languages/1.0.16/templates/library/base_v1_1_4/healthchecks.py rename trains/community/plex-auto-languages/{1.0.15/templates/library/base_v1_1_3 => 1.0.16/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/plex-auto-languages/{1.0.15/templates/library/base_v1_1_3 => 1.0.16/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/plex-auto-languages/{1.0.15/templates/library/base_v1_1_3 => 1.0.16/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/community/plex-auto-languages/1.0.16/templates/library/base_v1_1_4/permissions.py rename trains/community/plex-auto-languages/{1.0.15/templates/library/base_v1_1_3 => 1.0.16/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/plex-auto-languages/{1.0.15/templates/library/base_v1_1_3 => 1.0.16/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/plex-auto-languages/{1.0.15/templates/library/base_v1_1_3 => 1.0.16/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/plex-auto-languages/{1.0.15/templates/library/base_v1_1_3 => 1.0.16/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/plex-auto-languages/{1.0.15/templates/library/base_v1_1_3 => 1.0.16/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/plex-auto-languages/{1.0.15/templates/library/base_v1_1_3 => 1.0.16/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/plex-auto-languages/{1.0.15/templates/library/base_v1_1_3 => 1.0.16/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/plex-auto-languages/{1.0.15 => 1.0.16}/templates/test_values/basic-values.yaml (100%) delete mode 100644 trains/community/portainer/1.2.13/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/community/portainer/1.2.13/templates/library/base_v1_1_3/permissions.py rename trains/community/portainer/{1.2.13 => 1.2.14}/README.md (100%) rename trains/community/portainer/{1.2.13 => 1.2.14}/app.yaml (92%) rename trains/community/portainer/{1.2.13 => 1.2.14}/ix_values.yaml (100%) rename trains/community/portainer/{1.2.13 => 1.2.14}/migrations/migration_helpers/__init__.py (100%) rename trains/community/portainer/{1.2.13 => 1.2.14}/migrations/migration_helpers/cpu.py (100%) rename trains/community/portainer/{1.2.13 => 1.2.14}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/portainer/{1.2.13 => 1.2.14}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/portainer/{1.2.13 => 1.2.14}/migrations/migration_helpers/memory.py (100%) rename trains/community/portainer/{1.2.13 => 1.2.14}/migrations/migration_helpers/resources.py (100%) rename trains/community/portainer/{1.2.13 => 1.2.14}/migrations/migration_helpers/storage.py (100%) rename trains/community/portainer/{1.2.13 => 1.2.14}/questions.yaml (100%) rename trains/community/portainer/{1.2.13 => 1.2.14}/templates/docker-compose.yaml (100%) rename trains/community/portainer/{1.2.13/templates/library/base_v1_1_3 => 1.2.14/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/portainer/{1.2.13/templates/library/base_v1_1_3 => 1.2.14/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/community/portainer/1.2.14/templates/library/base_v1_1_4/healthchecks.py rename trains/community/portainer/{1.2.13/templates/library/base_v1_1_3 => 1.2.14/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/portainer/{1.2.13/templates/library/base_v1_1_3 => 1.2.14/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/portainer/{1.2.13/templates/library/base_v1_1_3 => 1.2.14/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/community/portainer/1.2.14/templates/library/base_v1_1_4/permissions.py rename trains/community/portainer/{1.2.13/templates/library/base_v1_1_3 => 1.2.14/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/portainer/{1.2.13/templates/library/base_v1_1_3 => 1.2.14/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/portainer/{1.2.13/templates/library/base_v1_1_3 => 1.2.14/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/portainer/{1.2.13/templates/library/base_v1_1_3 => 1.2.14/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/portainer/{1.2.13/templates/library/base_v1_1_3 => 1.2.14/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/portainer/{1.2.13/templates/library/base_v1_1_3 => 1.2.14/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/portainer/{1.2.13/templates/library/base_v1_1_3 => 1.2.14/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/portainer/{1.2.13 => 1.2.14}/templates/test_values/basic-values.yaml (100%) rename trains/community/portainer/{1.2.13 => 1.2.14}/templates/test_values/https-values.yaml (100%) delete mode 100644 trains/community/prowlarr/1.2.12/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/community/prowlarr/1.2.12/templates/library/base_v1_1_3/permissions.py rename trains/community/prowlarr/{1.2.12 => 1.2.13}/README.md (100%) rename trains/community/prowlarr/{1.2.12 => 1.2.13}/app.yaml (86%) rename trains/community/prowlarr/{1.2.12 => 1.2.13}/ix_values.yaml (100%) rename trains/community/prowlarr/{1.2.12 => 1.2.13}/migrations/migrate_from_kubernetes (100%) rename trains/community/prowlarr/{1.2.12 => 1.2.13}/migrations/migration_helpers/__init__.py (100%) rename trains/community/prowlarr/{1.2.12 => 1.2.13}/migrations/migration_helpers/cpu.py (100%) rename trains/community/prowlarr/{1.2.12 => 1.2.13}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/prowlarr/{1.2.12 => 1.2.13}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/prowlarr/{1.2.12 => 1.2.13}/migrations/migration_helpers/memory.py (100%) rename trains/community/prowlarr/{1.2.12 => 1.2.13}/migrations/migration_helpers/resources.py (100%) rename trains/community/prowlarr/{1.2.12 => 1.2.13}/migrations/migration_helpers/storage.py (100%) rename trains/community/prowlarr/{1.2.12 => 1.2.13}/questions.yaml (100%) rename trains/community/prowlarr/{1.2.12 => 1.2.13}/templates/docker-compose.yaml (100%) rename trains/community/prowlarr/{1.2.12/templates/library/base_v1_1_3 => 1.2.13/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/prowlarr/{1.2.12/templates/library/base_v1_1_3 => 1.2.13/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/community/prowlarr/1.2.13/templates/library/base_v1_1_4/healthchecks.py rename trains/community/prowlarr/{1.2.12/templates/library/base_v1_1_3 => 1.2.13/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/prowlarr/{1.2.12/templates/library/base_v1_1_3 => 1.2.13/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/prowlarr/{1.2.12/templates/library/base_v1_1_3 => 1.2.13/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/community/prowlarr/1.2.13/templates/library/base_v1_1_4/permissions.py rename trains/community/prowlarr/{1.2.12/templates/library/base_v1_1_3 => 1.2.13/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/prowlarr/{1.2.12/templates/library/base_v1_1_3 => 1.2.13/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/prowlarr/{1.2.12/templates/library/base_v1_1_3 => 1.2.13/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/prowlarr/{1.2.12/templates/library/base_v1_1_3 => 1.2.13/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/prowlarr/{1.2.12/templates/library/base_v1_1_3 => 1.2.13/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/prowlarr/{1.2.12/templates/library/base_v1_1_3 => 1.2.13/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/prowlarr/{1.2.12/templates/library/base_v1_1_3 => 1.2.13/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/prowlarr/{1.2.12 => 1.2.13}/templates/test_values/basic-values.yaml (100%) delete mode 100644 trains/community/qbittorrent/1.0.27/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/community/qbittorrent/1.0.27/templates/library/base_v1_1_3/permissions.py rename trains/community/qbittorrent/{1.0.27 => 1.0.28}/README.md (100%) rename trains/community/qbittorrent/{1.0.27 => 1.0.28}/app.yaml (87%) rename trains/community/qbittorrent/{1.0.27 => 1.0.28}/ix_values.yaml (100%) rename trains/community/qbittorrent/{1.0.27 => 1.0.28}/migrations/migrate_from_kubernetes (100%) rename trains/community/qbittorrent/{1.0.27 => 1.0.28}/migrations/migration_helpers/__init__.py (100%) rename trains/community/qbittorrent/{1.0.27 => 1.0.28}/migrations/migration_helpers/cpu.py (100%) rename trains/community/qbittorrent/{1.0.27 => 1.0.28}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/qbittorrent/{1.0.27 => 1.0.28}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/qbittorrent/{1.0.27 => 1.0.28}/migrations/migration_helpers/memory.py (100%) rename trains/community/qbittorrent/{1.0.27 => 1.0.28}/migrations/migration_helpers/resources.py (100%) rename trains/community/qbittorrent/{1.0.27 => 1.0.28}/migrations/migration_helpers/storage.py (100%) rename trains/community/qbittorrent/{1.0.27 => 1.0.28}/questions.yaml (100%) rename trains/community/qbittorrent/{1.0.27 => 1.0.28}/templates/docker-compose.yaml (100%) rename trains/community/qbittorrent/{1.0.27/templates/library/base_v1_1_3 => 1.0.28/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/qbittorrent/{1.0.27/templates/library/base_v1_1_3 => 1.0.28/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/community/qbittorrent/1.0.28/templates/library/base_v1_1_4/healthchecks.py rename trains/community/qbittorrent/{1.0.27/templates/library/base_v1_1_3 => 1.0.28/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/qbittorrent/{1.0.27/templates/library/base_v1_1_3 => 1.0.28/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/qbittorrent/{1.0.27/templates/library/base_v1_1_3 => 1.0.28/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/community/qbittorrent/1.0.28/templates/library/base_v1_1_4/permissions.py rename trains/community/qbittorrent/{1.0.27/templates/library/base_v1_1_3 => 1.0.28/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/qbittorrent/{1.0.27/templates/library/base_v1_1_3 => 1.0.28/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/qbittorrent/{1.0.27/templates/library/base_v1_1_3 => 1.0.28/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/qbittorrent/{1.0.27/templates/library/base_v1_1_3 => 1.0.28/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/qbittorrent/{1.0.27/templates/library/base_v1_1_3 => 1.0.28/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/qbittorrent/{1.0.27/templates/library/base_v1_1_3 => 1.0.28/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/qbittorrent/{1.0.27/templates/library/base_v1_1_3 => 1.0.28/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/qbittorrent/{1.0.27 => 1.0.28}/templates/test_values/basic-values.yaml (100%) delete mode 100644 trains/community/radarr/1.1.11/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/community/radarr/1.1.11/templates/library/base_v1_1_3/permissions.py rename trains/community/radarr/{1.1.11 => 1.1.12}/README.md (100%) rename trains/community/radarr/{1.1.11 => 1.1.12}/app.yaml (89%) rename trains/community/radarr/{1.1.11 => 1.1.12}/ix_values.yaml (100%) rename trains/community/radarr/{1.1.11 => 1.1.12}/migrations/migrate_from_kubernetes (100%) rename trains/community/radarr/{1.1.11 => 1.1.12}/migrations/migration_helpers/__init__.py (100%) rename trains/community/radarr/{1.1.11 => 1.1.12}/migrations/migration_helpers/cpu.py (100%) rename trains/community/radarr/{1.1.11 => 1.1.12}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/radarr/{1.1.11 => 1.1.12}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/radarr/{1.1.11 => 1.1.12}/migrations/migration_helpers/memory.py (100%) rename trains/community/radarr/{1.1.11 => 1.1.12}/migrations/migration_helpers/resources.py (100%) rename trains/community/radarr/{1.1.11 => 1.1.12}/migrations/migration_helpers/storage.py (100%) rename trains/community/radarr/{1.1.11 => 1.1.12}/questions.yaml (100%) rename trains/community/radarr/{1.1.11 => 1.1.12}/templates/docker-compose.yaml (100%) rename trains/community/radarr/{1.1.11/templates/library/base_v1_1_3 => 1.1.12/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/radarr/{1.1.11/templates/library/base_v1_1_3 => 1.1.12/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/community/radarr/1.1.12/templates/library/base_v1_1_4/healthchecks.py rename trains/community/radarr/{1.1.11/templates/library/base_v1_1_3 => 1.1.12/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/radarr/{1.1.11/templates/library/base_v1_1_3 => 1.1.12/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/radarr/{1.1.11/templates/library/base_v1_1_3 => 1.1.12/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/community/radarr/1.1.12/templates/library/base_v1_1_4/permissions.py rename trains/community/radarr/{1.1.11/templates/library/base_v1_1_3 => 1.1.12/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/radarr/{1.1.11/templates/library/base_v1_1_3 => 1.1.12/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/radarr/{1.1.11/templates/library/base_v1_1_3 => 1.1.12/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/radarr/{1.1.11/templates/library/base_v1_1_3 => 1.1.12/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/radarr/{1.1.11/templates/library/base_v1_1_3 => 1.1.12/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/radarr/{1.1.11/templates/library/base_v1_1_3 => 1.1.12/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/radarr/{1.1.11/templates/library/base_v1_1_3 => 1.1.12/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/radarr/{1.1.11 => 1.1.12}/templates/test_values/basic-values.yaml (100%) delete mode 100644 trains/community/readarr/1.0.18/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/community/readarr/1.0.18/templates/library/base_v1_1_3/permissions.py rename trains/community/readarr/{1.0.18 => 1.0.19}/README.md (100%) rename trains/community/readarr/{1.0.18 => 1.0.19}/app.yaml (88%) rename trains/community/readarr/{1.0.18 => 1.0.19}/ix_values.yaml (100%) rename trains/community/readarr/{1.0.18 => 1.0.19}/migrations/migrate_from_kubernetes (100%) rename trains/community/readarr/{1.0.18 => 1.0.19}/migrations/migration_helpers/__init__.py (100%) rename trains/community/readarr/{1.0.18 => 1.0.19}/migrations/migration_helpers/cpu.py (100%) rename trains/community/readarr/{1.0.18 => 1.0.19}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/readarr/{1.0.18 => 1.0.19}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/readarr/{1.0.18 => 1.0.19}/migrations/migration_helpers/memory.py (100%) rename trains/community/readarr/{1.0.18 => 1.0.19}/migrations/migration_helpers/resources.py (100%) rename trains/community/readarr/{1.0.18 => 1.0.19}/migrations/migration_helpers/storage.py (100%) rename trains/community/readarr/{1.0.18 => 1.0.19}/questions.yaml (100%) rename trains/community/readarr/{1.0.18 => 1.0.19}/templates/docker-compose.yaml (100%) rename trains/community/readarr/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/readarr/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/community/readarr/1.0.19/templates/library/base_v1_1_4/healthchecks.py rename trains/community/readarr/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/readarr/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/readarr/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/community/readarr/1.0.19/templates/library/base_v1_1_4/permissions.py rename trains/community/readarr/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/readarr/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/readarr/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/readarr/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/readarr/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/readarr/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/readarr/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/readarr/{1.0.18 => 1.0.19}/templates/test_values/basic-values.yaml (100%) delete mode 100644 trains/community/recyclarr/1.0.7/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/community/recyclarr/1.0.7/templates/library/base_v1_1_3/permissions.py rename trains/community/recyclarr/{1.0.7 => 1.0.8}/README.md (100%) rename trains/community/recyclarr/{1.0.7 => 1.0.8}/app.yaml (85%) rename trains/community/recyclarr/{1.0.7 => 1.0.8}/ix_values.yaml (100%) rename trains/community/recyclarr/{1.0.7 => 1.0.8}/migrations/migrate_from_kubernetes (100%) rename trains/community/recyclarr/{1.0.7 => 1.0.8}/migrations/migration_helpers/__init__.py (100%) rename trains/community/recyclarr/{1.0.7 => 1.0.8}/migrations/migration_helpers/cpu.py (100%) rename trains/community/recyclarr/{1.0.7 => 1.0.8}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/recyclarr/{1.0.7 => 1.0.8}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/recyclarr/{1.0.7 => 1.0.8}/migrations/migration_helpers/memory.py (100%) rename trains/community/recyclarr/{1.0.7 => 1.0.8}/migrations/migration_helpers/resources.py (100%) rename trains/community/recyclarr/{1.0.7 => 1.0.8}/migrations/migration_helpers/storage.py (100%) rename trains/community/recyclarr/{1.0.7 => 1.0.8}/questions.yaml (100%) rename trains/community/recyclarr/{1.0.7 => 1.0.8}/templates/docker-compose.yaml (100%) rename trains/community/recyclarr/{1.0.7/templates/library/base_v1_1_3 => 1.0.8/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/recyclarr/{1.0.7/templates/library/base_v1_1_3 => 1.0.8/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/community/recyclarr/1.0.8/templates/library/base_v1_1_4/healthchecks.py rename trains/community/recyclarr/{1.0.7/templates/library/base_v1_1_3 => 1.0.8/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/recyclarr/{1.0.7/templates/library/base_v1_1_3 => 1.0.8/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/recyclarr/{1.0.7/templates/library/base_v1_1_3 => 1.0.8/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/community/recyclarr/1.0.8/templates/library/base_v1_1_4/permissions.py rename trains/community/recyclarr/{1.0.7/templates/library/base_v1_1_3 => 1.0.8/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/recyclarr/{1.0.7/templates/library/base_v1_1_3 => 1.0.8/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/recyclarr/{1.0.7/templates/library/base_v1_1_3 => 1.0.8/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/recyclarr/{1.0.7/templates/library/base_v1_1_3 => 1.0.8/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/recyclarr/{1.0.7/templates/library/base_v1_1_3 => 1.0.8/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/recyclarr/{1.0.7/templates/library/base_v1_1_3 => 1.0.8/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/recyclarr/{1.0.7/templates/library/base_v1_1_3 => 1.0.8/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/recyclarr/{1.0.7 => 1.0.8}/templates/test_values/basic-values.yaml (100%) delete mode 100644 trains/community/redis/1.0.6/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/community/redis/1.0.6/templates/library/base_v1_1_3/permissions.py rename trains/community/redis/{1.0.6 => 1.0.7}/README.md (100%) rename trains/community/redis/{1.0.6 => 1.0.7}/app.yaml (86%) rename trains/community/redis/{1.0.6 => 1.0.7}/ix_values.yaml (100%) rename trains/community/redis/{1.0.6 => 1.0.7}/migrations/migrate_from_kubernetes (100%) rename trains/community/redis/{1.0.6 => 1.0.7}/migrations/migration_helpers/__init__.py (100%) rename trains/community/redis/{1.0.6 => 1.0.7}/migrations/migration_helpers/cpu.py (100%) rename trains/community/redis/{1.0.6 => 1.0.7}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/redis/{1.0.6 => 1.0.7}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/redis/{1.0.6 => 1.0.7}/migrations/migration_helpers/memory.py (100%) rename trains/community/redis/{1.0.6 => 1.0.7}/migrations/migration_helpers/resources.py (100%) rename trains/community/redis/{1.0.6 => 1.0.7}/migrations/migration_helpers/storage.py (100%) rename trains/community/redis/{1.0.6 => 1.0.7}/questions.yaml (100%) rename trains/community/redis/{1.0.6 => 1.0.7}/templates/docker-compose.yaml (100%) rename trains/community/redis/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/redis/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/community/redis/1.0.7/templates/library/base_v1_1_4/healthchecks.py rename trains/community/redis/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/redis/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/redis/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/community/redis/1.0.7/templates/library/base_v1_1_4/permissions.py rename trains/community/redis/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/redis/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/redis/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/redis/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/redis/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/redis/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/redis/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/redis/{1.0.6 => 1.0.7}/templates/test_values/basic-values.yaml (100%) rename trains/community/redis/{1.0.6 => 1.0.7}/templates/test_values/noauth-values.yaml (100%) delete mode 100644 trains/community/roundcube/1.0.6/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/community/roundcube/1.0.6/templates/library/base_v1_1_3/permissions.py rename trains/community/roundcube/{1.0.6 => 1.0.7}/README.md (100%) rename trains/community/roundcube/{1.0.6 => 1.0.7}/app.yaml (93%) rename trains/community/roundcube/{1.0.6 => 1.0.7}/ix_values.yaml (100%) rename trains/community/roundcube/{1.0.6 => 1.0.7}/migrations/migrate_from_kubernetes (100%) rename trains/community/roundcube/{1.0.6 => 1.0.7}/migrations/migration_helpers/__init__.py (100%) rename trains/community/roundcube/{1.0.6 => 1.0.7}/migrations/migration_helpers/cpu.py (100%) rename trains/community/roundcube/{1.0.6 => 1.0.7}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/roundcube/{1.0.6 => 1.0.7}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/roundcube/{1.0.6 => 1.0.7}/migrations/migration_helpers/memory.py (100%) rename trains/community/roundcube/{1.0.6 => 1.0.7}/migrations/migration_helpers/resources.py (100%) rename trains/community/roundcube/{1.0.6 => 1.0.7}/migrations/migration_helpers/storage.py (100%) rename trains/community/roundcube/{1.0.6 => 1.0.7}/questions.yaml (100%) rename trains/community/roundcube/{1.0.6 => 1.0.7}/templates/docker-compose.yaml (100%) rename trains/community/roundcube/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/roundcube/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/community/roundcube/1.0.7/templates/library/base_v1_1_4/healthchecks.py rename trains/community/roundcube/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/roundcube/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/roundcube/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/community/roundcube/1.0.7/templates/library/base_v1_1_4/permissions.py rename trains/community/roundcube/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/roundcube/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/roundcube/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/roundcube/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/roundcube/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/roundcube/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/roundcube/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/roundcube/{1.0.6 => 1.0.7}/templates/test_values/basic-values.yaml (100%) delete mode 100644 trains/community/rsyncd/1.0.13/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/community/rsyncd/1.0.13/templates/library/base_v1_1_3/permissions.py rename trains/community/rsyncd/{1.0.13 => 1.0.14}/README.md (100%) rename trains/community/rsyncd/{1.0.13 => 1.0.14}/app.yaml (91%) rename trains/community/rsyncd/{1.0.13 => 1.0.14}/ix_values.yaml (100%) rename trains/community/rsyncd/{1.0.13 => 1.0.14}/migrations/migrate_from_kubernetes (100%) rename trains/community/rsyncd/{1.0.13 => 1.0.14}/migrations/migration_helpers/__init__.py (100%) rename trains/community/rsyncd/{1.0.13 => 1.0.14}/migrations/migration_helpers/cpu.py (100%) rename trains/community/rsyncd/{1.0.13 => 1.0.14}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/rsyncd/{1.0.13 => 1.0.14}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/rsyncd/{1.0.13 => 1.0.14}/migrations/migration_helpers/memory.py (100%) rename trains/community/rsyncd/{1.0.13 => 1.0.14}/migrations/migration_helpers/resources.py (100%) rename trains/community/rsyncd/{1.0.13 => 1.0.14}/migrations/migration_helpers/storage.py (100%) rename trains/community/rsyncd/{1.0.13 => 1.0.14}/questions.yaml (100%) rename trains/community/rsyncd/{1.0.13 => 1.0.14}/templates/docker-compose.yaml (100%) rename trains/community/rsyncd/{1.0.13/templates/library/base_v1_1_3 => 1.0.14/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/rsyncd/{1.0.13/templates/library/base_v1_1_3 => 1.0.14/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/community/rsyncd/1.0.14/templates/library/base_v1_1_4/healthchecks.py rename trains/community/rsyncd/{1.0.13/templates/library/base_v1_1_3 => 1.0.14/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/rsyncd/{1.0.13/templates/library/base_v1_1_3 => 1.0.14/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/rsyncd/{1.0.13/templates/library/base_v1_1_3 => 1.0.14/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/community/rsyncd/1.0.14/templates/library/base_v1_1_4/permissions.py rename trains/community/rsyncd/{1.0.13/templates/library/base_v1_1_3 => 1.0.14/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/rsyncd/{1.0.13/templates/library/base_v1_1_3 => 1.0.14/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/rsyncd/{1.0.13/templates/library/base_v1_1_3 => 1.0.14/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/rsyncd/{1.0.13/templates/library/base_v1_1_3 => 1.0.14/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/rsyncd/{1.0.13/templates/library/base_v1_1_3 => 1.0.14/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/rsyncd/{1.0.13/templates/library/base_v1_1_3 => 1.0.14/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/rsyncd/{1.0.13/templates/library/base_v1_1_3 => 1.0.14/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/rsyncd/{1.0.13 => 1.0.14}/templates/rsync_macros/rsyncd.conf (100%) rename trains/community/rsyncd/{1.0.13 => 1.0.14}/templates/test_values/basic-values.yaml (100%) rename trains/community/rsyncd/{1.0.13 => 1.0.14}/templates/test_values/hostnet-values.yaml (100%) delete mode 100644 trains/community/rust-desk/1.0.6/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/community/rust-desk/1.0.6/templates/library/base_v1_1_3/permissions.py rename trains/community/rust-desk/{1.0.6 => 1.0.7}/README.md (100%) rename trains/community/rust-desk/{1.0.6 => 1.0.7}/app.yaml (85%) rename trains/community/rust-desk/{1.0.6 => 1.0.7}/ix_values.yaml (100%) rename trains/community/rust-desk/{1.0.6 => 1.0.7}/migrations/migrate_from_kubernetes (100%) rename trains/community/rust-desk/{1.0.6 => 1.0.7}/migrations/migration_helpers/__init__.py (100%) rename trains/community/rust-desk/{1.0.6 => 1.0.7}/migrations/migration_helpers/cpu.py (100%) rename trains/community/rust-desk/{1.0.6 => 1.0.7}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/rust-desk/{1.0.6 => 1.0.7}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/rust-desk/{1.0.6 => 1.0.7}/migrations/migration_helpers/memory.py (100%) rename trains/community/rust-desk/{1.0.6 => 1.0.7}/migrations/migration_helpers/resources.py (100%) rename trains/community/rust-desk/{1.0.6 => 1.0.7}/migrations/migration_helpers/storage.py (100%) rename trains/community/rust-desk/{1.0.6 => 1.0.7}/questions.yaml (100%) rename trains/community/rust-desk/{1.0.6 => 1.0.7}/templates/docker-compose.yaml (100%) rename trains/community/rust-desk/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/rust-desk/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/community/rust-desk/1.0.7/templates/library/base_v1_1_4/healthchecks.py rename trains/community/rust-desk/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/rust-desk/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/rust-desk/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/community/rust-desk/1.0.7/templates/library/base_v1_1_4/permissions.py rename trains/community/rust-desk/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/rust-desk/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/rust-desk/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/rust-desk/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/rust-desk/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/rust-desk/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/rust-desk/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/rust-desk/{1.0.6 => 1.0.7}/templates/test_values/basic-values.yaml (100%) delete mode 100644 trains/community/sabnzbd/1.0.6/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/community/sabnzbd/1.0.6/templates/library/base_v1_1_3/permissions.py rename trains/community/sabnzbd/{1.0.6 => 1.0.7}/README.md (100%) rename trains/community/sabnzbd/{1.0.6 => 1.0.7}/app.yaml (88%) rename trains/community/sabnzbd/{1.0.6 => 1.0.7}/ix_values.yaml (100%) rename trains/community/sabnzbd/{1.0.6 => 1.0.7}/migrations/migrate_from_kubernetes (100%) rename trains/community/sabnzbd/{1.0.6 => 1.0.7}/migrations/migration_helpers/__init__.py (100%) rename trains/community/sabnzbd/{1.0.6 => 1.0.7}/migrations/migration_helpers/cpu.py (100%) rename trains/community/sabnzbd/{1.0.6 => 1.0.7}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/sabnzbd/{1.0.6 => 1.0.7}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/sabnzbd/{1.0.6 => 1.0.7}/migrations/migration_helpers/memory.py (100%) rename trains/community/sabnzbd/{1.0.6 => 1.0.7}/migrations/migration_helpers/resources.py (100%) rename trains/community/sabnzbd/{1.0.6 => 1.0.7}/migrations/migration_helpers/storage.py (100%) rename trains/community/sabnzbd/{1.0.6 => 1.0.7}/questions.yaml (100%) rename trains/community/sabnzbd/{1.0.6 => 1.0.7}/templates/docker-compose.yaml (100%) rename trains/community/sabnzbd/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/sabnzbd/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/community/sabnzbd/1.0.7/templates/library/base_v1_1_4/healthchecks.py rename trains/community/sabnzbd/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/sabnzbd/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/sabnzbd/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/community/sabnzbd/1.0.7/templates/library/base_v1_1_4/permissions.py rename trains/community/sabnzbd/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/sabnzbd/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/sabnzbd/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/sabnzbd/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/sabnzbd/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/sabnzbd/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/sabnzbd/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/sabnzbd/{1.0.6 => 1.0.7}/templates/test_values/basic-values.yaml (100%) delete mode 100644 trains/community/searxng/1.0.15/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/community/searxng/1.0.15/templates/library/base_v1_1_3/permissions.py rename trains/community/searxng/{1.0.15 => 1.0.16}/README.md (100%) rename trains/community/searxng/{1.0.15 => 1.0.16}/app.yaml (87%) rename trains/community/searxng/{1.0.15 => 1.0.16}/ix_values.yaml (100%) rename trains/community/searxng/{1.0.15 => 1.0.16}/migrations/migrate_from_kubernetes (100%) rename trains/community/searxng/{1.0.15 => 1.0.16}/migrations/migration_helpers/__init__.py (100%) rename trains/community/searxng/{1.0.15 => 1.0.16}/migrations/migration_helpers/cpu.py (100%) rename trains/community/searxng/{1.0.15 => 1.0.16}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/searxng/{1.0.15 => 1.0.16}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/searxng/{1.0.15 => 1.0.16}/migrations/migration_helpers/memory.py (100%) rename trains/community/searxng/{1.0.15 => 1.0.16}/migrations/migration_helpers/resources.py (100%) rename trains/community/searxng/{1.0.15 => 1.0.16}/migrations/migration_helpers/storage.py (100%) rename trains/community/searxng/{1.0.15 => 1.0.16}/questions.yaml (100%) rename trains/community/searxng/{1.0.15 => 1.0.16}/templates/docker-compose.yaml (100%) rename trains/community/searxng/{1.0.15/templates/library/base_v1_1_3 => 1.0.16/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/searxng/{1.0.15/templates/library/base_v1_1_3 => 1.0.16/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/community/searxng/1.0.16/templates/library/base_v1_1_4/healthchecks.py rename trains/community/searxng/{1.0.15/templates/library/base_v1_1_3 => 1.0.16/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/searxng/{1.0.15/templates/library/base_v1_1_3 => 1.0.16/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/searxng/{1.0.15/templates/library/base_v1_1_3 => 1.0.16/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/community/searxng/1.0.16/templates/library/base_v1_1_4/permissions.py rename trains/community/searxng/{1.0.15/templates/library/base_v1_1_3 => 1.0.16/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/searxng/{1.0.15/templates/library/base_v1_1_3 => 1.0.16/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/searxng/{1.0.15/templates/library/base_v1_1_3 => 1.0.16/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/searxng/{1.0.15/templates/library/base_v1_1_3 => 1.0.16/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/searxng/{1.0.15/templates/library/base_v1_1_3 => 1.0.16/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/searxng/{1.0.15/templates/library/base_v1_1_3 => 1.0.16/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/searxng/{1.0.15/templates/library/base_v1_1_3 => 1.0.16/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/searxng/{1.0.15 => 1.0.16}/templates/test_values/basic-values.yaml (100%) delete mode 100644 trains/community/sftpgo/1.0.6/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/community/sftpgo/1.0.6/templates/library/base_v1_1_3/permissions.py rename trains/community/sftpgo/{1.0.6 => 1.0.7}/README.md (100%) rename trains/community/sftpgo/{1.0.6 => 1.0.7}/app.yaml (86%) rename trains/community/sftpgo/{1.0.6 => 1.0.7}/ix_values.yaml (100%) rename trains/community/sftpgo/{1.0.6 => 1.0.7}/migrations/migrate_from_kubernetes (100%) rename trains/community/sftpgo/{1.0.6 => 1.0.7}/migrations/migration_helpers/__init__.py (100%) rename trains/community/sftpgo/{1.0.6 => 1.0.7}/migrations/migration_helpers/cpu.py (100%) rename trains/community/sftpgo/{1.0.6 => 1.0.7}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/sftpgo/{1.0.6 => 1.0.7}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/sftpgo/{1.0.6 => 1.0.7}/migrations/migration_helpers/memory.py (100%) rename trains/community/sftpgo/{1.0.6 => 1.0.7}/migrations/migration_helpers/resources.py (100%) rename trains/community/sftpgo/{1.0.6 => 1.0.7}/migrations/migration_helpers/storage.py (100%) rename trains/community/sftpgo/{1.0.6 => 1.0.7}/questions.yaml (100%) rename trains/community/sftpgo/{1.0.6 => 1.0.7}/templates/docker-compose.yaml (100%) rename trains/community/sftpgo/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/sftpgo/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/community/sftpgo/1.0.7/templates/library/base_v1_1_4/healthchecks.py rename trains/community/sftpgo/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/sftpgo/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/sftpgo/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/community/sftpgo/1.0.7/templates/library/base_v1_1_4/permissions.py rename trains/community/sftpgo/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/sftpgo/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/sftpgo/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/sftpgo/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/sftpgo/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/sftpgo/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/sftpgo/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/sftpgo/{1.0.6 => 1.0.7}/templates/test_values/basic-values.yaml (100%) rename trains/community/sftpgo/{1.0.6 => 1.0.7}/templates/test_values/https-values.yaml (100%) rename trains/community/sftpgo/{1.0.6 => 1.0.7}/templates/test_values/plugins-values.yaml (100%) delete mode 100644 trains/community/sonarr/1.0.18/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/community/sonarr/1.0.18/templates/library/base_v1_1_3/permissions.py rename trains/community/sonarr/{1.0.18 => 1.0.19}/README.md (100%) rename trains/community/sonarr/{1.0.18 => 1.0.19}/app.yaml (87%) rename trains/community/sonarr/{1.0.18 => 1.0.19}/ix_values.yaml (100%) rename trains/community/sonarr/{1.0.18 => 1.0.19}/migrations/migrate_from_kubernetes (100%) rename trains/community/sonarr/{1.0.18 => 1.0.19}/migrations/migration_helpers/__init__.py (100%) rename trains/community/sonarr/{1.0.18 => 1.0.19}/migrations/migration_helpers/cpu.py (100%) rename trains/community/sonarr/{1.0.18 => 1.0.19}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/sonarr/{1.0.18 => 1.0.19}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/sonarr/{1.0.18 => 1.0.19}/migrations/migration_helpers/memory.py (100%) rename trains/community/sonarr/{1.0.18 => 1.0.19}/migrations/migration_helpers/resources.py (100%) rename trains/community/sonarr/{1.0.18 => 1.0.19}/migrations/migration_helpers/storage.py (100%) rename trains/community/sonarr/{1.0.18 => 1.0.19}/questions.yaml (100%) rename trains/community/sonarr/{1.0.18 => 1.0.19}/templates/docker-compose.yaml (100%) rename trains/community/sonarr/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/sonarr/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/community/sonarr/1.0.19/templates/library/base_v1_1_4/healthchecks.py rename trains/community/sonarr/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/sonarr/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/sonarr/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/community/sonarr/1.0.19/templates/library/base_v1_1_4/permissions.py rename trains/community/sonarr/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/sonarr/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/sonarr/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/sonarr/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/sonarr/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/sonarr/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/sonarr/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/sonarr/{1.0.18 => 1.0.19}/templates/test_values/basic-values.yaml (100%) delete mode 100644 trains/community/tailscale/1.1.14/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/community/tailscale/1.1.14/templates/library/base_v1_1_3/permissions.py rename trains/community/tailscale/{1.1.14 => 1.1.15}/README.md (100%) rename trains/community/tailscale/{1.1.14 => 1.1.15}/app.yaml (90%) rename trains/community/tailscale/{1.1.14 => 1.1.15}/ix_values.yaml (100%) rename trains/community/tailscale/{1.1.14 => 1.1.15}/migrations/migrate_from_kubernetes (100%) rename trains/community/tailscale/{1.1.14 => 1.1.15}/migrations/migration_helpers/__init__.py (100%) rename trains/community/tailscale/{1.1.14 => 1.1.15}/migrations/migration_helpers/cpu.py (100%) rename trains/community/tailscale/{1.1.14 => 1.1.15}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/tailscale/{1.1.14 => 1.1.15}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/tailscale/{1.1.14 => 1.1.15}/migrations/migration_helpers/memory.py (100%) rename trains/community/tailscale/{1.1.14 => 1.1.15}/migrations/migration_helpers/resources.py (100%) rename trains/community/tailscale/{1.1.14 => 1.1.15}/migrations/migration_helpers/storage.py (100%) rename trains/community/tailscale/{1.1.14 => 1.1.15}/questions.yaml (100%) rename trains/community/tailscale/{1.1.14 => 1.1.15}/templates/docker-compose.yaml (100%) rename trains/community/tailscale/{1.1.14/templates/library/base_v1_1_3 => 1.1.15/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/tailscale/{1.1.14/templates/library/base_v1_1_3 => 1.1.15/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/community/tailscale/1.1.15/templates/library/base_v1_1_4/healthchecks.py rename trains/community/tailscale/{1.1.14/templates/library/base_v1_1_3 => 1.1.15/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/tailscale/{1.1.14/templates/library/base_v1_1_3 => 1.1.15/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/tailscale/{1.1.14/templates/library/base_v1_1_3 => 1.1.15/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/community/tailscale/1.1.15/templates/library/base_v1_1_4/permissions.py rename trains/community/tailscale/{1.1.14/templates/library/base_v1_1_3 => 1.1.15/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/tailscale/{1.1.14/templates/library/base_v1_1_3 => 1.1.15/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/tailscale/{1.1.14/templates/library/base_v1_1_3 => 1.1.15/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/tailscale/{1.1.14/templates/library/base_v1_1_3 => 1.1.15/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/tailscale/{1.1.14/templates/library/base_v1_1_3 => 1.1.15/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/tailscale/{1.1.14/templates/library/base_v1_1_3 => 1.1.15/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/tailscale/{1.1.14/templates/library/base_v1_1_3 => 1.1.15/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/tailscale/{1.1.14/templates/library/community/tailscale/v1_1_14 => 1.1.15/templates/library/community/tailscale/v1_1_15}/util.py (93%) rename trains/community/tailscale/{1.1.14 => 1.1.15}/templates/test_values/basic-values.yaml (100%) delete mode 100644 trains/community/tautulli/1.0.20/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/community/tautulli/1.0.20/templates/library/base_v1_1_3/permissions.py rename trains/community/tautulli/{1.0.20 => 1.0.21}/README.md (100%) rename trains/community/tautulli/{1.0.20 => 1.0.21}/app.yaml (89%) rename trains/community/tautulli/{1.0.20 => 1.0.21}/ix_values.yaml (100%) rename trains/community/tautulli/{1.0.20 => 1.0.21}/migrations/migrate_from_kubernetes (100%) rename trains/community/tautulli/{1.0.20 => 1.0.21}/migrations/migration_helpers/__init__.py (100%) rename trains/community/tautulli/{1.0.20 => 1.0.21}/migrations/migration_helpers/cpu.py (100%) rename trains/community/tautulli/{1.0.20 => 1.0.21}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/tautulli/{1.0.20 => 1.0.21}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/tautulli/{1.0.20 => 1.0.21}/migrations/migration_helpers/memory.py (100%) rename trains/community/tautulli/{1.0.20 => 1.0.21}/migrations/migration_helpers/resources.py (100%) rename trains/community/tautulli/{1.0.20 => 1.0.21}/migrations/migration_helpers/storage.py (100%) rename trains/community/tautulli/{1.0.20 => 1.0.21}/questions.yaml (100%) rename trains/community/tautulli/{1.0.20 => 1.0.21}/templates/docker-compose.yaml (100%) rename trains/community/tautulli/{1.0.20/templates/library/base_v1_1_3 => 1.0.21/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/tautulli/{1.0.20/templates/library/base_v1_1_3 => 1.0.21/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/community/tautulli/1.0.21/templates/library/base_v1_1_4/healthchecks.py rename trains/community/tautulli/{1.0.20/templates/library/base_v1_1_3 => 1.0.21/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/tautulli/{1.0.20/templates/library/base_v1_1_3 => 1.0.21/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/tautulli/{1.0.20/templates/library/base_v1_1_3 => 1.0.21/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/community/tautulli/1.0.21/templates/library/base_v1_1_4/permissions.py rename trains/community/tautulli/{1.0.20/templates/library/base_v1_1_3 => 1.0.21/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/tautulli/{1.0.20/templates/library/base_v1_1_3 => 1.0.21/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/tautulli/{1.0.20/templates/library/base_v1_1_3 => 1.0.21/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/tautulli/{1.0.20/templates/library/base_v1_1_3 => 1.0.21/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/tautulli/{1.0.20/templates/library/base_v1_1_3 => 1.0.21/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/tautulli/{1.0.20/templates/library/base_v1_1_3 => 1.0.21/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/tautulli/{1.0.20/templates/library/base_v1_1_3 => 1.0.21/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/tautulli/{1.0.20 => 1.0.21}/templates/test_values/basic-values.yaml (100%) delete mode 100644 trains/community/tdarr/1.0.8/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/community/tdarr/1.0.8/templates/library/base_v1_1_3/permissions.py rename trains/community/tdarr/{1.0.8 => 1.0.9}/README.md (100%) rename trains/community/tdarr/{1.0.8 => 1.0.9}/app.yaml (90%) rename trains/community/tdarr/{1.0.8 => 1.0.9}/ix_values.yaml (100%) rename trains/community/tdarr/{1.0.8 => 1.0.9}/migrations/migrate_from_kubernetes (100%) rename trains/community/tdarr/{1.0.8 => 1.0.9}/migrations/migration_helpers/__init__.py (100%) rename trains/community/tdarr/{1.0.8 => 1.0.9}/migrations/migration_helpers/cpu.py (100%) rename trains/community/tdarr/{1.0.8 => 1.0.9}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/tdarr/{1.0.8 => 1.0.9}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/tdarr/{1.0.8 => 1.0.9}/migrations/migration_helpers/memory.py (100%) rename trains/community/tdarr/{1.0.8 => 1.0.9}/migrations/migration_helpers/resources.py (100%) rename trains/community/tdarr/{1.0.8 => 1.0.9}/migrations/migration_helpers/storage.py (100%) rename trains/community/tdarr/{1.0.8 => 1.0.9}/questions.yaml (100%) rename trains/community/tdarr/{1.0.8 => 1.0.9}/templates/docker-compose.yaml (100%) rename trains/community/tdarr/{1.0.8/templates/library/base_v1_1_3 => 1.0.9/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/tdarr/{1.0.8/templates/library/base_v1_1_3 => 1.0.9/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/community/tdarr/1.0.9/templates/library/base_v1_1_4/healthchecks.py rename trains/community/tdarr/{1.0.8/templates/library/base_v1_1_3 => 1.0.9/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/tdarr/{1.0.8/templates/library/base_v1_1_3 => 1.0.9/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/tdarr/{1.0.8/templates/library/base_v1_1_3 => 1.0.9/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/community/tdarr/1.0.9/templates/library/base_v1_1_4/permissions.py rename trains/community/tdarr/{1.0.8/templates/library/base_v1_1_3 => 1.0.9/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/tdarr/{1.0.8/templates/library/base_v1_1_3 => 1.0.9/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/tdarr/{1.0.8/templates/library/base_v1_1_3 => 1.0.9/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/tdarr/{1.0.8/templates/library/base_v1_1_3 => 1.0.9/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/tdarr/{1.0.8/templates/library/base_v1_1_3 => 1.0.9/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/tdarr/{1.0.8/templates/library/base_v1_1_3 => 1.0.9/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/tdarr/{1.0.8/templates/library/base_v1_1_3 => 1.0.9/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/tdarr/{1.0.8 => 1.0.9}/templates/test_values/basic-values.yaml (100%) delete mode 100644 trains/community/terraria/1.0.5/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/community/terraria/1.0.5/templates/library/base_v1_1_3/permissions.py rename trains/community/terraria/{1.0.5 => 1.0.6}/README.md (100%) rename trains/community/terraria/{1.0.5 => 1.0.6}/app.yaml (85%) rename trains/community/terraria/{1.0.5 => 1.0.6}/ix_values.yaml (100%) rename trains/community/terraria/{1.0.5 => 1.0.6}/migrations/migrate_from_kubernetes (100%) rename trains/community/terraria/{1.0.5 => 1.0.6}/migrations/migration_helpers/__init__.py (100%) rename trains/community/terraria/{1.0.5 => 1.0.6}/migrations/migration_helpers/cpu.py (100%) rename trains/community/terraria/{1.0.5 => 1.0.6}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/terraria/{1.0.5 => 1.0.6}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/terraria/{1.0.5 => 1.0.6}/migrations/migration_helpers/memory.py (100%) rename trains/community/terraria/{1.0.5 => 1.0.6}/migrations/migration_helpers/resources.py (100%) rename trains/community/terraria/{1.0.5 => 1.0.6}/migrations/migration_helpers/storage.py (100%) rename trains/community/terraria/{1.0.5 => 1.0.6}/questions.yaml (100%) rename trains/community/terraria/{1.0.5 => 1.0.6}/templates/docker-compose.yaml (100%) rename trains/community/terraria/{1.0.5/templates/library/base_v1_1_3 => 1.0.6/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/terraria/{1.0.5/templates/library/base_v1_1_3 => 1.0.6/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/community/terraria/1.0.6/templates/library/base_v1_1_4/healthchecks.py rename trains/community/terraria/{1.0.5/templates/library/base_v1_1_3 => 1.0.6/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/terraria/{1.0.5/templates/library/base_v1_1_3 => 1.0.6/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/terraria/{1.0.5/templates/library/base_v1_1_3 => 1.0.6/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/community/terraria/1.0.6/templates/library/base_v1_1_4/permissions.py rename trains/community/terraria/{1.0.5/templates/library/base_v1_1_3 => 1.0.6/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/terraria/{1.0.5/templates/library/base_v1_1_3 => 1.0.6/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/terraria/{1.0.5/templates/library/base_v1_1_3 => 1.0.6/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/terraria/{1.0.5/templates/library/base_v1_1_3 => 1.0.6/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/terraria/{1.0.5/templates/library/base_v1_1_3 => 1.0.6/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/terraria/{1.0.5/templates/library/base_v1_1_3 => 1.0.6/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/terraria/{1.0.5/templates/library/base_v1_1_3 => 1.0.6/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/terraria/{1.0.5 => 1.0.6}/templates/test_values/basic-values.yaml (100%) rename trains/community/terraria/{1.0.5 => 1.0.6}/templates/test_values/password-values.yaml (100%) rename trains/community/terraria/{1.0.5 => 1.0.6}/templates/test_values/vanilla-values.yaml (100%) rename trains/community/tftpd-hpa/{1.0.9 => 1.0.10}/README.md (100%) rename trains/community/tftpd-hpa/{1.0.9 => 1.0.10}/app.yaml (90%) rename trains/community/tftpd-hpa/{1.0.9 => 1.0.10}/ix_values.yaml (100%) rename trains/community/tftpd-hpa/{1.0.9 => 1.0.10}/migrations/migrate_from_kubernetes (100%) rename trains/community/tftpd-hpa/{1.0.9 => 1.0.10}/migrations/migration_helpers/__init__.py (100%) rename trains/community/tftpd-hpa/{1.0.9 => 1.0.10}/migrations/migration_helpers/cpu.py (100%) rename trains/community/tftpd-hpa/{1.0.9 => 1.0.10}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/tftpd-hpa/{1.0.9 => 1.0.10}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/tftpd-hpa/{1.0.9 => 1.0.10}/migrations/migration_helpers/memory.py (100%) rename trains/community/tftpd-hpa/{1.0.9 => 1.0.10}/migrations/migration_helpers/resources.py (100%) rename trains/community/tftpd-hpa/{1.0.9 => 1.0.10}/migrations/migration_helpers/storage.py (100%) rename trains/community/tftpd-hpa/{1.0.9 => 1.0.10}/questions.yaml (100%) rename trains/community/tftpd-hpa/{1.0.9 => 1.0.10}/templates/docker-compose.yaml (100%) rename trains/community/tftpd-hpa/{1.0.9/templates/library/base_v1_1_3 => 1.0.10/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/tftpd-hpa/{1.0.9/templates/library/base_v1_1_3 => 1.0.10/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/community/tftpd-hpa/1.0.10/templates/library/base_v1_1_4/healthchecks.py rename trains/community/tftpd-hpa/{1.0.9/templates/library/base_v1_1_3 => 1.0.10/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/tftpd-hpa/{1.0.9/templates/library/base_v1_1_3 => 1.0.10/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/tftpd-hpa/{1.0.9/templates/library/base_v1_1_3 => 1.0.10/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/community/tftpd-hpa/1.0.10/templates/library/base_v1_1_4/permissions.py rename trains/community/tftpd-hpa/{1.0.9/templates/library/base_v1_1_3 => 1.0.10/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/tftpd-hpa/{1.0.9/templates/library/base_v1_1_3 => 1.0.10/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/tftpd-hpa/{1.0.9/templates/library/base_v1_1_3 => 1.0.10/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/tftpd-hpa/{1.0.9/templates/library/base_v1_1_3 => 1.0.10/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/tftpd-hpa/{1.0.9/templates/library/base_v1_1_3 => 1.0.10/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/tftpd-hpa/{1.0.9/templates/library/base_v1_1_3 => 1.0.10/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/tftpd-hpa/{1.0.9/templates/library/base_v1_1_3 => 1.0.10/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/tftpd-hpa/{1.0.9 => 1.0.10}/templates/test_values/create-values.yaml (100%) rename trains/community/tftpd-hpa/{1.0.9 => 1.0.10}/templates/test_values/readonly-values.yaml (100%) delete mode 100644 trains/community/tftpd-hpa/1.0.9/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/community/tftpd-hpa/1.0.9/templates/library/base_v1_1_3/permissions.py delete mode 100644 trains/community/tiny-media-manager/1.0.5/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/community/tiny-media-manager/1.0.5/templates/library/base_v1_1_3/permissions.py rename trains/community/tiny-media-manager/{1.0.5 => 1.0.6}/README.md (100%) rename trains/community/tiny-media-manager/{1.0.5 => 1.0.6}/app.yaml (91%) rename trains/community/tiny-media-manager/{1.0.5 => 1.0.6}/ix_values.yaml (100%) rename trains/community/tiny-media-manager/{1.0.5 => 1.0.6}/migrations/migrate_from_kubernetes (100%) rename trains/community/tiny-media-manager/{1.0.5 => 1.0.6}/migrations/migration_helpers/__init__.py (100%) rename trains/community/tiny-media-manager/{1.0.5 => 1.0.6}/migrations/migration_helpers/cpu.py (100%) rename trains/community/tiny-media-manager/{1.0.5 => 1.0.6}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/tiny-media-manager/{1.0.5 => 1.0.6}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/tiny-media-manager/{1.0.5 => 1.0.6}/migrations/migration_helpers/memory.py (100%) rename trains/community/tiny-media-manager/{1.0.5 => 1.0.6}/migrations/migration_helpers/resources.py (100%) rename trains/community/tiny-media-manager/{1.0.5 => 1.0.6}/migrations/migration_helpers/storage.py (100%) rename trains/community/tiny-media-manager/{1.0.5 => 1.0.6}/questions.yaml (100%) rename trains/community/tiny-media-manager/{1.0.5 => 1.0.6}/templates/docker-compose.yaml (100%) rename trains/community/tiny-media-manager/{1.0.5/templates/library/base_v1_1_3 => 1.0.6/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/tiny-media-manager/{1.0.5/templates/library/base_v1_1_3 => 1.0.6/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/community/tiny-media-manager/1.0.6/templates/library/base_v1_1_4/healthchecks.py rename trains/community/tiny-media-manager/{1.0.5/templates/library/base_v1_1_3 => 1.0.6/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/tiny-media-manager/{1.0.5/templates/library/base_v1_1_3 => 1.0.6/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/tiny-media-manager/{1.0.5/templates/library/base_v1_1_3 => 1.0.6/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/community/tiny-media-manager/1.0.6/templates/library/base_v1_1_4/permissions.py rename trains/community/tiny-media-manager/{1.0.5/templates/library/base_v1_1_3 => 1.0.6/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/tiny-media-manager/{1.0.5/templates/library/base_v1_1_3 => 1.0.6/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/tiny-media-manager/{1.0.5/templates/library/base_v1_1_3 => 1.0.6/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/tiny-media-manager/{1.0.5/templates/library/base_v1_1_3 => 1.0.6/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/tiny-media-manager/{1.0.5/templates/library/base_v1_1_3 => 1.0.6/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/tiny-media-manager/{1.0.5/templates/library/base_v1_1_3 => 1.0.6/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/tiny-media-manager/{1.0.5/templates/library/base_v1_1_3 => 1.0.6/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/tiny-media-manager/{1.0.5 => 1.0.6}/templates/test_values/basic-values.yaml (100%) delete mode 100644 trains/community/transmission/1.0.5/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/community/transmission/1.0.5/templates/library/base_v1_1_3/permissions.py rename trains/community/transmission/{1.0.5 => 1.0.6}/README.md (100%) rename trains/community/transmission/{1.0.5 => 1.0.6}/app.yaml (84%) rename trains/community/transmission/{1.0.5 => 1.0.6}/ix_values.yaml (100%) rename trains/community/transmission/{1.0.5 => 1.0.6}/migrations/migrate_from_kubernetes (100%) rename trains/community/transmission/{1.0.5 => 1.0.6}/migrations/migration_helpers/__init__.py (100%) rename trains/community/transmission/{1.0.5 => 1.0.6}/migrations/migration_helpers/cpu.py (100%) rename trains/community/transmission/{1.0.5 => 1.0.6}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/transmission/{1.0.5 => 1.0.6}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/transmission/{1.0.5 => 1.0.6}/migrations/migration_helpers/memory.py (100%) rename trains/community/transmission/{1.0.5 => 1.0.6}/migrations/migration_helpers/resources.py (100%) rename trains/community/transmission/{1.0.5 => 1.0.6}/migrations/migration_helpers/storage.py (100%) rename trains/community/transmission/{1.0.5 => 1.0.6}/questions.yaml (100%) rename trains/community/transmission/{1.0.5 => 1.0.6}/templates/docker-compose.yaml (100%) rename trains/community/transmission/{1.0.5/templates/library/base_v1_1_3 => 1.0.6/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/transmission/{1.0.5/templates/library/base_v1_1_3 => 1.0.6/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/community/transmission/1.0.6/templates/library/base_v1_1_4/healthchecks.py rename trains/community/transmission/{1.0.5/templates/library/base_v1_1_3 => 1.0.6/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/transmission/{1.0.5/templates/library/base_v1_1_3 => 1.0.6/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/transmission/{1.0.5/templates/library/base_v1_1_3 => 1.0.6/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/community/transmission/1.0.6/templates/library/base_v1_1_4/permissions.py rename trains/community/transmission/{1.0.5/templates/library/base_v1_1_3 => 1.0.6/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/transmission/{1.0.5/templates/library/base_v1_1_3 => 1.0.6/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/transmission/{1.0.5/templates/library/base_v1_1_3 => 1.0.6/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/transmission/{1.0.5/templates/library/base_v1_1_3 => 1.0.6/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/transmission/{1.0.5/templates/library/base_v1_1_3 => 1.0.6/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/transmission/{1.0.5/templates/library/base_v1_1_3 => 1.0.6/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/transmission/{1.0.5/templates/library/base_v1_1_3 => 1.0.6/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/transmission/{1.0.5 => 1.0.6}/templates/macros/setup.sh (100%) rename trains/community/transmission/{1.0.5 => 1.0.6}/templates/test_values/basic-values.yaml (100%) delete mode 100644 trains/community/twofactor-auth/1.0.6/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/community/twofactor-auth/1.0.6/templates/library/base_v1_1_3/permissions.py rename trains/community/twofactor-auth/{1.0.6 => 1.0.7}/README.md (100%) rename trains/community/twofactor-auth/{1.0.6 => 1.0.7}/app.yaml (87%) rename trains/community/twofactor-auth/{1.0.6 => 1.0.7}/ix_values.yaml (100%) rename trains/community/twofactor-auth/{1.0.6 => 1.0.7}/migrations/migrate_from_kubernetes (100%) rename trains/community/twofactor-auth/{1.0.6 => 1.0.7}/migrations/migration_helpers/__init__.py (100%) rename trains/community/twofactor-auth/{1.0.6 => 1.0.7}/migrations/migration_helpers/cpu.py (100%) rename trains/community/twofactor-auth/{1.0.6 => 1.0.7}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/twofactor-auth/{1.0.6 => 1.0.7}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/twofactor-auth/{1.0.6 => 1.0.7}/migrations/migration_helpers/memory.py (100%) rename trains/community/twofactor-auth/{1.0.6 => 1.0.7}/migrations/migration_helpers/resources.py (100%) rename trains/community/twofactor-auth/{1.0.6 => 1.0.7}/migrations/migration_helpers/storage.py (100%) rename trains/community/twofactor-auth/{1.0.6 => 1.0.7}/questions.yaml (100%) rename trains/community/twofactor-auth/{1.0.6 => 1.0.7}/templates/docker-compose.yaml (100%) rename trains/community/twofactor-auth/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/twofactor-auth/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/community/twofactor-auth/1.0.7/templates/library/base_v1_1_4/healthchecks.py rename trains/community/twofactor-auth/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/twofactor-auth/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/twofactor-auth/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/community/twofactor-auth/1.0.7/templates/library/base_v1_1_4/permissions.py rename trains/community/twofactor-auth/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/twofactor-auth/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/twofactor-auth/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/twofactor-auth/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/twofactor-auth/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/twofactor-auth/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/twofactor-auth/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/twofactor-auth/{1.0.6 => 1.0.7}/templates/test_values/basic-values.yaml (100%) rename trains/community/twofactor-auth/{1.0.6 => 1.0.7}/templates/test_values/reverse-proxy-guard-values.yaml (100%) delete mode 100644 trains/community/unifi-controller/1.2.10/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/community/unifi-controller/1.2.10/templates/library/base_v1_1_3/permissions.py rename trains/community/unifi-controller/{1.2.10 => 1.2.11}/README.md (100%) rename trains/community/unifi-controller/{1.2.10 => 1.2.11}/app.yaml (87%) rename trains/community/unifi-controller/{1.2.10 => 1.2.11}/ix_values.yaml (100%) rename trains/community/unifi-controller/{1.2.10 => 1.2.11}/migrations/migrate_from_kubernetes (100%) rename trains/community/unifi-controller/{1.2.10 => 1.2.11}/migrations/migration_helpers/__init__.py (100%) rename trains/community/unifi-controller/{1.2.10 => 1.2.11}/migrations/migration_helpers/cpu.py (100%) rename trains/community/unifi-controller/{1.2.10 => 1.2.11}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/unifi-controller/{1.2.10 => 1.2.11}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/unifi-controller/{1.2.10 => 1.2.11}/migrations/migration_helpers/memory.py (100%) rename trains/community/unifi-controller/{1.2.10 => 1.2.11}/migrations/migration_helpers/resources.py (100%) rename trains/community/unifi-controller/{1.2.10 => 1.2.11}/migrations/migration_helpers/storage.py (100%) rename trains/community/unifi-controller/{1.2.10 => 1.2.11}/questions.yaml (100%) rename trains/community/unifi-controller/{1.2.10 => 1.2.11}/templates/docker-compose.yaml (100%) rename trains/community/unifi-controller/{1.2.10/templates/library/base_v1_1_3 => 1.2.11/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/unifi-controller/{1.2.10/templates/library/base_v1_1_3 => 1.2.11/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/community/unifi-controller/1.2.11/templates/library/base_v1_1_4/healthchecks.py rename trains/community/unifi-controller/{1.2.10/templates/library/base_v1_1_3 => 1.2.11/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/unifi-controller/{1.2.10/templates/library/base_v1_1_3 => 1.2.11/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/unifi-controller/{1.2.10/templates/library/base_v1_1_3 => 1.2.11/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/community/unifi-controller/1.2.11/templates/library/base_v1_1_4/permissions.py rename trains/community/unifi-controller/{1.2.10/templates/library/base_v1_1_3 => 1.2.11/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/unifi-controller/{1.2.10/templates/library/base_v1_1_3 => 1.2.11/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/unifi-controller/{1.2.10/templates/library/base_v1_1_3 => 1.2.11/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/unifi-controller/{1.2.10/templates/library/base_v1_1_3 => 1.2.11/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/unifi-controller/{1.2.10/templates/library/base_v1_1_3 => 1.2.11/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/unifi-controller/{1.2.10/templates/library/base_v1_1_3 => 1.2.11/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/unifi-controller/{1.2.10/templates/library/base_v1_1_3 => 1.2.11/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/unifi-controller/{1.2.10 => 1.2.11}/templates/test_values/basic-values.yaml (100%) rename trains/community/unifi-controller/{1.2.10 => 1.2.11}/templates/test_values/https-values.yaml (100%) delete mode 100644 trains/community/unifi-protect-backup/1.0.16/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/community/unifi-protect-backup/1.0.16/templates/library/base_v1_1_3/permissions.py rename trains/community/unifi-protect-backup/{1.0.16 => 1.0.17}/README.md (100%) rename trains/community/unifi-protect-backup/{1.0.16 => 1.0.17}/app.yaml (90%) rename trains/community/unifi-protect-backup/{1.0.16 => 1.0.17}/ix_values.yaml (100%) rename trains/community/unifi-protect-backup/{1.0.16 => 1.0.17}/migrations/migrate_from_kubernetes (100%) rename trains/community/unifi-protect-backup/{1.0.16 => 1.0.17}/migrations/migration_helpers/__init__.py (100%) rename trains/community/unifi-protect-backup/{1.0.16 => 1.0.17}/migrations/migration_helpers/cpu.py (100%) rename trains/community/unifi-protect-backup/{1.0.16 => 1.0.17}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/unifi-protect-backup/{1.0.16 => 1.0.17}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/unifi-protect-backup/{1.0.16 => 1.0.17}/migrations/migration_helpers/memory.py (100%) rename trains/community/unifi-protect-backup/{1.0.16 => 1.0.17}/migrations/migration_helpers/resources.py (100%) rename trains/community/unifi-protect-backup/{1.0.16 => 1.0.17}/migrations/migration_helpers/storage.py (100%) rename trains/community/unifi-protect-backup/{1.0.16 => 1.0.17}/questions.yaml (100%) rename trains/community/unifi-protect-backup/{1.0.16 => 1.0.17}/templates/docker-compose.yaml (100%) rename trains/community/unifi-protect-backup/{1.0.16/templates/library/base_v1_1_3 => 1.0.17/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/unifi-protect-backup/{1.0.16/templates/library/base_v1_1_3 => 1.0.17/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/community/unifi-protect-backup/1.0.17/templates/library/base_v1_1_4/healthchecks.py rename trains/community/unifi-protect-backup/{1.0.16/templates/library/base_v1_1_3 => 1.0.17/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/unifi-protect-backup/{1.0.16/templates/library/base_v1_1_3 => 1.0.17/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/unifi-protect-backup/{1.0.16/templates/library/base_v1_1_3 => 1.0.17/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/community/unifi-protect-backup/1.0.17/templates/library/base_v1_1_4/permissions.py rename trains/community/unifi-protect-backup/{1.0.16/templates/library/base_v1_1_3 => 1.0.17/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/unifi-protect-backup/{1.0.16/templates/library/base_v1_1_3 => 1.0.17/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/unifi-protect-backup/{1.0.16/templates/library/base_v1_1_3 => 1.0.17/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/unifi-protect-backup/{1.0.16/templates/library/base_v1_1_3 => 1.0.17/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/unifi-protect-backup/{1.0.16/templates/library/base_v1_1_3 => 1.0.17/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/unifi-protect-backup/{1.0.16/templates/library/base_v1_1_3 => 1.0.17/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/unifi-protect-backup/{1.0.16/templates/library/base_v1_1_3 => 1.0.17/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/unifi-protect-backup/{1.0.16 => 1.0.17}/templates/test_values/basic-values.yaml (100%) delete mode 100644 trains/community/vaultwarden/1.0.6/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/community/vaultwarden/1.0.6/templates/library/base_v1_1_3/permissions.py rename trains/community/vaultwarden/{1.0.6 => 1.0.7}/README.md (100%) rename trains/community/vaultwarden/{1.0.6 => 1.0.7}/app.yaml (88%) rename trains/community/vaultwarden/{1.0.6 => 1.0.7}/ix_values.yaml (100%) rename trains/community/vaultwarden/{1.0.6 => 1.0.7}/migrations/migrate_from_kubernetes (100%) rename trains/community/vaultwarden/{1.0.6 => 1.0.7}/migrations/migration_helpers/__init__.py (100%) rename trains/community/vaultwarden/{1.0.6 => 1.0.7}/migrations/migration_helpers/cpu.py (100%) rename trains/community/vaultwarden/{1.0.6 => 1.0.7}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/vaultwarden/{1.0.6 => 1.0.7}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/vaultwarden/{1.0.6 => 1.0.7}/migrations/migration_helpers/memory.py (100%) rename trains/community/vaultwarden/{1.0.6 => 1.0.7}/migrations/migration_helpers/resources.py (100%) rename trains/community/vaultwarden/{1.0.6 => 1.0.7}/migrations/migration_helpers/storage.py (100%) rename trains/community/vaultwarden/{1.0.6 => 1.0.7}/questions.yaml (100%) rename trains/community/vaultwarden/{1.0.6 => 1.0.7}/templates/docker-compose.yaml (100%) rename trains/community/vaultwarden/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/vaultwarden/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/community/vaultwarden/1.0.7/templates/library/base_v1_1_4/healthchecks.py rename trains/community/vaultwarden/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/vaultwarden/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/vaultwarden/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/community/vaultwarden/1.0.7/templates/library/base_v1_1_4/permissions.py rename trains/community/vaultwarden/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/vaultwarden/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/vaultwarden/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/vaultwarden/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/vaultwarden/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/vaultwarden/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/vaultwarden/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/vaultwarden/{1.0.6 => 1.0.7}/templates/test_values/basic-values.yaml (100%) rename trains/community/vaultwarden/{1.0.6 => 1.0.7}/templates/test_values/https-values.yaml (100%) rename trains/community/vaultwarden/{1.0.6 => 1.0.7}/templates/test_values/no-admin-values.yaml (100%) rename trains/community/vaultwarden/{1.0.6 => 1.0.7}/templates/test_values/no-ws-values.yaml (100%) delete mode 100644 trains/community/vikunja/1.2.13/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/community/vikunja/1.2.13/templates/library/base_v1_1_3/permissions.py rename trains/community/vikunja/{1.2.13 => 1.2.14}/README.md (100%) rename trains/community/vikunja/{1.2.13 => 1.2.14}/app.yaml (92%) rename trains/community/vikunja/{1.2.13 => 1.2.14}/ix_values.yaml (100%) rename trains/community/vikunja/{1.2.13 => 1.2.14}/migrations/migrate_from_kubernetes (100%) rename trains/community/vikunja/{1.2.13 => 1.2.14}/migrations/migration_helpers/__init__.py (100%) rename trains/community/vikunja/{1.2.13 => 1.2.14}/migrations/migration_helpers/cpu.py (100%) rename trains/community/vikunja/{1.2.13 => 1.2.14}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/vikunja/{1.2.13 => 1.2.14}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/vikunja/{1.2.13 => 1.2.14}/migrations/migration_helpers/memory.py (100%) rename trains/community/vikunja/{1.2.13 => 1.2.14}/migrations/migration_helpers/resources.py (100%) rename trains/community/vikunja/{1.2.13 => 1.2.14}/migrations/migration_helpers/storage.py (100%) rename trains/community/vikunja/{1.2.13 => 1.2.14}/questions.yaml (100%) rename trains/community/vikunja/{1.2.13 => 1.2.14}/templates/docker-compose.yaml (100%) rename trains/community/vikunja/{1.2.13/templates/library/base_v1_1_3 => 1.2.14/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/vikunja/{1.2.13/templates/library/base_v1_1_3 => 1.2.14/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/community/vikunja/1.2.14/templates/library/base_v1_1_4/healthchecks.py rename trains/community/vikunja/{1.2.13/templates/library/base_v1_1_3 => 1.2.14/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/vikunja/{1.2.13/templates/library/base_v1_1_3 => 1.2.14/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/vikunja/{1.2.13/templates/library/base_v1_1_3 => 1.2.14/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/community/vikunja/1.2.14/templates/library/base_v1_1_4/permissions.py rename trains/community/vikunja/{1.2.13/templates/library/base_v1_1_3 => 1.2.14/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/vikunja/{1.2.13/templates/library/base_v1_1_3 => 1.2.14/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/vikunja/{1.2.13/templates/library/base_v1_1_3 => 1.2.14/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/vikunja/{1.2.13/templates/library/base_v1_1_3 => 1.2.14/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/vikunja/{1.2.13/templates/library/base_v1_1_3 => 1.2.14/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/vikunja/{1.2.13/templates/library/base_v1_1_3 => 1.2.14/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/vikunja/{1.2.13/templates/library/base_v1_1_3 => 1.2.14/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/vikunja/{1.2.13 => 1.2.14}/templates/test_values/basic-values.yaml (100%) delete mode 100644 trains/community/webdav/1.0.12/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/community/webdav/1.0.12/templates/library/base_v1_1_3/permissions.py rename trains/community/webdav/{1.0.12 => 1.0.13}/README.md (100%) rename trains/community/webdav/{1.0.12 => 1.0.13}/app.yaml (84%) rename trains/community/webdav/{1.0.12 => 1.0.13}/ix_values.yaml (100%) rename trains/community/webdav/{1.0.12 => 1.0.13}/migrations/migrate_from_kubernetes (100%) rename trains/community/webdav/{1.0.12 => 1.0.13}/migrations/migration_helpers/__init__.py (100%) rename trains/community/webdav/{1.0.12 => 1.0.13}/migrations/migration_helpers/cpu.py (100%) rename trains/community/webdav/{1.0.12 => 1.0.13}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/webdav/{1.0.12 => 1.0.13}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/webdav/{1.0.12 => 1.0.13}/migrations/migration_helpers/memory.py (100%) rename trains/community/webdav/{1.0.12 => 1.0.13}/migrations/migration_helpers/resources.py (100%) rename trains/community/webdav/{1.0.12 => 1.0.13}/migrations/migration_helpers/storage.py (100%) rename trains/community/webdav/{1.0.12 => 1.0.13}/questions.yaml (100%) rename trains/community/webdav/{1.0.12 => 1.0.13}/templates/docker-compose.yaml (100%) rename trains/community/webdav/{1.0.12/templates/library/base_v1_1_3 => 1.0.13/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/webdav/{1.0.12/templates/library/base_v1_1_3 => 1.0.13/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/community/webdav/1.0.13/templates/library/base_v1_1_4/healthchecks.py rename trains/community/webdav/{1.0.12/templates/library/base_v1_1_3 => 1.0.13/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/webdav/{1.0.12/templates/library/base_v1_1_3 => 1.0.13/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/webdav/{1.0.12/templates/library/base_v1_1_3 => 1.0.13/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/community/webdav/1.0.13/templates/library/base_v1_1_4/permissions.py rename trains/community/webdav/{1.0.12/templates/library/base_v1_1_3 => 1.0.13/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/webdav/{1.0.12/templates/library/base_v1_1_3 => 1.0.13/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/webdav/{1.0.12/templates/library/base_v1_1_3 => 1.0.13/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/webdav/{1.0.12/templates/library/base_v1_1_3 => 1.0.13/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/webdav/{1.0.12/templates/library/base_v1_1_3 => 1.0.13/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/webdav/{1.0.12/templates/library/base_v1_1_3 => 1.0.13/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/webdav/{1.0.12/templates/library/base_v1_1_3 => 1.0.13/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/webdav/{1.0.12 => 1.0.13}/templates/test_values/extra-values.yaml (100%) rename trains/community/webdav/{1.0.12 => 1.0.13}/templates/test_values/http-basicauth-other-user-values.yaml (100%) rename trains/community/webdav/{1.0.12 => 1.0.13}/templates/test_values/http-basicauth-values.yaml (100%) rename trains/community/webdav/{1.0.12 => 1.0.13}/templates/test_values/http-https-basicauth-other-user-values.yaml (100%) rename trains/community/webdav/{1.0.12 => 1.0.13}/templates/test_values/http-https-basicauth-values.yaml (100%) rename trains/community/webdav/{1.0.12 => 1.0.13}/templates/test_values/http-https-noauth-other-user-values.yaml (100%) rename trains/community/webdav/{1.0.12 => 1.0.13}/templates/test_values/http-https-noauth-values.yaml (100%) rename trains/community/webdav/{1.0.12 => 1.0.13}/templates/test_values/http-noauth-other-user-values.yaml (100%) rename trains/community/webdav/{1.0.12 => 1.0.13}/templates/test_values/http-noauth-values.yaml (100%) rename trains/community/webdav/{1.0.12 => 1.0.13}/templates/test_values/https-basicauth-other-user-values.yaml (100%) rename trains/community/webdav/{1.0.12 => 1.0.13}/templates/test_values/https-basicauth-values.yaml (100%) rename trains/community/webdav/{1.0.12 => 1.0.13}/templates/webdav_macros/httpd.conf (100%) rename trains/community/webdav/{1.0.12 => 1.0.13}/templates/webdav_macros/webdav_core.conf (100%) rename trains/community/webdav/{1.0.12 => 1.0.13}/templates/webdav_macros/webdav_http.conf (100%) rename trains/community/webdav/{1.0.12 => 1.0.13}/templates/webdav_macros/webdav_https.conf (100%) delete mode 100644 trains/community/whoogle/1.0.19/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/community/whoogle/1.0.19/templates/library/base_v1_1_3/permissions.py rename trains/community/whoogle/{1.0.19 => 1.0.20}/README.md (100%) rename trains/community/whoogle/{1.0.19 => 1.0.20}/app.yaml (87%) rename trains/community/whoogle/{1.0.19 => 1.0.20}/ix_values.yaml (100%) rename trains/community/whoogle/{1.0.19 => 1.0.20}/migrations/migrate_from_kubernetes (100%) rename trains/community/whoogle/{1.0.19 => 1.0.20}/migrations/migration_helpers/__init__.py (100%) rename trains/community/whoogle/{1.0.19 => 1.0.20}/migrations/migration_helpers/cpu.py (100%) rename trains/community/whoogle/{1.0.19 => 1.0.20}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/whoogle/{1.0.19 => 1.0.20}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/whoogle/{1.0.19 => 1.0.20}/migrations/migration_helpers/memory.py (100%) rename trains/community/whoogle/{1.0.19 => 1.0.20}/migrations/migration_helpers/resources.py (100%) rename trains/community/whoogle/{1.0.19 => 1.0.20}/migrations/migration_helpers/storage.py (100%) rename trains/community/whoogle/{1.0.19 => 1.0.20}/questions.yaml (100%) rename trains/community/whoogle/{1.0.19 => 1.0.20}/templates/docker-compose.yaml (100%) rename trains/community/whoogle/{1.0.19/templates/library/base_v1_1_3 => 1.0.20/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/whoogle/{1.0.19/templates/library/base_v1_1_3 => 1.0.20/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/community/whoogle/1.0.20/templates/library/base_v1_1_4/healthchecks.py rename trains/community/whoogle/{1.0.19/templates/library/base_v1_1_3 => 1.0.20/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/whoogle/{1.0.19/templates/library/base_v1_1_3 => 1.0.20/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/whoogle/{1.0.19/templates/library/base_v1_1_3 => 1.0.20/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/community/whoogle/1.0.20/templates/library/base_v1_1_4/permissions.py rename trains/community/whoogle/{1.0.19/templates/library/base_v1_1_3 => 1.0.20/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/whoogle/{1.0.19/templates/library/base_v1_1_3 => 1.0.20/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/whoogle/{1.0.19/templates/library/base_v1_1_3 => 1.0.20/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/whoogle/{1.0.19/templates/library/base_v1_1_3 => 1.0.20/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/whoogle/{1.0.19/templates/library/base_v1_1_3 => 1.0.20/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/whoogle/{1.0.19/templates/library/base_v1_1_3 => 1.0.20/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/whoogle/{1.0.19/templates/library/base_v1_1_3 => 1.0.20/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/whoogle/{1.0.19 => 1.0.20}/templates/test_values/basic-values.yaml (100%) delete mode 100644 trains/community/wordpress/1.0.6/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/community/wordpress/1.0.6/templates/library/base_v1_1_3/permissions.py rename trains/community/wordpress/{1.0.6 => 1.0.7}/README.md (100%) rename trains/community/wordpress/{1.0.6 => 1.0.7}/app.yaml (90%) rename trains/community/wordpress/{1.0.6 => 1.0.7}/ix_values.yaml (100%) rename trains/community/wordpress/{1.0.6 => 1.0.7}/migrations/migrate_from_kubernetes (100%) rename trains/community/wordpress/{1.0.6 => 1.0.7}/migrations/migration_helpers/__init__.py (100%) rename trains/community/wordpress/{1.0.6 => 1.0.7}/migrations/migration_helpers/cpu.py (100%) rename trains/community/wordpress/{1.0.6 => 1.0.7}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/wordpress/{1.0.6 => 1.0.7}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/wordpress/{1.0.6 => 1.0.7}/migrations/migration_helpers/memory.py (100%) rename trains/community/wordpress/{1.0.6 => 1.0.7}/migrations/migration_helpers/resources.py (100%) rename trains/community/wordpress/{1.0.6 => 1.0.7}/migrations/migration_helpers/storage.py (100%) rename trains/community/wordpress/{1.0.6 => 1.0.7}/questions.yaml (100%) rename trains/community/wordpress/{1.0.6 => 1.0.7}/templates/docker-compose.yaml (100%) rename trains/community/wordpress/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/wordpress/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/community/wordpress/1.0.7/templates/library/base_v1_1_4/healthchecks.py rename trains/community/wordpress/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/wordpress/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/wordpress/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/community/wordpress/1.0.7/templates/library/base_v1_1_4/permissions.py rename trains/community/wordpress/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/wordpress/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/wordpress/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/wordpress/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/wordpress/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/wordpress/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/wordpress/{1.0.6/templates/library/base_v1_1_3 => 1.0.7/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/wordpress/{1.0.6 => 1.0.7}/templates/test_values/basic-values.yaml (100%) delete mode 100644 trains/community/zerotier/1.0.18/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/community/zerotier/1.0.18/templates/library/base_v1_1_3/permissions.py rename trains/community/zerotier/{1.0.18 => 1.0.19}/README.md (100%) rename trains/community/zerotier/{1.0.18 => 1.0.19}/app.yaml (93%) rename trains/community/zerotier/{1.0.18 => 1.0.19}/ix_values.yaml (100%) rename trains/community/zerotier/{1.0.18 => 1.0.19}/migrations/migrate_from_kubernetes (100%) rename trains/community/zerotier/{1.0.18 => 1.0.19}/migrations/migration_helpers/__init__.py (100%) rename trains/community/zerotier/{1.0.18 => 1.0.19}/migrations/migration_helpers/cpu.py (100%) rename trains/community/zerotier/{1.0.18 => 1.0.19}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/zerotier/{1.0.18 => 1.0.19}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/zerotier/{1.0.18 => 1.0.19}/migrations/migration_helpers/memory.py (100%) rename trains/community/zerotier/{1.0.18 => 1.0.19}/migrations/migration_helpers/resources.py (100%) rename trains/community/zerotier/{1.0.18 => 1.0.19}/migrations/migration_helpers/storage.py (100%) rename trains/community/zerotier/{1.0.18 => 1.0.19}/questions.yaml (100%) rename trains/community/zerotier/{1.0.18 => 1.0.19}/templates/docker-compose.yaml (100%) rename trains/community/zerotier/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/community/zerotier/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/community/zerotier/1.0.19/templates/library/base_v1_1_4/healthchecks.py rename trains/community/zerotier/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/community/zerotier/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/community/zerotier/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/community/zerotier/1.0.19/templates/library/base_v1_1_4/permissions.py rename trains/community/zerotier/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/ports.py (100%) rename trains/community/zerotier/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/community/zerotier/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/redis.py (100%) rename trains/community/zerotier/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/resources.py (100%) rename trains/community/zerotier/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/security.py (100%) rename trains/community/zerotier/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/storage.py (100%) rename trains/community/zerotier/{1.0.18/templates/library/base_v1_1_3 => 1.0.19/templates/library/base_v1_1_4}/utils.py (100%) rename trains/community/zerotier/{1.0.18 => 1.0.19}/templates/test_values/basic-values.yaml (100%) rename trains/community/zerotier/{1.0.18 => 1.0.19}/templates/test_values/no-host-values.yaml (100%) delete mode 100644 trains/enterprise/minio/1.1.6/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/enterprise/minio/1.1.6/templates/library/base_v1_1_3/permissions.py rename trains/enterprise/minio/{1.1.6 => 1.1.7}/README.md (100%) rename trains/enterprise/minio/{1.1.6 => 1.1.7}/app.yaml (86%) rename trains/enterprise/minio/{1.1.6 => 1.1.7}/ix_values.yaml (100%) rename trains/enterprise/minio/{1.1.6 => 1.1.7}/migrations/migrate_from_kubernetes (100%) rename trains/enterprise/minio/{1.1.6 => 1.1.7}/migrations/migration_helpers/__init__.py (100%) rename trains/enterprise/minio/{1.1.6 => 1.1.7}/migrations/migration_helpers/cpu.py (100%) rename trains/enterprise/minio/{1.1.6 => 1.1.7}/migrations/migration_helpers/dns_config.py (100%) rename trains/enterprise/minio/{1.1.6 => 1.1.7}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/enterprise/minio/{1.1.6 => 1.1.7}/migrations/migration_helpers/memory.py (100%) rename trains/enterprise/minio/{1.1.6 => 1.1.7}/migrations/migration_helpers/resources.py (100%) rename trains/enterprise/minio/{1.1.6 => 1.1.7}/migrations/migration_helpers/storage.py (100%) rename trains/enterprise/minio/{1.1.6 => 1.1.7}/questions.yaml (100%) rename trains/enterprise/minio/{1.1.6 => 1.1.7}/templates/docker-compose.yaml (100%) rename trains/enterprise/minio/{1.1.6/templates/library/base_v1_1_3 => 1.1.7/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/enterprise/minio/{1.1.6/templates/library/base_v1_1_3 => 1.1.7/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/enterprise/minio/1.1.7/templates/library/base_v1_1_4/healthchecks.py rename trains/enterprise/minio/{1.1.6/templates/library/base_v1_1_3 => 1.1.7/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/enterprise/minio/{1.1.6/templates/library/base_v1_1_3 => 1.1.7/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/enterprise/minio/{1.1.6/templates/library/base_v1_1_3 => 1.1.7/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/enterprise/minio/1.1.7/templates/library/base_v1_1_4/permissions.py rename trains/enterprise/minio/{1.1.6/templates/library/base_v1_1_3 => 1.1.7/templates/library/base_v1_1_4}/ports.py (100%) rename trains/enterprise/minio/{1.1.6/templates/library/base_v1_1_3 => 1.1.7/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/enterprise/minio/{1.1.6/templates/library/base_v1_1_3 => 1.1.7/templates/library/base_v1_1_4}/redis.py (100%) rename trains/enterprise/minio/{1.1.6/templates/library/base_v1_1_3 => 1.1.7/templates/library/base_v1_1_4}/resources.py (100%) rename trains/enterprise/minio/{1.1.6/templates/library/base_v1_1_3 => 1.1.7/templates/library/base_v1_1_4}/security.py (100%) rename trains/enterprise/minio/{1.1.6/templates/library/base_v1_1_3 => 1.1.7/templates/library/base_v1_1_4}/storage.py (100%) rename trains/enterprise/minio/{1.1.6/templates/library/base_v1_1_3 => 1.1.7/templates/library/base_v1_1_4}/utils.py (100%) rename trains/enterprise/minio/{1.1.6/templates/library/enterprise/minio/v1_1_6 => 1.1.7/templates/library/enterprise/minio/v1_1_7}/__init__.py (100%) rename trains/enterprise/minio/{1.1.6/templates/library/enterprise/minio/v1_1_6 => 1.1.7/templates/library/enterprise/minio/v1_1_7}/data.py (98%) rename trains/enterprise/minio/{1.1.6 => 1.1.7}/templates/test_values/basic-multi-mode-values.yaml (100%) rename trains/enterprise/minio/{1.1.6 => 1.1.7}/templates/test_values/basic-values.yaml (100%) rename trains/enterprise/minio/{1.1.6 => 1.1.7}/templates/test_values/https-values.yaml (100%) delete mode 100644 trains/enterprise/syncthing/1.0.14/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/enterprise/syncthing/1.0.14/templates/library/base_v1_1_3/permissions.py rename trains/enterprise/syncthing/{1.0.14 => 1.0.15}/README.md (100%) rename trains/enterprise/syncthing/{1.0.14 => 1.0.15}/app.yaml (93%) rename trains/enterprise/syncthing/{1.0.14 => 1.0.15}/ix_values.yaml (100%) rename trains/enterprise/syncthing/{1.0.14 => 1.0.15}/migrations/migrate_from_kubernetes (100%) rename trains/enterprise/syncthing/{1.0.14 => 1.0.15}/migrations/migration_helpers/__init__.py (100%) rename trains/enterprise/syncthing/{1.0.14 => 1.0.15}/migrations/migration_helpers/cpu.py (100%) rename trains/enterprise/syncthing/{1.0.14 => 1.0.15}/migrations/migration_helpers/dns_config.py (100%) rename trains/enterprise/syncthing/{1.0.14 => 1.0.15}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/enterprise/syncthing/{1.0.14 => 1.0.15}/migrations/migration_helpers/memory.py (100%) rename trains/enterprise/syncthing/{1.0.14 => 1.0.15}/migrations/migration_helpers/resources.py (100%) rename trains/enterprise/syncthing/{1.0.14 => 1.0.15}/migrations/migration_helpers/storage.py (100%) rename trains/enterprise/syncthing/{1.0.14 => 1.0.15}/questions.yaml (100%) rename trains/enterprise/syncthing/{1.0.14 => 1.0.15}/templates/docker-compose.yaml (100%) rename trains/enterprise/syncthing/{1.0.14/templates/library/base_v1_1_3 => 1.0.15/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/enterprise/syncthing/{1.0.14/templates/library/base_v1_1_3 => 1.0.15/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/enterprise/syncthing/1.0.15/templates/library/base_v1_1_4/healthchecks.py rename trains/enterprise/syncthing/{1.0.14/templates/library/base_v1_1_3 => 1.0.15/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/enterprise/syncthing/{1.0.14/templates/library/base_v1_1_3 => 1.0.15/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/enterprise/syncthing/{1.0.14/templates/library/base_v1_1_3 => 1.0.15/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/enterprise/syncthing/1.0.15/templates/library/base_v1_1_4/permissions.py rename trains/enterprise/syncthing/{1.0.14/templates/library/base_v1_1_3 => 1.0.15/templates/library/base_v1_1_4}/ports.py (100%) rename trains/enterprise/syncthing/{1.0.14/templates/library/base_v1_1_3 => 1.0.15/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/enterprise/syncthing/{1.0.14/templates/library/base_v1_1_3 => 1.0.15/templates/library/base_v1_1_4}/redis.py (100%) rename trains/enterprise/syncthing/{1.0.14/templates/library/base_v1_1_3 => 1.0.15/templates/library/base_v1_1_4}/resources.py (100%) rename trains/enterprise/syncthing/{1.0.14/templates/library/base_v1_1_3 => 1.0.15/templates/library/base_v1_1_4}/security.py (100%) rename trains/enterprise/syncthing/{1.0.14/templates/library/base_v1_1_3 => 1.0.15/templates/library/base_v1_1_4}/storage.py (100%) rename trains/enterprise/syncthing/{1.0.14/templates/library/base_v1_1_3 => 1.0.15/templates/library/base_v1_1_4}/utils.py (100%) rename trains/enterprise/syncthing/{1.0.14 => 1.0.15}/templates/test_values/basic-values.yaml (100%) rename trains/enterprise/syncthing/{1.0.14 => 1.0.15}/templates/test_values/https-values.yaml (100%) delete mode 100644 trains/stable/collabora/1.1.14/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/stable/collabora/1.1.14/templates/library/base_v1_1_3/permissions.py rename trains/stable/collabora/{1.1.14 => 1.1.15}/README.md (100%) rename trains/stable/collabora/{1.1.14 => 1.1.15}/app.yaml (92%) rename trains/stable/collabora/{1.1.14 => 1.1.15}/ix_values.yaml (100%) rename trains/stable/collabora/{1.1.14 => 1.1.15}/migrations/migrate_from_kubernetes (100%) rename trains/stable/collabora/{1.1.14 => 1.1.15}/migrations/migration_helpers/__init__.py (100%) rename trains/stable/collabora/{1.1.14 => 1.1.15}/migrations/migration_helpers/cpu.py (100%) rename trains/stable/collabora/{1.1.14 => 1.1.15}/migrations/migration_helpers/dns_config.py (100%) rename trains/stable/collabora/{1.1.14 => 1.1.15}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/stable/collabora/{1.1.14 => 1.1.15}/migrations/migration_helpers/memory.py (100%) rename trains/stable/collabora/{1.1.14 => 1.1.15}/migrations/migration_helpers/resources.py (100%) rename trains/stable/collabora/{1.1.14 => 1.1.15}/migrations/migration_helpers/storage.py (100%) rename trains/stable/collabora/{1.1.14 => 1.1.15}/questions.yaml (100%) rename trains/stable/collabora/{1.1.14 => 1.1.15}/templates/docker-compose.yaml (100%) rename trains/stable/collabora/{1.1.14/templates/library/base_v1_1_3 => 1.1.15/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/stable/collabora/{1.1.14/templates/library/base_v1_1_3 => 1.1.15/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/stable/collabora/1.1.15/templates/library/base_v1_1_4/healthchecks.py rename trains/stable/collabora/{1.1.14/templates/library/base_v1_1_3 => 1.1.15/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/stable/collabora/{1.1.14/templates/library/base_v1_1_3 => 1.1.15/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/stable/collabora/{1.1.14/templates/library/base_v1_1_3 => 1.1.15/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/stable/collabora/1.1.15/templates/library/base_v1_1_4/permissions.py rename trains/stable/collabora/{1.1.14/templates/library/base_v1_1_3 => 1.1.15/templates/library/base_v1_1_4}/ports.py (100%) rename trains/stable/collabora/{1.1.14/templates/library/base_v1_1_3 => 1.1.15/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/stable/collabora/{1.1.14/templates/library/base_v1_1_3 => 1.1.15/templates/library/base_v1_1_4}/redis.py (100%) rename trains/stable/collabora/{1.1.14/templates/library/base_v1_1_3 => 1.1.15/templates/library/base_v1_1_4}/resources.py (100%) rename trains/stable/collabora/{1.1.14/templates/library/base_v1_1_3 => 1.1.15/templates/library/base_v1_1_4}/security.py (100%) rename trains/stable/collabora/{1.1.14/templates/library/base_v1_1_3 => 1.1.15/templates/library/base_v1_1_4}/storage.py (100%) rename trains/stable/collabora/{1.1.14/templates/library/base_v1_1_3 => 1.1.15/templates/library/base_v1_1_4}/utils.py (100%) rename trains/stable/collabora/{1.1.14 => 1.1.15}/templates/test_values/basic-values.yaml (100%) rename trains/stable/collabora/{1.1.14 => 1.1.15}/templates/test_values/https-values.yaml (100%) delete mode 100644 trains/stable/diskoverdata/1.3.7/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/stable/diskoverdata/1.3.7/templates/library/base_v1_1_3/permissions.py rename trains/stable/diskoverdata/{1.3.7 => 1.3.8}/README.md (100%) rename trains/stable/diskoverdata/{1.3.7 => 1.3.8}/app.yaml (92%) rename trains/stable/diskoverdata/{1.3.7 => 1.3.8}/ix_values.yaml (100%) rename trains/stable/diskoverdata/{1.3.7 => 1.3.8}/migrations/migrate_from_kubernetes (100%) rename trains/stable/diskoverdata/{1.3.7 => 1.3.8}/migrations/migration_helpers/__init__.py (100%) rename trains/stable/diskoverdata/{1.3.7 => 1.3.8}/migrations/migration_helpers/cpu.py (100%) rename trains/stable/diskoverdata/{1.3.7 => 1.3.8}/migrations/migration_helpers/dns_config.py (100%) rename trains/stable/diskoverdata/{1.3.7 => 1.3.8}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/stable/diskoverdata/{1.3.7 => 1.3.8}/migrations/migration_helpers/memory.py (100%) rename trains/stable/diskoverdata/{1.3.7 => 1.3.8}/migrations/migration_helpers/resources.py (100%) rename trains/stable/diskoverdata/{1.3.7 => 1.3.8}/migrations/migration_helpers/storage.py (100%) rename trains/stable/diskoverdata/{1.3.7 => 1.3.8}/questions.yaml (100%) rename trains/stable/diskoverdata/{1.3.7 => 1.3.8}/templates/diskover_macros/crontab (100%) rename trains/stable/diskoverdata/{1.3.7 => 1.3.8}/templates/diskover_macros/setup-cron.sh (100%) rename trains/stable/diskoverdata/{1.3.7 => 1.3.8}/templates/docker-compose.yaml (100%) rename trains/stable/diskoverdata/{1.3.7/templates/library/base_v1_1_3 => 1.3.8/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/stable/diskoverdata/{1.3.7/templates/library/base_v1_1_3 => 1.3.8/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/stable/diskoverdata/1.3.8/templates/library/base_v1_1_4/healthchecks.py rename trains/stable/diskoverdata/{1.3.7/templates/library/base_v1_1_3 => 1.3.8/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/stable/diskoverdata/{1.3.7/templates/library/base_v1_1_3 => 1.3.8/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/stable/diskoverdata/{1.3.7/templates/library/base_v1_1_3 => 1.3.8/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/stable/diskoverdata/1.3.8/templates/library/base_v1_1_4/permissions.py rename trains/stable/diskoverdata/{1.3.7/templates/library/base_v1_1_3 => 1.3.8/templates/library/base_v1_1_4}/ports.py (100%) rename trains/stable/diskoverdata/{1.3.7/templates/library/base_v1_1_3 => 1.3.8/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/stable/diskoverdata/{1.3.7/templates/library/base_v1_1_3 => 1.3.8/templates/library/base_v1_1_4}/redis.py (100%) rename trains/stable/diskoverdata/{1.3.7/templates/library/base_v1_1_3 => 1.3.8/templates/library/base_v1_1_4}/resources.py (100%) rename trains/stable/diskoverdata/{1.3.7/templates/library/base_v1_1_3 => 1.3.8/templates/library/base_v1_1_4}/security.py (100%) rename trains/stable/diskoverdata/{1.3.7/templates/library/base_v1_1_3 => 1.3.8/templates/library/base_v1_1_4}/storage.py (100%) rename trains/stable/diskoverdata/{1.3.7/templates/library/base_v1_1_3 => 1.3.8/templates/library/base_v1_1_4}/utils.py (100%) rename trains/stable/diskoverdata/{1.3.7 => 1.3.8}/templates/test_values/basic-values.yaml (100%) delete mode 100644 trains/stable/elastic-search/1.1.11/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/stable/elastic-search/1.1.11/templates/library/base_v1_1_3/permissions.py rename trains/stable/elastic-search/{1.1.11 => 1.1.12}/README.md (100%) rename trains/stable/elastic-search/{1.1.11 => 1.1.12}/app.yaml (87%) rename trains/stable/elastic-search/{1.1.11 => 1.1.12}/ix_values.yaml (100%) rename trains/stable/elastic-search/{1.1.11 => 1.1.12}/migrations/migrate_from_kubernetes (100%) rename trains/stable/elastic-search/{1.1.11 => 1.1.12}/migrations/migration_helpers/__init__.py (100%) rename trains/stable/elastic-search/{1.1.11 => 1.1.12}/migrations/migration_helpers/cpu.py (100%) rename trains/stable/elastic-search/{1.1.11 => 1.1.12}/migrations/migration_helpers/dns_config.py (100%) rename trains/stable/elastic-search/{1.1.11 => 1.1.12}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/stable/elastic-search/{1.1.11 => 1.1.12}/migrations/migration_helpers/memory.py (100%) rename trains/stable/elastic-search/{1.1.11 => 1.1.12}/migrations/migration_helpers/resources.py (100%) rename trains/stable/elastic-search/{1.1.11 => 1.1.12}/migrations/migration_helpers/storage.py (100%) rename trains/stable/elastic-search/{1.1.11 => 1.1.12}/questions.yaml (100%) rename trains/stable/elastic-search/{1.1.11 => 1.1.12}/templates/docker-compose.yaml (100%) rename trains/stable/elastic-search/{1.1.11/templates/library/base_v1_1_3 => 1.1.12/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/stable/elastic-search/{1.1.11/templates/library/base_v1_1_3 => 1.1.12/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/stable/elastic-search/1.1.12/templates/library/base_v1_1_4/healthchecks.py rename trains/stable/elastic-search/{1.1.11/templates/library/base_v1_1_3 => 1.1.12/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/stable/elastic-search/{1.1.11/templates/library/base_v1_1_3 => 1.1.12/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/stable/elastic-search/{1.1.11/templates/library/base_v1_1_3 => 1.1.12/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/stable/elastic-search/1.1.12/templates/library/base_v1_1_4/permissions.py rename trains/stable/elastic-search/{1.1.11/templates/library/base_v1_1_3 => 1.1.12/templates/library/base_v1_1_4}/ports.py (100%) rename trains/stable/elastic-search/{1.1.11/templates/library/base_v1_1_3 => 1.1.12/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/stable/elastic-search/{1.1.11/templates/library/base_v1_1_3 => 1.1.12/templates/library/base_v1_1_4}/redis.py (100%) rename trains/stable/elastic-search/{1.1.11/templates/library/base_v1_1_3 => 1.1.12/templates/library/base_v1_1_4}/resources.py (100%) rename trains/stable/elastic-search/{1.1.11/templates/library/base_v1_1_3 => 1.1.12/templates/library/base_v1_1_4}/security.py (100%) rename trains/stable/elastic-search/{1.1.11/templates/library/base_v1_1_3 => 1.1.12/templates/library/base_v1_1_4}/storage.py (100%) rename trains/stable/elastic-search/{1.1.11/templates/library/base_v1_1_3 => 1.1.12/templates/library/base_v1_1_4}/utils.py (100%) rename trains/stable/elastic-search/{1.1.11 => 1.1.12}/templates/test_values/basic-values.yaml (100%) rename trains/stable/elastic-search/{1.1.11 => 1.1.12}/templates/test_values/https-values.yaml (100%) delete mode 100644 trains/stable/emby/1.1.12/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/stable/emby/1.1.12/templates/library/base_v1_1_3/permissions.py rename trains/stable/emby/{1.1.12 => 1.1.13}/README.md (100%) rename trains/stable/emby/{1.1.12 => 1.1.13}/app.yaml (91%) rename trains/stable/emby/{1.1.12 => 1.1.13}/ix_values.yaml (100%) rename trains/stable/emby/{1.1.12 => 1.1.13}/migrations/migrate_from_kubernetes (100%) rename trains/stable/emby/{1.1.12 => 1.1.13}/migrations/migration_helpers/__init__.py (100%) rename trains/stable/emby/{1.1.12 => 1.1.13}/migrations/migration_helpers/cpu.py (100%) rename trains/stable/emby/{1.1.12 => 1.1.13}/migrations/migration_helpers/dns_config.py (100%) rename trains/stable/emby/{1.1.12 => 1.1.13}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/stable/emby/{1.1.12 => 1.1.13}/migrations/migration_helpers/memory.py (100%) rename trains/stable/emby/{1.1.12 => 1.1.13}/migrations/migration_helpers/resources.py (100%) rename trains/stable/emby/{1.1.12 => 1.1.13}/migrations/migration_helpers/storage.py (100%) rename trains/stable/emby/{1.1.12 => 1.1.13}/questions.yaml (100%) rename trains/stable/emby/{1.1.12 => 1.1.13}/templates/docker-compose.yaml (100%) rename trains/stable/emby/{1.1.12/templates/library/base_v1_1_3 => 1.1.13/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/stable/emby/{1.1.12/templates/library/base_v1_1_3 => 1.1.13/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/stable/emby/1.1.13/templates/library/base_v1_1_4/healthchecks.py rename trains/stable/emby/{1.1.12/templates/library/base_v1_1_3 => 1.1.13/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/stable/emby/{1.1.12/templates/library/base_v1_1_3 => 1.1.13/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/stable/emby/{1.1.12/templates/library/base_v1_1_3 => 1.1.13/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/stable/emby/1.1.13/templates/library/base_v1_1_4/permissions.py rename trains/stable/emby/{1.1.12/templates/library/base_v1_1_3 => 1.1.13/templates/library/base_v1_1_4}/ports.py (100%) rename trains/stable/emby/{1.1.12/templates/library/base_v1_1_3 => 1.1.13/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/stable/emby/{1.1.12/templates/library/base_v1_1_3 => 1.1.13/templates/library/base_v1_1_4}/redis.py (100%) rename trains/stable/emby/{1.1.12/templates/library/base_v1_1_3 => 1.1.13/templates/library/base_v1_1_4}/resources.py (100%) rename trains/stable/emby/{1.1.12/templates/library/base_v1_1_3 => 1.1.13/templates/library/base_v1_1_4}/security.py (100%) rename trains/stable/emby/{1.1.12/templates/library/base_v1_1_3 => 1.1.13/templates/library/base_v1_1_4}/storage.py (100%) rename trains/stable/emby/{1.1.12/templates/library/base_v1_1_3 => 1.1.13/templates/library/base_v1_1_4}/utils.py (100%) rename trains/stable/emby/{1.1.12 => 1.1.13}/templates/test_values/basic-values.yaml (100%) rename trains/stable/emby/{1.1.12 => 1.1.13}/templates/test_values/hostnet-values.yaml (100%) delete mode 100644 trains/stable/home-assistant/1.2.20/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/stable/home-assistant/1.2.20/templates/library/base_v1_1_3/permissions.py rename trains/stable/home-assistant/{1.2.20 => 1.2.21}/README.md (100%) rename trains/stable/home-assistant/{1.2.20 => 1.2.21}/app.yaml (91%) rename trains/stable/home-assistant/{1.2.20 => 1.2.21}/ix_values.yaml (100%) rename trains/stable/home-assistant/{1.2.20 => 1.2.21}/migrations/migrate_from_kubernetes (100%) rename trains/stable/home-assistant/{1.2.20 => 1.2.21}/migrations/migration_helpers/__init__.py (100%) rename trains/stable/home-assistant/{1.2.20 => 1.2.21}/migrations/migration_helpers/cpu.py (100%) rename trains/stable/home-assistant/{1.2.20 => 1.2.21}/migrations/migration_helpers/dns_config.py (100%) rename trains/stable/home-assistant/{1.2.20 => 1.2.21}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/stable/home-assistant/{1.2.20 => 1.2.21}/migrations/migration_helpers/memory.py (100%) rename trains/stable/home-assistant/{1.2.20 => 1.2.21}/migrations/migration_helpers/resources.py (100%) rename trains/stable/home-assistant/{1.2.20 => 1.2.21}/migrations/migration_helpers/storage.py (100%) rename trains/stable/home-assistant/{1.2.20 => 1.2.21}/questions.yaml (100%) rename trains/stable/home-assistant/{1.2.20 => 1.2.21}/templates/docker-compose.yaml (100%) rename trains/stable/home-assistant/{1.2.20/templates/library/base_v1_1_3 => 1.2.21/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/stable/home-assistant/{1.2.20/templates/library/base_v1_1_3 => 1.2.21/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/stable/home-assistant/1.2.21/templates/library/base_v1_1_4/healthchecks.py rename trains/stable/home-assistant/{1.2.20/templates/library/base_v1_1_3 => 1.2.21/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/stable/home-assistant/{1.2.20/templates/library/base_v1_1_3 => 1.2.21/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/stable/home-assistant/{1.2.20/templates/library/base_v1_1_3 => 1.2.21/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/stable/home-assistant/1.2.21/templates/library/base_v1_1_4/permissions.py rename trains/stable/home-assistant/{1.2.20/templates/library/base_v1_1_3 => 1.2.21/templates/library/base_v1_1_4}/ports.py (100%) rename trains/stable/home-assistant/{1.2.20/templates/library/base_v1_1_3 => 1.2.21/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/stable/home-assistant/{1.2.20/templates/library/base_v1_1_3 => 1.2.21/templates/library/base_v1_1_4}/redis.py (100%) rename trains/stable/home-assistant/{1.2.20/templates/library/base_v1_1_3 => 1.2.21/templates/library/base_v1_1_4}/resources.py (100%) rename trains/stable/home-assistant/{1.2.20/templates/library/base_v1_1_3 => 1.2.21/templates/library/base_v1_1_4}/security.py (100%) rename trains/stable/home-assistant/{1.2.20/templates/library/base_v1_1_3 => 1.2.21/templates/library/base_v1_1_4}/storage.py (100%) rename trains/stable/home-assistant/{1.2.20/templates/library/base_v1_1_3 => 1.2.21/templates/library/base_v1_1_4}/utils.py (100%) rename trains/stable/home-assistant/{1.2.20 => 1.2.21}/templates/test_values/basic-values.yaml (100%) delete mode 100644 trains/stable/ix-app/1.0.10/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/stable/ix-app/1.0.10/templates/library/base_v1_1_3/permissions.py rename trains/stable/ix-app/{1.0.10 => 1.0.11}/README.md (100%) rename trains/stable/ix-app/{1.0.10 => 1.0.11}/app.yaml (78%) rename trains/stable/ix-app/{1.0.10 => 1.0.11}/ix_values.yaml (100%) rename trains/stable/ix-app/{1.0.10 => 1.0.11}/migrations/migrate_from_kubernetes (100%) rename trains/stable/ix-app/{1.0.10 => 1.0.11}/migrations/migration_helpers/__init__.py (100%) rename trains/stable/ix-app/{1.0.10 => 1.0.11}/migrations/migration_helpers/cpu.py (100%) rename trains/stable/ix-app/{1.0.10 => 1.0.11}/migrations/migration_helpers/dns_config.py (100%) rename trains/stable/ix-app/{1.0.10 => 1.0.11}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/stable/ix-app/{1.0.10 => 1.0.11}/migrations/migration_helpers/memory.py (100%) rename trains/stable/ix-app/{1.0.10 => 1.0.11}/migrations/migration_helpers/resources.py (100%) rename trains/stable/ix-app/{1.0.10 => 1.0.11}/migrations/migration_helpers/storage.py (100%) rename trains/stable/ix-app/{1.0.10 => 1.0.11}/questions.yaml (100%) rename trains/stable/ix-app/{1.0.10 => 1.0.11}/templates/docker-compose.yaml (100%) rename trains/stable/ix-app/{1.0.10/templates/library/base_v1_1_3 => 1.0.11/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/stable/ix-app/{1.0.10/templates/library/base_v1_1_3 => 1.0.11/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/stable/ix-app/1.0.11/templates/library/base_v1_1_4/healthchecks.py rename trains/stable/ix-app/{1.0.10/templates/library/base_v1_1_3 => 1.0.11/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/stable/ix-app/{1.0.10/templates/library/base_v1_1_3 => 1.0.11/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/stable/ix-app/{1.0.10/templates/library/base_v1_1_3 => 1.0.11/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/stable/ix-app/1.0.11/templates/library/base_v1_1_4/permissions.py rename trains/stable/ix-app/{1.0.10/templates/library/base_v1_1_3 => 1.0.11/templates/library/base_v1_1_4}/ports.py (100%) rename trains/stable/ix-app/{1.0.10/templates/library/base_v1_1_3 => 1.0.11/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/stable/ix-app/{1.0.10/templates/library/base_v1_1_3 => 1.0.11/templates/library/base_v1_1_4}/redis.py (100%) rename trains/stable/ix-app/{1.0.10/templates/library/base_v1_1_3 => 1.0.11/templates/library/base_v1_1_4}/resources.py (100%) rename trains/stable/ix-app/{1.0.10/templates/library/base_v1_1_3 => 1.0.11/templates/library/base_v1_1_4}/security.py (100%) rename trains/stable/ix-app/{1.0.10/templates/library/base_v1_1_3 => 1.0.11/templates/library/base_v1_1_4}/storage.py (100%) rename trains/stable/ix-app/{1.0.10/templates/library/base_v1_1_3 => 1.0.11/templates/library/base_v1_1_4}/utils.py (100%) rename trains/stable/ix-app/{1.0.10 => 1.0.11}/templates/test_values/basic-values.yaml (100%) delete mode 100644 trains/stable/minio/1.1.12/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/stable/minio/1.1.12/templates/library/base_v1_1_3/permissions.py rename trains/stable/minio/{1.1.12 => 1.1.13}/README.md (100%) rename trains/stable/minio/{1.1.12 => 1.1.13}/app.yaml (87%) rename trains/stable/minio/{1.1.12 => 1.1.13}/ix_values.yaml (100%) rename trains/stable/minio/{1.1.12 => 1.1.13}/migrations/migrate_from_kubernetes (100%) rename trains/stable/minio/{1.1.12 => 1.1.13}/migrations/migration_helpers/__init__.py (100%) rename trains/stable/minio/{1.1.12 => 1.1.13}/migrations/migration_helpers/cpu.py (100%) rename trains/stable/minio/{1.1.12 => 1.1.13}/migrations/migration_helpers/dns_config.py (100%) rename trains/stable/minio/{1.1.12 => 1.1.13}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/stable/minio/{1.1.12 => 1.1.13}/migrations/migration_helpers/memory.py (100%) rename trains/stable/minio/{1.1.12 => 1.1.13}/migrations/migration_helpers/resources.py (100%) rename trains/stable/minio/{1.1.12 => 1.1.13}/migrations/migration_helpers/storage.py (100%) rename trains/stable/minio/{1.1.12 => 1.1.13}/questions.yaml (100%) rename trains/stable/minio/{1.1.12 => 1.1.13}/templates/docker-compose.yaml (100%) rename trains/stable/minio/{1.1.12/templates/library/base_v1_1_3 => 1.1.13/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/stable/minio/{1.1.12/templates/library/base_v1_1_3 => 1.1.13/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/stable/minio/1.1.13/templates/library/base_v1_1_4/healthchecks.py rename trains/stable/minio/{1.1.12/templates/library/base_v1_1_3 => 1.1.13/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/stable/minio/{1.1.12/templates/library/base_v1_1_3 => 1.1.13/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/stable/minio/{1.1.12/templates/library/base_v1_1_3 => 1.1.13/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/stable/minio/1.1.13/templates/library/base_v1_1_4/permissions.py rename trains/stable/minio/{1.1.12/templates/library/base_v1_1_3 => 1.1.13/templates/library/base_v1_1_4}/ports.py (100%) rename trains/stable/minio/{1.1.12/templates/library/base_v1_1_3 => 1.1.13/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/stable/minio/{1.1.12/templates/library/base_v1_1_3 => 1.1.13/templates/library/base_v1_1_4}/redis.py (100%) rename trains/stable/minio/{1.1.12/templates/library/base_v1_1_3 => 1.1.13/templates/library/base_v1_1_4}/resources.py (100%) rename trains/stable/minio/{1.1.12/templates/library/base_v1_1_3 => 1.1.13/templates/library/base_v1_1_4}/security.py (100%) rename trains/stable/minio/{1.1.12/templates/library/base_v1_1_3 => 1.1.13/templates/library/base_v1_1_4}/storage.py (100%) rename trains/stable/minio/{1.1.12/templates/library/base_v1_1_3 => 1.1.13/templates/library/base_v1_1_4}/utils.py (100%) rename trains/stable/minio/{1.1.12 => 1.1.13}/templates/test_values/basic-values.yaml (100%) rename trains/stable/minio/{1.1.12 => 1.1.13}/templates/test_values/https-values.yaml (100%) delete mode 100644 trains/stable/netdata/1.1.13/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/stable/netdata/1.1.13/templates/library/base_v1_1_3/permissions.py rename trains/stable/netdata/{1.1.13 => 1.1.14}/README.md (100%) rename trains/stable/netdata/{1.1.13 => 1.1.14}/app.yaml (94%) rename trains/stable/netdata/{1.1.13 => 1.1.14}/ix_values.yaml (100%) rename trains/stable/netdata/{1.1.13 => 1.1.14}/migrations/migrate_from_kubernetes (100%) rename trains/stable/netdata/{1.1.13 => 1.1.14}/migrations/migration_helpers/__init__.py (100%) rename trains/stable/netdata/{1.1.13 => 1.1.14}/migrations/migration_helpers/cpu.py (100%) rename trains/stable/netdata/{1.1.13 => 1.1.14}/migrations/migration_helpers/dns_config.py (100%) rename trains/stable/netdata/{1.1.13 => 1.1.14}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/stable/netdata/{1.1.13 => 1.1.14}/migrations/migration_helpers/memory.py (100%) rename trains/stable/netdata/{1.1.13 => 1.1.14}/migrations/migration_helpers/resources.py (100%) rename trains/stable/netdata/{1.1.13 => 1.1.14}/migrations/migration_helpers/storage.py (100%) rename trains/stable/netdata/{1.1.13 => 1.1.14}/questions.yaml (100%) rename trains/stable/netdata/{1.1.13 => 1.1.14}/templates/docker-compose.yaml (100%) rename trains/stable/netdata/{1.1.13/templates/library/base_v1_1_3 => 1.1.14/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/stable/netdata/{1.1.13/templates/library/base_v1_1_3 => 1.1.14/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/stable/netdata/1.1.14/templates/library/base_v1_1_4/healthchecks.py rename trains/stable/netdata/{1.1.13/templates/library/base_v1_1_3 => 1.1.14/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/stable/netdata/{1.1.13/templates/library/base_v1_1_3 => 1.1.14/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/stable/netdata/{1.1.13/templates/library/base_v1_1_3 => 1.1.14/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/stable/netdata/1.1.14/templates/library/base_v1_1_4/permissions.py rename trains/stable/netdata/{1.1.13/templates/library/base_v1_1_3 => 1.1.14/templates/library/base_v1_1_4}/ports.py (100%) rename trains/stable/netdata/{1.1.13/templates/library/base_v1_1_3 => 1.1.14/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/stable/netdata/{1.1.13/templates/library/base_v1_1_3 => 1.1.14/templates/library/base_v1_1_4}/redis.py (100%) rename trains/stable/netdata/{1.1.13/templates/library/base_v1_1_3 => 1.1.14/templates/library/base_v1_1_4}/resources.py (100%) rename trains/stable/netdata/{1.1.13/templates/library/base_v1_1_3 => 1.1.14/templates/library/base_v1_1_4}/security.py (100%) rename trains/stable/netdata/{1.1.13/templates/library/base_v1_1_3 => 1.1.14/templates/library/base_v1_1_4}/storage.py (100%) rename trains/stable/netdata/{1.1.13/templates/library/base_v1_1_3 => 1.1.14/templates/library/base_v1_1_4}/utils.py (100%) rename trains/stable/netdata/{1.1.13 => 1.1.14}/templates/test_values/basic-values.yaml (100%) delete mode 100644 trains/stable/nextcloud/1.3.19/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/stable/nextcloud/1.3.19/templates/library/base_v1_1_3/permissions.py rename trains/stable/nextcloud/{1.3.19 => 1.3.20}/README.md (100%) rename trains/stable/nextcloud/{1.3.19 => 1.3.20}/app.yaml (92%) rename trains/stable/nextcloud/{1.3.19 => 1.3.20}/ix_values.yaml (100%) rename trains/stable/nextcloud/{1.3.19 => 1.3.20}/migrations/migrate_from_kubernetes (100%) rename trains/stable/nextcloud/{1.3.19 => 1.3.20}/migrations/migration_helpers/__init__.py (100%) rename trains/stable/nextcloud/{1.3.19 => 1.3.20}/migrations/migration_helpers/cpu.py (100%) rename trains/stable/nextcloud/{1.3.19 => 1.3.20}/migrations/migration_helpers/dns_config.py (100%) rename trains/stable/nextcloud/{1.3.19 => 1.3.20}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/stable/nextcloud/{1.3.19 => 1.3.20}/migrations/migration_helpers/memory.py (100%) rename trains/stable/nextcloud/{1.3.19 => 1.3.20}/migrations/migration_helpers/resources.py (100%) rename trains/stable/nextcloud/{1.3.19 => 1.3.20}/migrations/migration_helpers/storage.py (100%) rename trains/stable/nextcloud/{1.3.19 => 1.3.20}/questions.yaml (100%) rename trains/stable/nextcloud/{1.3.19 => 1.3.20}/templates/docker-compose.yaml (100%) rename trains/stable/nextcloud/{1.3.19/templates/library/base_v1_1_3 => 1.3.20/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/stable/nextcloud/{1.3.19/templates/library/base_v1_1_3 => 1.3.20/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/stable/nextcloud/1.3.20/templates/library/base_v1_1_4/healthchecks.py rename trains/stable/nextcloud/{1.3.19/templates/library/base_v1_1_3 => 1.3.20/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/stable/nextcloud/{1.3.19/templates/library/base_v1_1_3 => 1.3.20/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/stable/nextcloud/{1.3.19/templates/library/base_v1_1_3 => 1.3.20/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/stable/nextcloud/1.3.20/templates/library/base_v1_1_4/permissions.py rename trains/stable/nextcloud/{1.3.19/templates/library/base_v1_1_3 => 1.3.20/templates/library/base_v1_1_4}/ports.py (100%) rename trains/stable/nextcloud/{1.3.19/templates/library/base_v1_1_3 => 1.3.20/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/stable/nextcloud/{1.3.19/templates/library/base_v1_1_3 => 1.3.20/templates/library/base_v1_1_4}/redis.py (100%) rename trains/stable/nextcloud/{1.3.19/templates/library/base_v1_1_3 => 1.3.20/templates/library/base_v1_1_4}/resources.py (100%) rename trains/stable/nextcloud/{1.3.19/templates/library/base_v1_1_3 => 1.3.20/templates/library/base_v1_1_4}/security.py (100%) rename trains/stable/nextcloud/{1.3.19/templates/library/base_v1_1_3 => 1.3.20/templates/library/base_v1_1_4}/storage.py (100%) rename trains/stable/nextcloud/{1.3.19/templates/library/base_v1_1_3 => 1.3.20/templates/library/base_v1_1_4}/utils.py (100%) rename trains/stable/nextcloud/{1.3.19 => 1.3.20}/templates/test_values/basic-values.yaml (100%) rename trains/stable/nextcloud/{1.3.19 => 1.3.20}/templates/test_values/https-values.yaml (100%) rename trains/stable/nextcloud/{1.3.19 => 1.3.20}/templates/test_values/same-vol-values.yaml (100%) delete mode 100644 trains/stable/photoprism/1.1.13/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/stable/photoprism/1.1.13/templates/library/base_v1_1_3/permissions.py rename trains/stable/photoprism/{1.1.13 => 1.1.14}/README.md (100%) rename trains/stable/photoprism/{1.1.13 => 1.1.14}/app.yaml (91%) rename trains/stable/photoprism/{1.1.13 => 1.1.14}/ix_values.yaml (100%) rename trains/stable/photoprism/{1.1.13 => 1.1.14}/migrations/migrate_from_kubernetes (100%) rename trains/stable/photoprism/{1.1.13 => 1.1.14}/migrations/migration_helpers/__init__.py (100%) rename trains/stable/photoprism/{1.1.13 => 1.1.14}/migrations/migration_helpers/cpu.py (100%) rename trains/stable/photoprism/{1.1.13 => 1.1.14}/migrations/migration_helpers/dns_config.py (100%) rename trains/stable/photoprism/{1.1.13 => 1.1.14}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/stable/photoprism/{1.1.13 => 1.1.14}/migrations/migration_helpers/memory.py (100%) rename trains/stable/photoprism/{1.1.13 => 1.1.14}/migrations/migration_helpers/resources.py (100%) rename trains/stable/photoprism/{1.1.13 => 1.1.14}/migrations/migration_helpers/storage.py (100%) rename trains/stable/photoprism/{1.1.13 => 1.1.14}/questions.yaml (100%) rename trains/stable/photoprism/{1.1.13 => 1.1.14}/templates/docker-compose.yaml (100%) rename trains/stable/photoprism/{1.1.13/templates/library/base_v1_1_3 => 1.1.14/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/stable/photoprism/{1.1.13/templates/library/base_v1_1_3 => 1.1.14/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/stable/photoprism/1.1.14/templates/library/base_v1_1_4/healthchecks.py rename trains/stable/photoprism/{1.1.13/templates/library/base_v1_1_3 => 1.1.14/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/stable/photoprism/{1.1.13/templates/library/base_v1_1_3 => 1.1.14/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/stable/photoprism/{1.1.13/templates/library/base_v1_1_3 => 1.1.14/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/stable/photoprism/1.1.14/templates/library/base_v1_1_4/permissions.py rename trains/stable/photoprism/{1.1.13/templates/library/base_v1_1_3 => 1.1.14/templates/library/base_v1_1_4}/ports.py (100%) rename trains/stable/photoprism/{1.1.13/templates/library/base_v1_1_3 => 1.1.14/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/stable/photoprism/{1.1.13/templates/library/base_v1_1_3 => 1.1.14/templates/library/base_v1_1_4}/redis.py (100%) rename trains/stable/photoprism/{1.1.13/templates/library/base_v1_1_3 => 1.1.14/templates/library/base_v1_1_4}/resources.py (100%) rename trains/stable/photoprism/{1.1.13/templates/library/base_v1_1_3 => 1.1.14/templates/library/base_v1_1_4}/security.py (100%) rename trains/stable/photoprism/{1.1.13/templates/library/base_v1_1_3 => 1.1.14/templates/library/base_v1_1_4}/storage.py (100%) rename trains/stable/photoprism/{1.1.13/templates/library/base_v1_1_3 => 1.1.14/templates/library/base_v1_1_4}/utils.py (100%) rename trains/stable/photoprism/{1.1.13 => 1.1.14}/templates/test_values/basic-values.yaml (100%) rename trains/stable/photoprism/{1.1.13 => 1.1.14}/templates/test_values/host-values.yaml (100%) rename trains/stable/photoprism/{1.1.13 => 1.1.14}/templates/test_values/https-values.yaml (100%) rename trains/stable/photoprism/{1.1.13 => 1.1.14}/templates/test_values/pass-values.yaml (100%) delete mode 100644 trains/stable/pihole/1.1.10/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/stable/pihole/1.1.10/templates/library/base_v1_1_3/permissions.py rename trains/stable/pihole/{1.1.10 => 1.1.11}/README.md (100%) rename trains/stable/pihole/{1.1.10 => 1.1.11}/app.yaml (93%) rename trains/stable/pihole/{1.1.10 => 1.1.11}/ix_values.yaml (100%) rename trains/stable/pihole/{1.1.10 => 1.1.11}/migrations/migrate_from_kubernetes (100%) rename trains/stable/pihole/{1.1.10 => 1.1.11}/migrations/migration_helpers/__init__.py (100%) rename trains/stable/pihole/{1.1.10 => 1.1.11}/migrations/migration_helpers/cpu.py (100%) rename trains/stable/pihole/{1.1.10 => 1.1.11}/migrations/migration_helpers/dns_config.py (100%) rename trains/stable/pihole/{1.1.10 => 1.1.11}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/stable/pihole/{1.1.10 => 1.1.11}/migrations/migration_helpers/memory.py (100%) rename trains/stable/pihole/{1.1.10 => 1.1.11}/migrations/migration_helpers/resources.py (100%) rename trains/stable/pihole/{1.1.10 => 1.1.11}/migrations/migration_helpers/storage.py (100%) rename trains/stable/pihole/{1.1.10 => 1.1.11}/questions.yaml (100%) rename trains/stable/pihole/{1.1.10 => 1.1.11}/templates/docker-compose.yaml (100%) rename trains/stable/pihole/{1.1.10/templates/library/base_v1_1_3 => 1.1.11/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/stable/pihole/{1.1.10/templates/library/base_v1_1_3 => 1.1.11/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/stable/pihole/1.1.11/templates/library/base_v1_1_4/healthchecks.py rename trains/stable/pihole/{1.1.10/templates/library/base_v1_1_3 => 1.1.11/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/stable/pihole/{1.1.10/templates/library/base_v1_1_3 => 1.1.11/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/stable/pihole/{1.1.10/templates/library/base_v1_1_3 => 1.1.11/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/stable/pihole/1.1.11/templates/library/base_v1_1_4/permissions.py rename trains/stable/pihole/{1.1.10/templates/library/base_v1_1_3 => 1.1.11/templates/library/base_v1_1_4}/ports.py (100%) rename trains/stable/pihole/{1.1.10/templates/library/base_v1_1_3 => 1.1.11/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/stable/pihole/{1.1.10/templates/library/base_v1_1_3 => 1.1.11/templates/library/base_v1_1_4}/redis.py (100%) rename trains/stable/pihole/{1.1.10/templates/library/base_v1_1_3 => 1.1.11/templates/library/base_v1_1_4}/resources.py (100%) rename trains/stable/pihole/{1.1.10/templates/library/base_v1_1_3 => 1.1.11/templates/library/base_v1_1_4}/security.py (100%) rename trains/stable/pihole/{1.1.10/templates/library/base_v1_1_3 => 1.1.11/templates/library/base_v1_1_4}/storage.py (100%) rename trains/stable/pihole/{1.1.10/templates/library/base_v1_1_3 => 1.1.11/templates/library/base_v1_1_4}/utils.py (100%) rename trains/stable/pihole/{1.1.10 => 1.1.11}/templates/test_values/basic-values.yaml (100%) rename trains/stable/pihole/{1.1.10 => 1.1.11}/templates/test_values/dhcp-values.yaml (100%) delete mode 100644 trains/stable/plex/1.0.22/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/stable/plex/1.0.22/templates/library/base_v1_1_3/permissions.py rename trains/stable/plex/{1.0.22 => 1.0.23}/README.md (100%) rename trains/stable/plex/{1.0.22 => 1.0.23}/app.yaml (91%) rename trains/stable/plex/{1.0.22 => 1.0.23}/ix_values.yaml (100%) rename trains/stable/plex/{1.0.22 => 1.0.23}/migrations/__init__.py (100%) rename trains/stable/plex/{1.0.22 => 1.0.23}/migrations/migrate_from_kubernetes (100%) rename trains/stable/plex/{1.0.22 => 1.0.23}/migrations/migration_helpers/__init__.py (100%) rename trains/stable/plex/{1.0.22 => 1.0.23}/migrations/migration_helpers/cpu.py (100%) rename trains/stable/plex/{1.0.22 => 1.0.23}/migrations/migration_helpers/dns_config.py (100%) rename trains/stable/plex/{1.0.22 => 1.0.23}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/stable/plex/{1.0.22 => 1.0.23}/migrations/migration_helpers/memory.py (100%) rename trains/stable/plex/{1.0.22 => 1.0.23}/migrations/migration_helpers/resources.py (100%) rename trains/stable/plex/{1.0.22 => 1.0.23}/migrations/migration_helpers/storage.py (100%) rename trains/stable/plex/{1.0.22 => 1.0.23}/questions.yaml (100%) rename trains/stable/plex/{1.0.22 => 1.0.23}/templates/docker-compose.yaml (100%) rename trains/stable/plex/{1.0.22/templates/library/base_v1_1_3 => 1.0.23/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/stable/plex/{1.0.22/templates/library/base_v1_1_3 => 1.0.23/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/stable/plex/1.0.23/templates/library/base_v1_1_4/healthchecks.py rename trains/stable/plex/{1.0.22/templates/library/base_v1_1_3 => 1.0.23/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/stable/plex/{1.0.22/templates/library/base_v1_1_3 => 1.0.23/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/stable/plex/{1.0.22/templates/library/base_v1_1_3 => 1.0.23/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/stable/plex/1.0.23/templates/library/base_v1_1_4/permissions.py rename trains/stable/plex/{1.0.22/templates/library/base_v1_1_3 => 1.0.23/templates/library/base_v1_1_4}/ports.py (100%) rename trains/stable/plex/{1.0.22/templates/library/base_v1_1_3 => 1.0.23/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/stable/plex/{1.0.22/templates/library/base_v1_1_3 => 1.0.23/templates/library/base_v1_1_4}/redis.py (100%) rename trains/stable/plex/{1.0.22/templates/library/base_v1_1_3 => 1.0.23/templates/library/base_v1_1_4}/resources.py (100%) rename trains/stable/plex/{1.0.22/templates/library/base_v1_1_3 => 1.0.23/templates/library/base_v1_1_4}/security.py (100%) rename trains/stable/plex/{1.0.22/templates/library/base_v1_1_3 => 1.0.23/templates/library/base_v1_1_4}/storage.py (100%) rename trains/stable/plex/{1.0.22/templates/library/base_v1_1_3 => 1.0.23/templates/library/base_v1_1_4}/utils.py (100%) rename trains/stable/plex/{1.0.22 => 1.0.23}/templates/test_values/basic-values.yaml (100%) rename trains/stable/plex/{1.0.22 => 1.0.23}/templates/test_values/hostnet-values.yaml (100%) delete mode 100644 trains/stable/prometheus/1.1.10/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/stable/prometheus/1.1.10/templates/library/base_v1_1_3/permissions.py rename trains/stable/prometheus/{1.1.10 => 1.1.11}/README.md (100%) rename trains/stable/prometheus/{1.1.10 => 1.1.11}/app.yaml (86%) rename trains/stable/prometheus/{1.1.10 => 1.1.11}/ix_values.yaml (100%) rename trains/stable/prometheus/{1.1.10 => 1.1.11}/migrations/migrate_from_kubernetes (100%) rename trains/stable/prometheus/{1.1.10 => 1.1.11}/migrations/migration_helpers/__init__.py (100%) rename trains/stable/prometheus/{1.1.10 => 1.1.11}/migrations/migration_helpers/cpu.py (100%) rename trains/stable/prometheus/{1.1.10 => 1.1.11}/migrations/migration_helpers/dns_config.py (100%) rename trains/stable/prometheus/{1.1.10 => 1.1.11}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/stable/prometheus/{1.1.10 => 1.1.11}/migrations/migration_helpers/memory.py (100%) rename trains/stable/prometheus/{1.1.10 => 1.1.11}/migrations/migration_helpers/resources.py (100%) rename trains/stable/prometheus/{1.1.10 => 1.1.11}/migrations/migration_helpers/storage.py (100%) rename trains/stable/prometheus/{1.1.10 => 1.1.11}/questions.yaml (100%) rename trains/stable/prometheus/{1.1.10 => 1.1.11}/templates/docker-compose.yaml (100%) rename trains/stable/prometheus/{1.1.10/templates/library/base_v1_1_3 => 1.1.11/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/stable/prometheus/{1.1.10/templates/library/base_v1_1_3 => 1.1.11/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/stable/prometheus/1.1.11/templates/library/base_v1_1_4/healthchecks.py rename trains/stable/prometheus/{1.1.10/templates/library/base_v1_1_3 => 1.1.11/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/stable/prometheus/{1.1.10/templates/library/base_v1_1_3 => 1.1.11/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/stable/prometheus/{1.1.10/templates/library/base_v1_1_3 => 1.1.11/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/stable/prometheus/1.1.11/templates/library/base_v1_1_4/permissions.py rename trains/stable/prometheus/{1.1.10/templates/library/base_v1_1_3 => 1.1.11/templates/library/base_v1_1_4}/ports.py (100%) rename trains/stable/prometheus/{1.1.10/templates/library/base_v1_1_3 => 1.1.11/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/stable/prometheus/{1.1.10/templates/library/base_v1_1_3 => 1.1.11/templates/library/base_v1_1_4}/redis.py (100%) rename trains/stable/prometheus/{1.1.10/templates/library/base_v1_1_3 => 1.1.11/templates/library/base_v1_1_4}/resources.py (100%) rename trains/stable/prometheus/{1.1.10/templates/library/base_v1_1_3 => 1.1.11/templates/library/base_v1_1_4}/security.py (100%) rename trains/stable/prometheus/{1.1.10/templates/library/base_v1_1_3 => 1.1.11/templates/library/base_v1_1_4}/storage.py (100%) rename trains/stable/prometheus/{1.1.10/templates/library/base_v1_1_3 => 1.1.11/templates/library/base_v1_1_4}/utils.py (100%) rename trains/stable/prometheus/{1.1.10 => 1.1.11}/templates/test_values/basic-values.yaml (100%) rename trains/stable/prometheus/{1.1.10 => 1.1.11}/templates/test_values/hostnet-values.yaml (100%) rename trains/stable/storj/{1.1.9 => 1.1.10}/README.md (100%) rename trains/stable/storj/{1.1.9 => 1.1.10}/app.yaml (89%) rename trains/stable/storj/{1.1.9 => 1.1.10}/ix_values.yaml (100%) rename trains/stable/storj/{1.1.9 => 1.1.10}/migrations/migrate_from_kubernetes (100%) rename trains/stable/storj/{1.1.9 => 1.1.10}/migrations/migration_helpers/__init__.py (100%) rename trains/stable/storj/{1.1.9 => 1.1.10}/migrations/migration_helpers/cpu.py (100%) rename trains/stable/storj/{1.1.9 => 1.1.10}/migrations/migration_helpers/dns_config.py (100%) rename trains/stable/storj/{1.1.9 => 1.1.10}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/stable/storj/{1.1.9 => 1.1.10}/migrations/migration_helpers/memory.py (100%) rename trains/stable/storj/{1.1.9 => 1.1.10}/migrations/migration_helpers/resources.py (100%) rename trains/stable/storj/{1.1.9 => 1.1.10}/migrations/migration_helpers/storage.py (100%) rename trains/stable/storj/{1.1.9 => 1.1.10}/questions.yaml (100%) rename trains/stable/storj/{1.1.9 => 1.1.10}/templates/docker-compose.yaml (100%) rename trains/stable/storj/{1.1.9/templates/library/base_v1_1_3 => 1.1.10/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/stable/storj/{1.1.9/templates/library/base_v1_1_3 => 1.1.10/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/stable/storj/1.1.10/templates/library/base_v1_1_4/healthchecks.py rename trains/stable/storj/{1.1.9/templates/library/base_v1_1_3 => 1.1.10/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/stable/storj/{1.1.9/templates/library/base_v1_1_3 => 1.1.10/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/stable/storj/{1.1.9/templates/library/base_v1_1_3 => 1.1.10/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/stable/storj/1.1.10/templates/library/base_v1_1_4/permissions.py rename trains/stable/storj/{1.1.9/templates/library/base_v1_1_3 => 1.1.10/templates/library/base_v1_1_4}/ports.py (100%) rename trains/stable/storj/{1.1.9/templates/library/base_v1_1_3 => 1.1.10/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/stable/storj/{1.1.9/templates/library/base_v1_1_3 => 1.1.10/templates/library/base_v1_1_4}/redis.py (100%) rename trains/stable/storj/{1.1.9/templates/library/base_v1_1_3 => 1.1.10/templates/library/base_v1_1_4}/resources.py (100%) rename trains/stable/storj/{1.1.9/templates/library/base_v1_1_3 => 1.1.10/templates/library/base_v1_1_4}/security.py (100%) rename trains/stable/storj/{1.1.9/templates/library/base_v1_1_3 => 1.1.10/templates/library/base_v1_1_4}/storage.py (100%) rename trains/stable/storj/{1.1.9/templates/library/base_v1_1_3 => 1.1.10/templates/library/base_v1_1_4}/utils.py (100%) rename trains/stable/storj/{1.1.9 => 1.1.10}/templates/macros/init.sh (100%) rename trains/stable/storj/{1.1.9 => 1.1.10}/templates/test_values/basic-values.yaml (100%) delete mode 100644 trains/stable/storj/1.1.9/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/stable/storj/1.1.9/templates/library/base_v1_1_3/permissions.py delete mode 100644 trains/stable/syncthing/1.0.26/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/stable/syncthing/1.0.26/templates/library/base_v1_1_3/permissions.py rename trains/stable/syncthing/{1.0.26 => 1.0.27}/README.md (100%) rename trains/stable/syncthing/{1.0.26 => 1.0.27}/app.yaml (93%) rename trains/stable/syncthing/{1.0.26 => 1.0.27}/ix_values.yaml (100%) rename trains/stable/syncthing/{1.0.26 => 1.0.27}/migrations/migrate_from_kubernetes (100%) rename trains/stable/syncthing/{1.0.26 => 1.0.27}/migrations/migration_helpers/__init__.py (100%) rename trains/stable/syncthing/{1.0.26 => 1.0.27}/migrations/migration_helpers/cpu.py (100%) rename trains/stable/syncthing/{1.0.26 => 1.0.27}/migrations/migration_helpers/dns_config.py (100%) rename trains/stable/syncthing/{1.0.26 => 1.0.27}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/stable/syncthing/{1.0.26 => 1.0.27}/migrations/migration_helpers/memory.py (100%) rename trains/stable/syncthing/{1.0.26 => 1.0.27}/migrations/migration_helpers/resources.py (100%) rename trains/stable/syncthing/{1.0.26 => 1.0.27}/migrations/migration_helpers/storage.py (100%) rename trains/stable/syncthing/{1.0.26 => 1.0.27}/questions.yaml (100%) rename trains/stable/syncthing/{1.0.26 => 1.0.27}/templates/docker-compose.yaml (100%) rename trains/stable/syncthing/{1.0.26/templates/library/base_v1_1_3 => 1.0.27/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/stable/syncthing/{1.0.26/templates/library/base_v1_1_3 => 1.0.27/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/stable/syncthing/1.0.27/templates/library/base_v1_1_4/healthchecks.py rename trains/stable/syncthing/{1.0.26/templates/library/base_v1_1_3 => 1.0.27/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/stable/syncthing/{1.0.26/templates/library/base_v1_1_3 => 1.0.27/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/stable/syncthing/{1.0.26/templates/library/base_v1_1_3 => 1.0.27/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/stable/syncthing/1.0.27/templates/library/base_v1_1_4/permissions.py rename trains/stable/syncthing/{1.0.26/templates/library/base_v1_1_3 => 1.0.27/templates/library/base_v1_1_4}/ports.py (100%) rename trains/stable/syncthing/{1.0.26/templates/library/base_v1_1_3 => 1.0.27/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/stable/syncthing/{1.0.26/templates/library/base_v1_1_3 => 1.0.27/templates/library/base_v1_1_4}/redis.py (100%) rename trains/stable/syncthing/{1.0.26/templates/library/base_v1_1_3 => 1.0.27/templates/library/base_v1_1_4}/resources.py (100%) rename trains/stable/syncthing/{1.0.26/templates/library/base_v1_1_3 => 1.0.27/templates/library/base_v1_1_4}/security.py (100%) rename trains/stable/syncthing/{1.0.26/templates/library/base_v1_1_3 => 1.0.27/templates/library/base_v1_1_4}/storage.py (100%) rename trains/stable/syncthing/{1.0.26/templates/library/base_v1_1_3 => 1.0.27/templates/library/base_v1_1_4}/utils.py (100%) rename trains/stable/syncthing/{1.0.26 => 1.0.27}/templates/test_values/basic-values.yaml (100%) rename trains/stable/syncthing/{1.0.26 => 1.0.27}/templates/test_values/host-values.yaml (100%) delete mode 100644 trains/stable/wg-easy/1.0.19/templates/library/base_v1_1_3/healthchecks.py delete mode 100644 trains/stable/wg-easy/1.0.19/templates/library/base_v1_1_3/permissions.py rename trains/stable/wg-easy/{1.0.19 => 1.0.20}/README.md (100%) rename trains/stable/wg-easy/{1.0.19 => 1.0.20}/app.yaml (88%) rename trains/stable/wg-easy/{1.0.19 => 1.0.20}/ix_values.yaml (100%) rename trains/stable/wg-easy/{1.0.19 => 1.0.20}/migrations/migrate_from_kubernetes (100%) rename trains/stable/wg-easy/{1.0.19 => 1.0.20}/migrations/migration_helpers/__init__.py (100%) rename trains/stable/wg-easy/{1.0.19 => 1.0.20}/migrations/migration_helpers/cpu.py (100%) rename trains/stable/wg-easy/{1.0.19 => 1.0.20}/migrations/migration_helpers/dns_config.py (100%) rename trains/stable/wg-easy/{1.0.19 => 1.0.20}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/stable/wg-easy/{1.0.19 => 1.0.20}/migrations/migration_helpers/memory.py (100%) rename trains/stable/wg-easy/{1.0.19 => 1.0.20}/migrations/migration_helpers/resources.py (100%) rename trains/stable/wg-easy/{1.0.19 => 1.0.20}/migrations/migration_helpers/storage.py (100%) rename trains/stable/wg-easy/{1.0.19 => 1.0.20}/questions.yaml (100%) rename trains/stable/wg-easy/{1.0.19 => 1.0.20}/templates/docker-compose.yaml (100%) rename trains/stable/wg-easy/{1.0.19/templates/library/base_v1_1_3 => 1.0.20/templates/library/base_v1_1_4}/__init__.py (100%) rename trains/stable/wg-easy/{1.0.19/templates/library/base_v1_1_3 => 1.0.20/templates/library/base_v1_1_4}/environment.py (100%) create mode 100644 trains/stable/wg-easy/1.0.20/templates/library/base_v1_1_4/healthchecks.py rename trains/stable/wg-easy/{1.0.19/templates/library/base_v1_1_3 => 1.0.20/templates/library/base_v1_1_4}/mariadb.py (100%) rename trains/stable/wg-easy/{1.0.19/templates/library/base_v1_1_3 => 1.0.20/templates/library/base_v1_1_4}/metadata.py (100%) rename trains/stable/wg-easy/{1.0.19/templates/library/base_v1_1_3 => 1.0.20/templates/library/base_v1_1_4}/network.py (100%) create mode 100644 trains/stable/wg-easy/1.0.20/templates/library/base_v1_1_4/permissions.py rename trains/stable/wg-easy/{1.0.19/templates/library/base_v1_1_3 => 1.0.20/templates/library/base_v1_1_4}/ports.py (100%) rename trains/stable/wg-easy/{1.0.19/templates/library/base_v1_1_3 => 1.0.20/templates/library/base_v1_1_4}/postgres.py (100%) rename trains/stable/wg-easy/{1.0.19/templates/library/base_v1_1_3 => 1.0.20/templates/library/base_v1_1_4}/redis.py (100%) rename trains/stable/wg-easy/{1.0.19/templates/library/base_v1_1_3 => 1.0.20/templates/library/base_v1_1_4}/resources.py (100%) rename trains/stable/wg-easy/{1.0.19/templates/library/base_v1_1_3 => 1.0.20/templates/library/base_v1_1_4}/security.py (100%) rename trains/stable/wg-easy/{1.0.19/templates/library/base_v1_1_3 => 1.0.20/templates/library/base_v1_1_4}/storage.py (100%) rename trains/stable/wg-easy/{1.0.19/templates/library/base_v1_1_3 => 1.0.20/templates/library/base_v1_1_4}/utils.py (100%) rename trains/stable/wg-easy/{1.0.19 => 1.0.20}/templates/test_values/basic-values.yaml (100%) rename trains/stable/wg-easy/{1.0.19 => 1.0.20}/templates/test_values/hostnet-values.yaml (100%) diff --git a/trains/community/actual-budget/1.1.12/README.md b/trains/community/actual-budget/1.1.13/README.md similarity index 100% rename from trains/community/actual-budget/1.1.12/README.md rename to trains/community/actual-budget/1.1.13/README.md diff --git a/trains/community/actual-budget/1.1.12/app.yaml b/trains/community/actual-budget/1.1.13/app.yaml similarity index 89% rename from trains/community/actual-budget/1.1.12/app.yaml rename to trains/community/actual-budget/1.1.13/app.yaml index 99f80ee686..da8b9200ea 100644 --- a/trains/community/actual-budget/1.1.12/app.yaml +++ b/trains/community/actual-budget/1.1.13/app.yaml @@ -10,8 +10,8 @@ icon: https://media.sys.truenas.net/apps/actual-budget/icons/icon.png keywords: - finance - budget -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -33,4 +33,4 @@ sources: - https://hub.docker.com/r/actualbudget/actual-server title: Actual Budget train: community -version: 1.1.12 +version: 1.1.13 diff --git a/trains/community/actual-budget/1.1.12/ix_values.yaml b/trains/community/actual-budget/1.1.13/ix_values.yaml similarity index 100% rename from trains/community/actual-budget/1.1.12/ix_values.yaml rename to trains/community/actual-budget/1.1.13/ix_values.yaml diff --git a/trains/community/actual-budget/1.1.12/migrations/migrate_from_kubernetes b/trains/community/actual-budget/1.1.13/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/actual-budget/1.1.12/migrations/migrate_from_kubernetes rename to trains/community/actual-budget/1.1.13/migrations/migrate_from_kubernetes diff --git a/trains/community/actual-budget/1.1.12/migrations/migration_helpers/__init__.py b/trains/community/actual-budget/1.1.13/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/actual-budget/1.1.12/migrations/migration_helpers/__init__.py rename to trains/community/actual-budget/1.1.13/migrations/migration_helpers/__init__.py diff --git a/trains/community/actual-budget/1.1.12/migrations/migration_helpers/cpu.py b/trains/community/actual-budget/1.1.13/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/actual-budget/1.1.12/migrations/migration_helpers/cpu.py rename to trains/community/actual-budget/1.1.13/migrations/migration_helpers/cpu.py diff --git a/trains/community/actual-budget/1.1.12/migrations/migration_helpers/dns_config.py b/trains/community/actual-budget/1.1.13/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/actual-budget/1.1.12/migrations/migration_helpers/dns_config.py rename to trains/community/actual-budget/1.1.13/migrations/migration_helpers/dns_config.py diff --git a/trains/community/actual-budget/1.1.12/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/actual-budget/1.1.13/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/actual-budget/1.1.12/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/actual-budget/1.1.13/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/actual-budget/1.1.12/migrations/migration_helpers/memory.py b/trains/community/actual-budget/1.1.13/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/actual-budget/1.1.12/migrations/migration_helpers/memory.py rename to trains/community/actual-budget/1.1.13/migrations/migration_helpers/memory.py diff --git a/trains/community/actual-budget/1.1.12/migrations/migration_helpers/resources.py b/trains/community/actual-budget/1.1.13/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/actual-budget/1.1.12/migrations/migration_helpers/resources.py rename to trains/community/actual-budget/1.1.13/migrations/migration_helpers/resources.py diff --git a/trains/community/actual-budget/1.1.12/migrations/migration_helpers/storage.py b/trains/community/actual-budget/1.1.13/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/actual-budget/1.1.12/migrations/migration_helpers/storage.py rename to trains/community/actual-budget/1.1.13/migrations/migration_helpers/storage.py diff --git a/trains/community/actual-budget/1.1.12/questions.yaml b/trains/community/actual-budget/1.1.13/questions.yaml similarity index 100% rename from trains/community/actual-budget/1.1.12/questions.yaml rename to trains/community/actual-budget/1.1.13/questions.yaml diff --git a/trains/community/actual-budget/1.1.12/templates/docker-compose.yaml b/trains/community/actual-budget/1.1.13/templates/docker-compose.yaml similarity index 97% rename from trains/community/actual-budget/1.1.12/templates/docker-compose.yaml rename to trains/community/actual-budget/1.1.13/templates/docker-compose.yaml index 4c17f83ffc..acaacce96d 100644 --- a/trains/community/actual-budget/1.1.12/templates/docker-compose.yaml +++ b/trains/community/actual-budget/1.1.13/templates/docker-compose.yaml @@ -64,7 +64,7 @@ services: {% if values.network.dns_opts %} dns_opt: {{ ix_lib.base.network.dns_opts(values.network.dns_opts) | tojson }} {% endif %} - {% set test = ix_lib.base.healthchecks.http_test(path="/health", port=values.network.web_port) %} + {% set test = "NODE_TLS_REJECT_UNAUTHORIZED=0 npm run health-check" %} healthcheck: {{ ix_lib.base.healthchecks.check_health(test) | tojson }} {% set app_env = { "ACTUAL_PORT": values.network.web_port, diff --git a/trains/community/actual-budget/1.1.12/templates/library/base_v1_1_3/__init__.py b/trains/community/actual-budget/1.1.13/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/actual-budget/1.1.12/templates/library/base_v1_1_3/__init__.py rename to trains/community/actual-budget/1.1.13/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/actual-budget/1.1.12/templates/library/base_v1_1_3/environment.py b/trains/community/actual-budget/1.1.13/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/actual-budget/1.1.12/templates/library/base_v1_1_3/environment.py rename to trains/community/actual-budget/1.1.13/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/audiobookshelf/1.2.13/templates/library/base_v1_1_3/healthchecks.py b/trains/community/actual-budget/1.1.13/templates/library/base_v1_1_4/healthchecks.py similarity index 92% rename from trains/community/audiobookshelf/1.2.13/templates/library/base_v1_1_3/healthchecks.py rename to trains/community/actual-budget/1.1.13/templates/library/base_v1_1_4/healthchecks.py index 09f8ac53fd..cc98270d1d 100644 --- a/trains/community/audiobookshelf/1.2.13/templates/library/base_v1_1_3/healthchecks.py +++ b/trains/community/actual-budget/1.1.13/templates/library/base_v1_1_4/healthchecks.py @@ -95,10 +95,9 @@ def http_test(port, path, config=None): host = config.get("host", "127.0.0.1") - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa def netcat_test(port, config=None): diff --git a/trains/community/actual-budget/1.1.12/templates/library/base_v1_1_3/mariadb.py b/trains/community/actual-budget/1.1.13/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/actual-budget/1.1.12/templates/library/base_v1_1_3/mariadb.py rename to trains/community/actual-budget/1.1.13/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/actual-budget/1.1.12/templates/library/base_v1_1_3/metadata.py b/trains/community/actual-budget/1.1.13/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/actual-budget/1.1.12/templates/library/base_v1_1_3/metadata.py rename to trains/community/actual-budget/1.1.13/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/actual-budget/1.1.12/templates/library/base_v1_1_3/network.py b/trains/community/actual-budget/1.1.13/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/actual-budget/1.1.12/templates/library/base_v1_1_3/network.py rename to trains/community/actual-budget/1.1.13/templates/library/base_v1_1_4/network.py diff --git a/trains/community/adguard-home/1.0.21/templates/library/base_v1_1_3/permissions.py b/trains/community/actual-budget/1.1.13/templates/library/base_v1_1_4/permissions.py similarity index 98% rename from trains/community/adguard-home/1.0.21/templates/library/base_v1_1_3/permissions.py rename to trains/community/actual-budget/1.1.13/templates/library/base_v1_1_4/permissions.py index 7d98983af6..1ce6e60ca1 100644 --- a/trains/community/adguard-home/1.0.21/templates/library/base_v1_1_3/permissions.py +++ b/trains/community/actual-budget/1.1.13/templates/library/base_v1_1_4/permissions.py @@ -70,12 +70,12 @@ def process_dir_shell_func(): if [ -z "$$dir" ]; then echo "Path is empty, skipping..." - exit 0 + return 0 fi if [ ! -d "$$dir" ]; then echo "Path [$$dir] does is not a directory, skipping..." - exit 0 + return 0 fi if [ "$$is_temporary" = "true" ]; then @@ -86,7 +86,7 @@ def process_dir_shell_func(): if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then echo "Path [$$dir] is not empty, skipping..." - exit 0 + return 0 fi echo "Current Ownership and Permissions on [$$dir]:" diff --git a/trains/community/actual-budget/1.1.12/templates/library/base_v1_1_3/ports.py b/trains/community/actual-budget/1.1.13/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/actual-budget/1.1.12/templates/library/base_v1_1_3/ports.py rename to trains/community/actual-budget/1.1.13/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/actual-budget/1.1.12/templates/library/base_v1_1_3/postgres.py b/trains/community/actual-budget/1.1.13/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/actual-budget/1.1.12/templates/library/base_v1_1_3/postgres.py rename to trains/community/actual-budget/1.1.13/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/actual-budget/1.1.12/templates/library/base_v1_1_3/redis.py b/trains/community/actual-budget/1.1.13/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/actual-budget/1.1.12/templates/library/base_v1_1_3/redis.py rename to trains/community/actual-budget/1.1.13/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/actual-budget/1.1.12/templates/library/base_v1_1_3/resources.py b/trains/community/actual-budget/1.1.13/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/actual-budget/1.1.12/templates/library/base_v1_1_3/resources.py rename to trains/community/actual-budget/1.1.13/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/actual-budget/1.1.12/templates/library/base_v1_1_3/security.py b/trains/community/actual-budget/1.1.13/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/actual-budget/1.1.12/templates/library/base_v1_1_3/security.py rename to trains/community/actual-budget/1.1.13/templates/library/base_v1_1_4/security.py diff --git a/trains/community/actual-budget/1.1.12/templates/library/base_v1_1_3/storage.py b/trains/community/actual-budget/1.1.13/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/actual-budget/1.1.12/templates/library/base_v1_1_3/storage.py rename to trains/community/actual-budget/1.1.13/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/actual-budget/1.1.12/templates/library/base_v1_1_3/utils.py b/trains/community/actual-budget/1.1.13/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/actual-budget/1.1.12/templates/library/base_v1_1_3/utils.py rename to trains/community/actual-budget/1.1.13/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/actual-budget/1.1.12/templates/test_values/basic-values.yaml b/trains/community/actual-budget/1.1.13/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/actual-budget/1.1.12/templates/test_values/basic-values.yaml rename to trains/community/actual-budget/1.1.13/templates/test_values/basic-values.yaml diff --git a/trains/community/actual-budget/1.1.12/templates/test_values/hostnet-values.yaml b/trains/community/actual-budget/1.1.13/templates/test_values/hostnet-values.yaml similarity index 100% rename from trains/community/actual-budget/1.1.12/templates/test_values/hostnet-values.yaml rename to trains/community/actual-budget/1.1.13/templates/test_values/hostnet-values.yaml diff --git a/trains/community/actual-budget/1.1.12/templates/test_values/https-values.yaml b/trains/community/actual-budget/1.1.13/templates/test_values/https-values.yaml similarity index 100% rename from trains/community/actual-budget/1.1.12/templates/test_values/https-values.yaml rename to trains/community/actual-budget/1.1.13/templates/test_values/https-values.yaml diff --git a/trains/community/adguard-home/1.0.21/README.md b/trains/community/adguard-home/1.0.22/README.md similarity index 100% rename from trains/community/adguard-home/1.0.21/README.md rename to trains/community/adguard-home/1.0.22/README.md diff --git a/trains/community/adguard-home/1.0.21/app.yaml b/trains/community/adguard-home/1.0.22/app.yaml similarity index 91% rename from trains/community/adguard-home/1.0.21/app.yaml rename to trains/community/adguard-home/1.0.22/app.yaml index 70dc200215..d653369b6c 100644 --- a/trains/community/adguard-home/1.0.21/app.yaml +++ b/trains/community/adguard-home/1.0.22/app.yaml @@ -18,8 +18,8 @@ icon: https://media.sys.truenas.net/apps/adguard-home/icons/icon.svg keywords: - dns - adblock -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -40,4 +40,4 @@ sources: - https://hub.docker.com/r/adguard/adguardhome title: AdGuard Home train: community -version: 1.0.21 +version: 1.0.22 diff --git a/trains/community/adguard-home/1.0.21/ix_values.yaml b/trains/community/adguard-home/1.0.22/ix_values.yaml similarity index 100% rename from trains/community/adguard-home/1.0.21/ix_values.yaml rename to trains/community/adguard-home/1.0.22/ix_values.yaml diff --git a/trains/community/adguard-home/1.0.21/migrations/migrate_from_kubernetes b/trains/community/adguard-home/1.0.22/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/adguard-home/1.0.21/migrations/migrate_from_kubernetes rename to trains/community/adguard-home/1.0.22/migrations/migrate_from_kubernetes diff --git a/trains/community/adguard-home/1.0.21/migrations/migration_helpers/__init__.py b/trains/community/adguard-home/1.0.22/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/adguard-home/1.0.21/migrations/migration_helpers/__init__.py rename to trains/community/adguard-home/1.0.22/migrations/migration_helpers/__init__.py diff --git a/trains/community/adguard-home/1.0.21/migrations/migration_helpers/cpu.py b/trains/community/adguard-home/1.0.22/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/adguard-home/1.0.21/migrations/migration_helpers/cpu.py rename to trains/community/adguard-home/1.0.22/migrations/migration_helpers/cpu.py diff --git a/trains/community/adguard-home/1.0.21/migrations/migration_helpers/dns_config.py b/trains/community/adguard-home/1.0.22/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/adguard-home/1.0.21/migrations/migration_helpers/dns_config.py rename to trains/community/adguard-home/1.0.22/migrations/migration_helpers/dns_config.py diff --git a/trains/community/adguard-home/1.0.21/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/adguard-home/1.0.22/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/adguard-home/1.0.21/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/adguard-home/1.0.22/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/adguard-home/1.0.21/migrations/migration_helpers/memory.py b/trains/community/adguard-home/1.0.22/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/adguard-home/1.0.21/migrations/migration_helpers/memory.py rename to trains/community/adguard-home/1.0.22/migrations/migration_helpers/memory.py diff --git a/trains/community/adguard-home/1.0.21/migrations/migration_helpers/resources.py b/trains/community/adguard-home/1.0.22/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/adguard-home/1.0.21/migrations/migration_helpers/resources.py rename to trains/community/adguard-home/1.0.22/migrations/migration_helpers/resources.py diff --git a/trains/community/adguard-home/1.0.21/migrations/migration_helpers/storage.py b/trains/community/adguard-home/1.0.22/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/adguard-home/1.0.21/migrations/migration_helpers/storage.py rename to trains/community/adguard-home/1.0.22/migrations/migration_helpers/storage.py diff --git a/trains/community/adguard-home/1.0.21/questions.yaml b/trains/community/adguard-home/1.0.22/questions.yaml similarity index 100% rename from trains/community/adguard-home/1.0.21/questions.yaml rename to trains/community/adguard-home/1.0.22/questions.yaml diff --git a/trains/community/adguard-home/1.0.21/templates/docker-compose.yaml b/trains/community/adguard-home/1.0.22/templates/docker-compose.yaml similarity index 96% rename from trains/community/adguard-home/1.0.21/templates/docker-compose.yaml rename to trains/community/adguard-home/1.0.22/templates/docker-compose.yaml index b179fa3472..a05d314666 100644 --- a/trains/community/adguard-home/1.0.21/templates/docker-compose.yaml +++ b/trains/community/adguard-home/1.0.22/templates/docker-compose.yaml @@ -49,7 +49,7 @@ services: {% if values.network.dns_opts %} dns_opt: {{ ix_lib.base.network.dns_opts(values.network.dns_opts) | tojson }} {% endif %} - {% set test = ix_lib.base.healthchecks.wget_test(port=values.network.web_port, path="/health-check", config={"scheme": "https" if values.adguard.use_https_probe else "http"}) %} + {% set test = ix_lib.base.healthchecks.wget_test(port=values.network.web_port, path="/", config={"scheme": "https" if values.adguard.use_https_probe else "http"}) %} healthcheck: {{ ix_lib.base.healthchecks.check_health(test) | tojson }} environment: {{ ix_lib.base.environment.envs(app={}, user=values.adguard.additional_envs,values=values) | tojson }} {% if not values.network.host_network and not values.network.dhcp_enabled %} diff --git a/trains/community/adguard-home/1.0.21/templates/library/base_v1_1_3/__init__.py b/trains/community/adguard-home/1.0.22/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/adguard-home/1.0.21/templates/library/base_v1_1_3/__init__.py rename to trains/community/adguard-home/1.0.22/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/adguard-home/1.0.21/templates/library/base_v1_1_3/environment.py b/trains/community/adguard-home/1.0.22/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/adguard-home/1.0.21/templates/library/base_v1_1_3/environment.py rename to trains/community/adguard-home/1.0.22/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/adguard-home/1.0.21/templates/library/base_v1_1_3/healthchecks.py b/trains/community/adguard-home/1.0.22/templates/library/base_v1_1_4/healthchecks.py similarity index 92% rename from trains/community/adguard-home/1.0.21/templates/library/base_v1_1_3/healthchecks.py rename to trains/community/adguard-home/1.0.22/templates/library/base_v1_1_4/healthchecks.py index 09f8ac53fd..cc98270d1d 100644 --- a/trains/community/adguard-home/1.0.21/templates/library/base_v1_1_3/healthchecks.py +++ b/trains/community/adguard-home/1.0.22/templates/library/base_v1_1_4/healthchecks.py @@ -95,10 +95,9 @@ def http_test(port, path, config=None): host = config.get("host", "127.0.0.1") - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa def netcat_test(port, config=None): diff --git a/trains/community/adguard-home/1.0.21/templates/library/base_v1_1_3/mariadb.py b/trains/community/adguard-home/1.0.22/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/adguard-home/1.0.21/templates/library/base_v1_1_3/mariadb.py rename to trains/community/adguard-home/1.0.22/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/adguard-home/1.0.21/templates/library/base_v1_1_3/metadata.py b/trains/community/adguard-home/1.0.22/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/adguard-home/1.0.21/templates/library/base_v1_1_3/metadata.py rename to trains/community/adguard-home/1.0.22/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/adguard-home/1.0.21/templates/library/base_v1_1_3/network.py b/trains/community/adguard-home/1.0.22/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/adguard-home/1.0.21/templates/library/base_v1_1_3/network.py rename to trains/community/adguard-home/1.0.22/templates/library/base_v1_1_4/network.py diff --git a/trains/community/audiobookshelf/1.2.13/templates/library/base_v1_1_3/permissions.py b/trains/community/adguard-home/1.0.22/templates/library/base_v1_1_4/permissions.py similarity index 98% rename from trains/community/audiobookshelf/1.2.13/templates/library/base_v1_1_3/permissions.py rename to trains/community/adguard-home/1.0.22/templates/library/base_v1_1_4/permissions.py index 7d98983af6..1ce6e60ca1 100644 --- a/trains/community/audiobookshelf/1.2.13/templates/library/base_v1_1_3/permissions.py +++ b/trains/community/adguard-home/1.0.22/templates/library/base_v1_1_4/permissions.py @@ -70,12 +70,12 @@ def process_dir_shell_func(): if [ -z "$$dir" ]; then echo "Path is empty, skipping..." - exit 0 + return 0 fi if [ ! -d "$$dir" ]; then echo "Path [$$dir] does is not a directory, skipping..." - exit 0 + return 0 fi if [ "$$is_temporary" = "true" ]; then @@ -86,7 +86,7 @@ def process_dir_shell_func(): if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then echo "Path [$$dir] is not empty, skipping..." - exit 0 + return 0 fi echo "Current Ownership and Permissions on [$$dir]:" diff --git a/trains/community/adguard-home/1.0.21/templates/library/base_v1_1_3/ports.py b/trains/community/adguard-home/1.0.22/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/adguard-home/1.0.21/templates/library/base_v1_1_3/ports.py rename to trains/community/adguard-home/1.0.22/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/adguard-home/1.0.21/templates/library/base_v1_1_3/postgres.py b/trains/community/adguard-home/1.0.22/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/adguard-home/1.0.21/templates/library/base_v1_1_3/postgres.py rename to trains/community/adguard-home/1.0.22/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/adguard-home/1.0.21/templates/library/base_v1_1_3/redis.py b/trains/community/adguard-home/1.0.22/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/adguard-home/1.0.21/templates/library/base_v1_1_3/redis.py rename to trains/community/adguard-home/1.0.22/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/adguard-home/1.0.21/templates/library/base_v1_1_3/resources.py b/trains/community/adguard-home/1.0.22/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/adguard-home/1.0.21/templates/library/base_v1_1_3/resources.py rename to trains/community/adguard-home/1.0.22/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/adguard-home/1.0.21/templates/library/base_v1_1_3/security.py b/trains/community/adguard-home/1.0.22/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/adguard-home/1.0.21/templates/library/base_v1_1_3/security.py rename to trains/community/adguard-home/1.0.22/templates/library/base_v1_1_4/security.py diff --git a/trains/community/adguard-home/1.0.21/templates/library/base_v1_1_3/storage.py b/trains/community/adguard-home/1.0.22/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/adguard-home/1.0.21/templates/library/base_v1_1_3/storage.py rename to trains/community/adguard-home/1.0.22/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/adguard-home/1.0.21/templates/library/base_v1_1_3/utils.py b/trains/community/adguard-home/1.0.22/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/adguard-home/1.0.21/templates/library/base_v1_1_3/utils.py rename to trains/community/adguard-home/1.0.22/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/adguard-home/1.0.21/templates/test_values/basic-values.yaml b/trains/community/adguard-home/1.0.22/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/adguard-home/1.0.21/templates/test_values/basic-values.yaml rename to trains/community/adguard-home/1.0.22/templates/test_values/basic-values.yaml diff --git a/trains/community/adguard-home/1.0.21/templates/test_values/dhcp-values.yaml b/trains/community/adguard-home/1.0.22/templates/test_values/dhcp-values.yaml similarity index 100% rename from trains/community/adguard-home/1.0.21/templates/test_values/dhcp-values.yaml rename to trains/community/adguard-home/1.0.22/templates/test_values/dhcp-values.yaml diff --git a/trains/community/audiobookshelf/1.2.13/README.md b/trains/community/audiobookshelf/1.2.14/README.md similarity index 100% rename from trains/community/audiobookshelf/1.2.13/README.md rename to trains/community/audiobookshelf/1.2.14/README.md diff --git a/trains/community/audiobookshelf/1.2.13/app.yaml b/trains/community/audiobookshelf/1.2.14/app.yaml similarity index 90% rename from trains/community/audiobookshelf/1.2.13/app.yaml rename to trains/community/audiobookshelf/1.2.14/app.yaml index 29a7d316b3..5aab58c295 100644 --- a/trains/community/audiobookshelf/1.2.13/app.yaml +++ b/trains/community/audiobookshelf/1.2.14/app.yaml @@ -9,8 +9,8 @@ icon: https://media.sys.truenas.net/apps/audiobookshelf/icons/icon.svg keywords: - media - audiobook -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -33,4 +33,4 @@ sources: - https://github.com/advplyr/audiobookshelf title: Audiobookshelf train: community -version: 1.2.13 +version: 1.2.14 diff --git a/trains/community/audiobookshelf/1.2.13/ix_values.yaml b/trains/community/audiobookshelf/1.2.14/ix_values.yaml similarity index 100% rename from trains/community/audiobookshelf/1.2.13/ix_values.yaml rename to trains/community/audiobookshelf/1.2.14/ix_values.yaml diff --git a/trains/community/audiobookshelf/1.2.13/migrations/migrate_from_kubernetes b/trains/community/audiobookshelf/1.2.14/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/audiobookshelf/1.2.13/migrations/migrate_from_kubernetes rename to trains/community/audiobookshelf/1.2.14/migrations/migrate_from_kubernetes diff --git a/trains/community/audiobookshelf/1.2.13/migrations/migration_helpers/__init__.py b/trains/community/audiobookshelf/1.2.14/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/audiobookshelf/1.2.13/migrations/migration_helpers/__init__.py rename to trains/community/audiobookshelf/1.2.14/migrations/migration_helpers/__init__.py diff --git a/trains/community/audiobookshelf/1.2.13/migrations/migration_helpers/cpu.py b/trains/community/audiobookshelf/1.2.14/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/audiobookshelf/1.2.13/migrations/migration_helpers/cpu.py rename to trains/community/audiobookshelf/1.2.14/migrations/migration_helpers/cpu.py diff --git a/trains/community/audiobookshelf/1.2.13/migrations/migration_helpers/dns_config.py b/trains/community/audiobookshelf/1.2.14/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/audiobookshelf/1.2.13/migrations/migration_helpers/dns_config.py rename to trains/community/audiobookshelf/1.2.14/migrations/migration_helpers/dns_config.py diff --git a/trains/community/audiobookshelf/1.2.13/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/audiobookshelf/1.2.14/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/audiobookshelf/1.2.13/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/audiobookshelf/1.2.14/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/audiobookshelf/1.2.13/migrations/migration_helpers/memory.py b/trains/community/audiobookshelf/1.2.14/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/audiobookshelf/1.2.13/migrations/migration_helpers/memory.py rename to trains/community/audiobookshelf/1.2.14/migrations/migration_helpers/memory.py diff --git a/trains/community/audiobookshelf/1.2.13/migrations/migration_helpers/resources.py b/trains/community/audiobookshelf/1.2.14/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/audiobookshelf/1.2.13/migrations/migration_helpers/resources.py rename to trains/community/audiobookshelf/1.2.14/migrations/migration_helpers/resources.py diff --git a/trains/community/audiobookshelf/1.2.13/migrations/migration_helpers/storage.py b/trains/community/audiobookshelf/1.2.14/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/audiobookshelf/1.2.13/migrations/migration_helpers/storage.py rename to trains/community/audiobookshelf/1.2.14/migrations/migration_helpers/storage.py diff --git a/trains/community/audiobookshelf/1.2.13/questions.yaml b/trains/community/audiobookshelf/1.2.14/questions.yaml similarity index 100% rename from trains/community/audiobookshelf/1.2.13/questions.yaml rename to trains/community/audiobookshelf/1.2.14/questions.yaml diff --git a/trains/community/audiobookshelf/1.2.13/templates/docker-compose.yaml b/trains/community/audiobookshelf/1.2.14/templates/docker-compose.yaml similarity index 100% rename from trains/community/audiobookshelf/1.2.13/templates/docker-compose.yaml rename to trains/community/audiobookshelf/1.2.14/templates/docker-compose.yaml diff --git a/trains/community/audiobookshelf/1.2.13/templates/library/base_v1_1_3/__init__.py b/trains/community/audiobookshelf/1.2.14/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/audiobookshelf/1.2.13/templates/library/base_v1_1_3/__init__.py rename to trains/community/audiobookshelf/1.2.14/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/audiobookshelf/1.2.13/templates/library/base_v1_1_3/environment.py b/trains/community/audiobookshelf/1.2.14/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/audiobookshelf/1.2.13/templates/library/base_v1_1_3/environment.py rename to trains/community/audiobookshelf/1.2.14/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/actual-budget/1.1.12/templates/library/base_v1_1_3/healthchecks.py b/trains/community/audiobookshelf/1.2.14/templates/library/base_v1_1_4/healthchecks.py similarity index 92% rename from trains/community/actual-budget/1.1.12/templates/library/base_v1_1_3/healthchecks.py rename to trains/community/audiobookshelf/1.2.14/templates/library/base_v1_1_4/healthchecks.py index 09f8ac53fd..cc98270d1d 100644 --- a/trains/community/actual-budget/1.1.12/templates/library/base_v1_1_3/healthchecks.py +++ b/trains/community/audiobookshelf/1.2.14/templates/library/base_v1_1_4/healthchecks.py @@ -95,10 +95,9 @@ def http_test(port, path, config=None): host = config.get("host", "127.0.0.1") - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa def netcat_test(port, config=None): diff --git a/trains/community/audiobookshelf/1.2.13/templates/library/base_v1_1_3/mariadb.py b/trains/community/audiobookshelf/1.2.14/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/audiobookshelf/1.2.13/templates/library/base_v1_1_3/mariadb.py rename to trains/community/audiobookshelf/1.2.14/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/audiobookshelf/1.2.13/templates/library/base_v1_1_3/metadata.py b/trains/community/audiobookshelf/1.2.14/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/audiobookshelf/1.2.13/templates/library/base_v1_1_3/metadata.py rename to trains/community/audiobookshelf/1.2.14/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/audiobookshelf/1.2.13/templates/library/base_v1_1_3/network.py b/trains/community/audiobookshelf/1.2.14/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/audiobookshelf/1.2.13/templates/library/base_v1_1_3/network.py rename to trains/community/audiobookshelf/1.2.14/templates/library/base_v1_1_4/network.py diff --git a/trains/community/autobrr/1.1.13/templates/library/base_v1_1_3/permissions.py b/trains/community/audiobookshelf/1.2.14/templates/library/base_v1_1_4/permissions.py similarity index 98% rename from trains/community/autobrr/1.1.13/templates/library/base_v1_1_3/permissions.py rename to trains/community/audiobookshelf/1.2.14/templates/library/base_v1_1_4/permissions.py index 7d98983af6..1ce6e60ca1 100644 --- a/trains/community/autobrr/1.1.13/templates/library/base_v1_1_3/permissions.py +++ b/trains/community/audiobookshelf/1.2.14/templates/library/base_v1_1_4/permissions.py @@ -70,12 +70,12 @@ def process_dir_shell_func(): if [ -z "$$dir" ]; then echo "Path is empty, skipping..." - exit 0 + return 0 fi if [ ! -d "$$dir" ]; then echo "Path [$$dir] does is not a directory, skipping..." - exit 0 + return 0 fi if [ "$$is_temporary" = "true" ]; then @@ -86,7 +86,7 @@ def process_dir_shell_func(): if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then echo "Path [$$dir] is not empty, skipping..." - exit 0 + return 0 fi echo "Current Ownership and Permissions on [$$dir]:" diff --git a/trains/community/audiobookshelf/1.2.13/templates/library/base_v1_1_3/ports.py b/trains/community/audiobookshelf/1.2.14/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/audiobookshelf/1.2.13/templates/library/base_v1_1_3/ports.py rename to trains/community/audiobookshelf/1.2.14/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/audiobookshelf/1.2.13/templates/library/base_v1_1_3/postgres.py b/trains/community/audiobookshelf/1.2.14/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/audiobookshelf/1.2.13/templates/library/base_v1_1_3/postgres.py rename to trains/community/audiobookshelf/1.2.14/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/audiobookshelf/1.2.13/templates/library/base_v1_1_3/redis.py b/trains/community/audiobookshelf/1.2.14/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/audiobookshelf/1.2.13/templates/library/base_v1_1_3/redis.py rename to trains/community/audiobookshelf/1.2.14/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/audiobookshelf/1.2.13/templates/library/base_v1_1_3/resources.py b/trains/community/audiobookshelf/1.2.14/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/audiobookshelf/1.2.13/templates/library/base_v1_1_3/resources.py rename to trains/community/audiobookshelf/1.2.14/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/audiobookshelf/1.2.13/templates/library/base_v1_1_3/security.py b/trains/community/audiobookshelf/1.2.14/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/audiobookshelf/1.2.13/templates/library/base_v1_1_3/security.py rename to trains/community/audiobookshelf/1.2.14/templates/library/base_v1_1_4/security.py diff --git a/trains/community/audiobookshelf/1.2.13/templates/library/base_v1_1_3/storage.py b/trains/community/audiobookshelf/1.2.14/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/audiobookshelf/1.2.13/templates/library/base_v1_1_3/storage.py rename to trains/community/audiobookshelf/1.2.14/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/audiobookshelf/1.2.13/templates/library/base_v1_1_3/utils.py b/trains/community/audiobookshelf/1.2.14/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/audiobookshelf/1.2.13/templates/library/base_v1_1_3/utils.py rename to trains/community/audiobookshelf/1.2.14/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/audiobookshelf/1.2.13/templates/test_values/basic-values.yaml b/trains/community/audiobookshelf/1.2.14/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/audiobookshelf/1.2.13/templates/test_values/basic-values.yaml rename to trains/community/audiobookshelf/1.2.14/templates/test_values/basic-values.yaml diff --git a/trains/community/autobrr/1.1.13/README.md b/trains/community/autobrr/1.1.14/README.md similarity index 100% rename from trains/community/autobrr/1.1.13/README.md rename to trains/community/autobrr/1.1.14/README.md diff --git a/trains/community/autobrr/1.1.13/app.yaml b/trains/community/autobrr/1.1.14/app.yaml similarity index 87% rename from trains/community/autobrr/1.1.13/app.yaml rename to trains/community/autobrr/1.1.14/app.yaml index 9991351820..e28be7bae6 100644 --- a/trains/community/autobrr/1.1.13/app.yaml +++ b/trains/community/autobrr/1.1.14/app.yaml @@ -10,8 +10,8 @@ keywords: - media - torrent - usenet -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -31,4 +31,4 @@ sources: - https://github.com/autobrr/autobrr title: Autobrr train: community -version: 1.1.13 +version: 1.1.14 diff --git a/trains/community/autobrr/1.1.13/ix_values.yaml b/trains/community/autobrr/1.1.14/ix_values.yaml similarity index 100% rename from trains/community/autobrr/1.1.13/ix_values.yaml rename to trains/community/autobrr/1.1.14/ix_values.yaml diff --git a/trains/community/autobrr/1.1.13/migrations/migrate_from_kubernetes b/trains/community/autobrr/1.1.14/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/autobrr/1.1.13/migrations/migrate_from_kubernetes rename to trains/community/autobrr/1.1.14/migrations/migrate_from_kubernetes diff --git a/trains/community/autobrr/1.1.13/migrations/migration_helpers/__init__.py b/trains/community/autobrr/1.1.14/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/autobrr/1.1.13/migrations/migration_helpers/__init__.py rename to trains/community/autobrr/1.1.14/migrations/migration_helpers/__init__.py diff --git a/trains/community/autobrr/1.1.13/migrations/migration_helpers/cpu.py b/trains/community/autobrr/1.1.14/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/autobrr/1.1.13/migrations/migration_helpers/cpu.py rename to trains/community/autobrr/1.1.14/migrations/migration_helpers/cpu.py diff --git a/trains/community/autobrr/1.1.13/migrations/migration_helpers/dns_config.py b/trains/community/autobrr/1.1.14/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/autobrr/1.1.13/migrations/migration_helpers/dns_config.py rename to trains/community/autobrr/1.1.14/migrations/migration_helpers/dns_config.py diff --git a/trains/community/autobrr/1.1.13/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/autobrr/1.1.14/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/autobrr/1.1.13/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/autobrr/1.1.14/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/autobrr/1.1.13/migrations/migration_helpers/memory.py b/trains/community/autobrr/1.1.14/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/autobrr/1.1.13/migrations/migration_helpers/memory.py rename to trains/community/autobrr/1.1.14/migrations/migration_helpers/memory.py diff --git a/trains/community/autobrr/1.1.13/migrations/migration_helpers/resources.py b/trains/community/autobrr/1.1.14/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/autobrr/1.1.13/migrations/migration_helpers/resources.py rename to trains/community/autobrr/1.1.14/migrations/migration_helpers/resources.py diff --git a/trains/community/autobrr/1.1.13/migrations/migration_helpers/storage.py b/trains/community/autobrr/1.1.14/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/autobrr/1.1.13/migrations/migration_helpers/storage.py rename to trains/community/autobrr/1.1.14/migrations/migration_helpers/storage.py diff --git a/trains/community/autobrr/1.1.13/questions.yaml b/trains/community/autobrr/1.1.14/questions.yaml similarity index 100% rename from trains/community/autobrr/1.1.13/questions.yaml rename to trains/community/autobrr/1.1.14/questions.yaml diff --git a/trains/community/autobrr/1.1.13/templates/docker-compose.yaml b/trains/community/autobrr/1.1.14/templates/docker-compose.yaml similarity index 100% rename from trains/community/autobrr/1.1.13/templates/docker-compose.yaml rename to trains/community/autobrr/1.1.14/templates/docker-compose.yaml diff --git a/trains/community/autobrr/1.1.13/templates/library/base_v1_1_3/__init__.py b/trains/community/autobrr/1.1.14/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/autobrr/1.1.13/templates/library/base_v1_1_3/__init__.py rename to trains/community/autobrr/1.1.14/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/autobrr/1.1.13/templates/library/base_v1_1_3/environment.py b/trains/community/autobrr/1.1.14/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/autobrr/1.1.13/templates/library/base_v1_1_3/environment.py rename to trains/community/autobrr/1.1.14/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/autobrr/1.1.13/templates/library/base_v1_1_3/healthchecks.py b/trains/community/autobrr/1.1.14/templates/library/base_v1_1_4/healthchecks.py similarity index 92% rename from trains/community/autobrr/1.1.13/templates/library/base_v1_1_3/healthchecks.py rename to trains/community/autobrr/1.1.14/templates/library/base_v1_1_4/healthchecks.py index 09f8ac53fd..cc98270d1d 100644 --- a/trains/community/autobrr/1.1.13/templates/library/base_v1_1_3/healthchecks.py +++ b/trains/community/autobrr/1.1.14/templates/library/base_v1_1_4/healthchecks.py @@ -95,10 +95,9 @@ def http_test(port, path, config=None): host = config.get("host", "127.0.0.1") - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa def netcat_test(port, config=None): diff --git a/trains/community/autobrr/1.1.13/templates/library/base_v1_1_3/mariadb.py b/trains/community/autobrr/1.1.14/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/autobrr/1.1.13/templates/library/base_v1_1_3/mariadb.py rename to trains/community/autobrr/1.1.14/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/autobrr/1.1.13/templates/library/base_v1_1_3/metadata.py b/trains/community/autobrr/1.1.14/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/autobrr/1.1.13/templates/library/base_v1_1_3/metadata.py rename to trains/community/autobrr/1.1.14/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/autobrr/1.1.13/templates/library/base_v1_1_3/network.py b/trains/community/autobrr/1.1.14/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/autobrr/1.1.13/templates/library/base_v1_1_3/network.py rename to trains/community/autobrr/1.1.14/templates/library/base_v1_1_4/network.py diff --git a/trains/community/actual-budget/1.1.12/templates/library/base_v1_1_3/permissions.py b/trains/community/autobrr/1.1.14/templates/library/base_v1_1_4/permissions.py similarity index 98% rename from trains/community/actual-budget/1.1.12/templates/library/base_v1_1_3/permissions.py rename to trains/community/autobrr/1.1.14/templates/library/base_v1_1_4/permissions.py index 7d98983af6..1ce6e60ca1 100644 --- a/trains/community/actual-budget/1.1.12/templates/library/base_v1_1_3/permissions.py +++ b/trains/community/autobrr/1.1.14/templates/library/base_v1_1_4/permissions.py @@ -70,12 +70,12 @@ def process_dir_shell_func(): if [ -z "$$dir" ]; then echo "Path is empty, skipping..." - exit 0 + return 0 fi if [ ! -d "$$dir" ]; then echo "Path [$$dir] does is not a directory, skipping..." - exit 0 + return 0 fi if [ "$$is_temporary" = "true" ]; then @@ -86,7 +86,7 @@ def process_dir_shell_func(): if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then echo "Path [$$dir] is not empty, skipping..." - exit 0 + return 0 fi echo "Current Ownership and Permissions on [$$dir]:" diff --git a/trains/community/autobrr/1.1.13/templates/library/base_v1_1_3/ports.py b/trains/community/autobrr/1.1.14/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/autobrr/1.1.13/templates/library/base_v1_1_3/ports.py rename to trains/community/autobrr/1.1.14/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/autobrr/1.1.13/templates/library/base_v1_1_3/postgres.py b/trains/community/autobrr/1.1.14/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/autobrr/1.1.13/templates/library/base_v1_1_3/postgres.py rename to trains/community/autobrr/1.1.14/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/autobrr/1.1.13/templates/library/base_v1_1_3/redis.py b/trains/community/autobrr/1.1.14/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/autobrr/1.1.13/templates/library/base_v1_1_3/redis.py rename to trains/community/autobrr/1.1.14/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/autobrr/1.1.13/templates/library/base_v1_1_3/resources.py b/trains/community/autobrr/1.1.14/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/autobrr/1.1.13/templates/library/base_v1_1_3/resources.py rename to trains/community/autobrr/1.1.14/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/autobrr/1.1.13/templates/library/base_v1_1_3/security.py b/trains/community/autobrr/1.1.14/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/autobrr/1.1.13/templates/library/base_v1_1_3/security.py rename to trains/community/autobrr/1.1.14/templates/library/base_v1_1_4/security.py diff --git a/trains/community/autobrr/1.1.13/templates/library/base_v1_1_3/storage.py b/trains/community/autobrr/1.1.14/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/autobrr/1.1.13/templates/library/base_v1_1_3/storage.py rename to trains/community/autobrr/1.1.14/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/autobrr/1.1.13/templates/library/base_v1_1_3/utils.py b/trains/community/autobrr/1.1.14/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/autobrr/1.1.13/templates/library/base_v1_1_3/utils.py rename to trains/community/autobrr/1.1.14/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/autobrr/1.1.13/templates/test_values/basic-values.yaml b/trains/community/autobrr/1.1.14/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/autobrr/1.1.13/templates/test_values/basic-values.yaml rename to trains/community/autobrr/1.1.14/templates/test_values/basic-values.yaml diff --git a/trains/community/bazarr/1.0.21/templates/library/base_v1_1_3/healthchecks.py b/trains/community/bazarr/1.0.21/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/community/bazarr/1.0.21/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/bazarr/1.0.21/templates/library/base_v1_1_3/permissions.py b/trains/community/bazarr/1.0.21/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/community/bazarr/1.0.21/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/community/bazarr/1.0.21/README.md b/trains/community/bazarr/1.0.22/README.md similarity index 100% rename from trains/community/bazarr/1.0.21/README.md rename to trains/community/bazarr/1.0.22/README.md diff --git a/trains/community/bazarr/1.0.21/app.yaml b/trains/community/bazarr/1.0.22/app.yaml similarity index 87% rename from trains/community/bazarr/1.0.21/app.yaml rename to trains/community/bazarr/1.0.22/app.yaml index f4353208c6..4722d7f18c 100644 --- a/trains/community/bazarr/1.0.21/app.yaml +++ b/trains/community/bazarr/1.0.22/app.yaml @@ -10,8 +10,8 @@ icon: https://media.sys.truenas.net/apps/bazarr/icons/icon.png keywords: - media - subtitles -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -31,4 +31,4 @@ sources: - https://github.com/morpheus65535/bazarr title: Bazarr train: community -version: 1.0.21 +version: 1.0.22 diff --git a/trains/community/bazarr/1.0.21/ix_values.yaml b/trains/community/bazarr/1.0.22/ix_values.yaml similarity index 100% rename from trains/community/bazarr/1.0.21/ix_values.yaml rename to trains/community/bazarr/1.0.22/ix_values.yaml diff --git a/trains/community/bazarr/1.0.21/migrations/migrate_from_kubernetes b/trains/community/bazarr/1.0.22/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/bazarr/1.0.21/migrations/migrate_from_kubernetes rename to trains/community/bazarr/1.0.22/migrations/migrate_from_kubernetes diff --git a/trains/community/bazarr/1.0.21/migrations/migration_helpers/__init__.py b/trains/community/bazarr/1.0.22/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/bazarr/1.0.21/migrations/migration_helpers/__init__.py rename to trains/community/bazarr/1.0.22/migrations/migration_helpers/__init__.py diff --git a/trains/community/bazarr/1.0.21/migrations/migration_helpers/cpu.py b/trains/community/bazarr/1.0.22/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/bazarr/1.0.21/migrations/migration_helpers/cpu.py rename to trains/community/bazarr/1.0.22/migrations/migration_helpers/cpu.py diff --git a/trains/community/bazarr/1.0.21/migrations/migration_helpers/dns_config.py b/trains/community/bazarr/1.0.22/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/bazarr/1.0.21/migrations/migration_helpers/dns_config.py rename to trains/community/bazarr/1.0.22/migrations/migration_helpers/dns_config.py diff --git a/trains/community/bazarr/1.0.21/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/bazarr/1.0.22/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/bazarr/1.0.21/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/bazarr/1.0.22/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/bazarr/1.0.21/migrations/migration_helpers/memory.py b/trains/community/bazarr/1.0.22/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/bazarr/1.0.21/migrations/migration_helpers/memory.py rename to trains/community/bazarr/1.0.22/migrations/migration_helpers/memory.py diff --git a/trains/community/bazarr/1.0.21/migrations/migration_helpers/resources.py b/trains/community/bazarr/1.0.22/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/bazarr/1.0.21/migrations/migration_helpers/resources.py rename to trains/community/bazarr/1.0.22/migrations/migration_helpers/resources.py diff --git a/trains/community/bazarr/1.0.21/migrations/migration_helpers/storage.py b/trains/community/bazarr/1.0.22/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/bazarr/1.0.21/migrations/migration_helpers/storage.py rename to trains/community/bazarr/1.0.22/migrations/migration_helpers/storage.py diff --git a/trains/community/bazarr/1.0.21/questions.yaml b/trains/community/bazarr/1.0.22/questions.yaml similarity index 100% rename from trains/community/bazarr/1.0.21/questions.yaml rename to trains/community/bazarr/1.0.22/questions.yaml diff --git a/trains/community/bazarr/1.0.21/templates/docker-compose.yaml b/trains/community/bazarr/1.0.22/templates/docker-compose.yaml similarity index 100% rename from trains/community/bazarr/1.0.21/templates/docker-compose.yaml rename to trains/community/bazarr/1.0.22/templates/docker-compose.yaml diff --git a/trains/community/bazarr/1.0.21/templates/library/base_v1_1_3/__init__.py b/trains/community/bazarr/1.0.22/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/bazarr/1.0.21/templates/library/base_v1_1_3/__init__.py rename to trains/community/bazarr/1.0.22/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/bazarr/1.0.21/templates/library/base_v1_1_3/environment.py b/trains/community/bazarr/1.0.22/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/bazarr/1.0.21/templates/library/base_v1_1_3/environment.py rename to trains/community/bazarr/1.0.22/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/bazarr/1.0.22/templates/library/base_v1_1_4/healthchecks.py b/trains/community/bazarr/1.0.22/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/community/bazarr/1.0.22/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/bazarr/1.0.21/templates/library/base_v1_1_3/mariadb.py b/trains/community/bazarr/1.0.22/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/bazarr/1.0.21/templates/library/base_v1_1_3/mariadb.py rename to trains/community/bazarr/1.0.22/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/bazarr/1.0.21/templates/library/base_v1_1_3/metadata.py b/trains/community/bazarr/1.0.22/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/bazarr/1.0.21/templates/library/base_v1_1_3/metadata.py rename to trains/community/bazarr/1.0.22/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/bazarr/1.0.21/templates/library/base_v1_1_3/network.py b/trains/community/bazarr/1.0.22/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/bazarr/1.0.21/templates/library/base_v1_1_3/network.py rename to trains/community/bazarr/1.0.22/templates/library/base_v1_1_4/network.py diff --git a/trains/community/bazarr/1.0.22/templates/library/base_v1_1_4/permissions.py b/trains/community/bazarr/1.0.22/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/community/bazarr/1.0.22/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/community/bazarr/1.0.21/templates/library/base_v1_1_3/ports.py b/trains/community/bazarr/1.0.22/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/bazarr/1.0.21/templates/library/base_v1_1_3/ports.py rename to trains/community/bazarr/1.0.22/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/bazarr/1.0.21/templates/library/base_v1_1_3/postgres.py b/trains/community/bazarr/1.0.22/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/bazarr/1.0.21/templates/library/base_v1_1_3/postgres.py rename to trains/community/bazarr/1.0.22/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/bazarr/1.0.21/templates/library/base_v1_1_3/redis.py b/trains/community/bazarr/1.0.22/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/bazarr/1.0.21/templates/library/base_v1_1_3/redis.py rename to trains/community/bazarr/1.0.22/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/bazarr/1.0.21/templates/library/base_v1_1_3/resources.py b/trains/community/bazarr/1.0.22/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/bazarr/1.0.21/templates/library/base_v1_1_3/resources.py rename to trains/community/bazarr/1.0.22/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/bazarr/1.0.21/templates/library/base_v1_1_3/security.py b/trains/community/bazarr/1.0.22/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/bazarr/1.0.21/templates/library/base_v1_1_3/security.py rename to trains/community/bazarr/1.0.22/templates/library/base_v1_1_4/security.py diff --git a/trains/community/bazarr/1.0.21/templates/library/base_v1_1_3/storage.py b/trains/community/bazarr/1.0.22/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/bazarr/1.0.21/templates/library/base_v1_1_3/storage.py rename to trains/community/bazarr/1.0.22/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/bazarr/1.0.21/templates/library/base_v1_1_3/utils.py b/trains/community/bazarr/1.0.22/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/bazarr/1.0.21/templates/library/base_v1_1_3/utils.py rename to trains/community/bazarr/1.0.22/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/bazarr/1.0.21/templates/test_values/basic-values.yaml b/trains/community/bazarr/1.0.22/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/bazarr/1.0.21/templates/test_values/basic-values.yaml rename to trains/community/bazarr/1.0.22/templates/test_values/basic-values.yaml diff --git a/trains/community/briefkasten/1.0.18/templates/library/base_v1_1_3/healthchecks.py b/trains/community/briefkasten/1.0.18/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/community/briefkasten/1.0.18/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/briefkasten/1.0.18/templates/library/base_v1_1_3/permissions.py b/trains/community/briefkasten/1.0.18/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/community/briefkasten/1.0.18/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/community/briefkasten/1.0.18/README.md b/trains/community/briefkasten/1.0.19/README.md similarity index 100% rename from trains/community/briefkasten/1.0.18/README.md rename to trains/community/briefkasten/1.0.19/README.md diff --git a/trains/community/briefkasten/1.0.18/app.yaml b/trains/community/briefkasten/1.0.19/app.yaml similarity index 89% rename from trains/community/briefkasten/1.0.18/app.yaml rename to trains/community/briefkasten/1.0.19/app.yaml index 5019fb0ccd..f53301049c 100644 --- a/trains/community/briefkasten/1.0.18/app.yaml +++ b/trains/community/briefkasten/1.0.19/app.yaml @@ -8,8 +8,8 @@ host_mounts: [] icon: https://media.sys.truenas.net/apps/briefkasten/icons/icon.svg keywords: - bookmark -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -35,4 +35,4 @@ sources: - https://docs.briefkastenhq.com/ title: Briefkasten train: community -version: 1.0.18 +version: 1.0.19 diff --git a/trains/community/briefkasten/1.0.18/ix_values.yaml b/trains/community/briefkasten/1.0.19/ix_values.yaml similarity index 100% rename from trains/community/briefkasten/1.0.18/ix_values.yaml rename to trains/community/briefkasten/1.0.19/ix_values.yaml diff --git a/trains/community/briefkasten/1.0.18/migrations/migrate_from_kubernetes b/trains/community/briefkasten/1.0.19/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/briefkasten/1.0.18/migrations/migrate_from_kubernetes rename to trains/community/briefkasten/1.0.19/migrations/migrate_from_kubernetes diff --git a/trains/community/briefkasten/1.0.18/migrations/migration_helpers/__init__.py b/trains/community/briefkasten/1.0.19/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/briefkasten/1.0.18/migrations/migration_helpers/__init__.py rename to trains/community/briefkasten/1.0.19/migrations/migration_helpers/__init__.py diff --git a/trains/community/briefkasten/1.0.18/migrations/migration_helpers/cpu.py b/trains/community/briefkasten/1.0.19/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/briefkasten/1.0.18/migrations/migration_helpers/cpu.py rename to trains/community/briefkasten/1.0.19/migrations/migration_helpers/cpu.py diff --git a/trains/community/briefkasten/1.0.18/migrations/migration_helpers/dns_config.py b/trains/community/briefkasten/1.0.19/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/briefkasten/1.0.18/migrations/migration_helpers/dns_config.py rename to trains/community/briefkasten/1.0.19/migrations/migration_helpers/dns_config.py diff --git a/trains/community/briefkasten/1.0.18/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/briefkasten/1.0.19/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/briefkasten/1.0.18/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/briefkasten/1.0.19/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/briefkasten/1.0.18/migrations/migration_helpers/memory.py b/trains/community/briefkasten/1.0.19/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/briefkasten/1.0.18/migrations/migration_helpers/memory.py rename to trains/community/briefkasten/1.0.19/migrations/migration_helpers/memory.py diff --git a/trains/community/briefkasten/1.0.18/migrations/migration_helpers/resources.py b/trains/community/briefkasten/1.0.19/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/briefkasten/1.0.18/migrations/migration_helpers/resources.py rename to trains/community/briefkasten/1.0.19/migrations/migration_helpers/resources.py diff --git a/trains/community/briefkasten/1.0.18/migrations/migration_helpers/storage.py b/trains/community/briefkasten/1.0.19/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/briefkasten/1.0.18/migrations/migration_helpers/storage.py rename to trains/community/briefkasten/1.0.19/migrations/migration_helpers/storage.py diff --git a/trains/community/briefkasten/1.0.18/questions.yaml b/trains/community/briefkasten/1.0.19/questions.yaml similarity index 100% rename from trains/community/briefkasten/1.0.18/questions.yaml rename to trains/community/briefkasten/1.0.19/questions.yaml diff --git a/trains/community/briefkasten/1.0.18/templates/docker-compose.yaml b/trains/community/briefkasten/1.0.19/templates/docker-compose.yaml similarity index 98% rename from trains/community/briefkasten/1.0.18/templates/docker-compose.yaml rename to trains/community/briefkasten/1.0.19/templates/docker-compose.yaml index fc8d71145b..8112d6c2dd 100644 --- a/trains/community/briefkasten/1.0.18/templates/docker-compose.yaml +++ b/trains/community/briefkasten/1.0.19/templates/docker-compose.yaml @@ -117,7 +117,7 @@ services: {% if values.network.dns_opts %} dns_opt: {{ ix_lib.base.network.dns_opts(values.network.dns_opts) | tojson }} {% endif %} - {% set test = ix_lib.base.healthchecks.http_test(port=values.network.web_port, path="/") %} + {% set test = ix_lib.base.healthchecks.tcp_test(port=values.network.web_port) %} healthcheck: {{ ix_lib.base.healthchecks.check_health(test) | tojson }} environment: {{ ix_lib.base.environment.envs(app=app_env, user=values.briefkasten.additional_envs, values=values) | tojson }} ports: diff --git a/trains/community/briefkasten/1.0.18/templates/library/base_v1_1_3/__init__.py b/trains/community/briefkasten/1.0.19/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/briefkasten/1.0.18/templates/library/base_v1_1_3/__init__.py rename to trains/community/briefkasten/1.0.19/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/briefkasten/1.0.18/templates/library/base_v1_1_3/environment.py b/trains/community/briefkasten/1.0.19/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/briefkasten/1.0.18/templates/library/base_v1_1_3/environment.py rename to trains/community/briefkasten/1.0.19/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/briefkasten/1.0.19/templates/library/base_v1_1_4/healthchecks.py b/trains/community/briefkasten/1.0.19/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/community/briefkasten/1.0.19/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/briefkasten/1.0.18/templates/library/base_v1_1_3/mariadb.py b/trains/community/briefkasten/1.0.19/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/briefkasten/1.0.18/templates/library/base_v1_1_3/mariadb.py rename to trains/community/briefkasten/1.0.19/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/briefkasten/1.0.18/templates/library/base_v1_1_3/metadata.py b/trains/community/briefkasten/1.0.19/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/briefkasten/1.0.18/templates/library/base_v1_1_3/metadata.py rename to trains/community/briefkasten/1.0.19/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/briefkasten/1.0.18/templates/library/base_v1_1_3/network.py b/trains/community/briefkasten/1.0.19/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/briefkasten/1.0.18/templates/library/base_v1_1_3/network.py rename to trains/community/briefkasten/1.0.19/templates/library/base_v1_1_4/network.py diff --git a/trains/community/briefkasten/1.0.19/templates/library/base_v1_1_4/permissions.py b/trains/community/briefkasten/1.0.19/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/community/briefkasten/1.0.19/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/community/briefkasten/1.0.18/templates/library/base_v1_1_3/ports.py b/trains/community/briefkasten/1.0.19/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/briefkasten/1.0.18/templates/library/base_v1_1_3/ports.py rename to trains/community/briefkasten/1.0.19/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/briefkasten/1.0.18/templates/library/base_v1_1_3/postgres.py b/trains/community/briefkasten/1.0.19/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/briefkasten/1.0.18/templates/library/base_v1_1_3/postgres.py rename to trains/community/briefkasten/1.0.19/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/briefkasten/1.0.18/templates/library/base_v1_1_3/redis.py b/trains/community/briefkasten/1.0.19/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/briefkasten/1.0.18/templates/library/base_v1_1_3/redis.py rename to trains/community/briefkasten/1.0.19/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/briefkasten/1.0.18/templates/library/base_v1_1_3/resources.py b/trains/community/briefkasten/1.0.19/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/briefkasten/1.0.18/templates/library/base_v1_1_3/resources.py rename to trains/community/briefkasten/1.0.19/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/briefkasten/1.0.18/templates/library/base_v1_1_3/security.py b/trains/community/briefkasten/1.0.19/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/briefkasten/1.0.18/templates/library/base_v1_1_3/security.py rename to trains/community/briefkasten/1.0.19/templates/library/base_v1_1_4/security.py diff --git a/trains/community/briefkasten/1.0.18/templates/library/base_v1_1_3/storage.py b/trains/community/briefkasten/1.0.19/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/briefkasten/1.0.18/templates/library/base_v1_1_3/storage.py rename to trains/community/briefkasten/1.0.19/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/briefkasten/1.0.18/templates/library/base_v1_1_3/utils.py b/trains/community/briefkasten/1.0.19/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/briefkasten/1.0.18/templates/library/base_v1_1_3/utils.py rename to trains/community/briefkasten/1.0.19/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/briefkasten/1.0.18/templates/test_values/basic-values.yaml b/trains/community/briefkasten/1.0.19/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/briefkasten/1.0.18/templates/test_values/basic-values.yaml rename to trains/community/briefkasten/1.0.19/templates/test_values/basic-values.yaml diff --git a/trains/community/briefkasten/1.0.18/templates/test_values/extra-values.yaml b/trains/community/briefkasten/1.0.19/templates/test_values/extra-values.yaml similarity index 100% rename from trains/community/briefkasten/1.0.18/templates/test_values/extra-values.yaml rename to trains/community/briefkasten/1.0.19/templates/test_values/extra-values.yaml diff --git a/trains/community/castopod/1.0.8/templates/library/base_v1_1_3/healthchecks.py b/trains/community/castopod/1.0.8/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/community/castopod/1.0.8/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/castopod/1.0.8/templates/library/base_v1_1_3/permissions.py b/trains/community/castopod/1.0.8/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/community/castopod/1.0.8/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/community/castopod/1.0.8/README.md b/trains/community/castopod/1.0.9/README.md similarity index 100% rename from trains/community/castopod/1.0.8/README.md rename to trains/community/castopod/1.0.9/README.md diff --git a/trains/community/castopod/1.0.8/app.yaml b/trains/community/castopod/1.0.9/app.yaml similarity index 92% rename from trains/community/castopod/1.0.8/app.yaml rename to trains/community/castopod/1.0.9/app.yaml index 03a7a39ed1..90868bbbcb 100644 --- a/trains/community/castopod/1.0.8/app.yaml +++ b/trains/community/castopod/1.0.9/app.yaml @@ -19,8 +19,8 @@ host_mounts: [] icon: https://media.sys.truenas.net/apps/castopod/icons/icon.svg keywords: - podcast -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -49,4 +49,4 @@ sources: - https://code.castopod.org/adaures/castopod title: Castopod train: community -version: 1.0.8 +version: 1.0.9 diff --git a/trains/community/castopod/1.0.8/ix_values.yaml b/trains/community/castopod/1.0.9/ix_values.yaml similarity index 100% rename from trains/community/castopod/1.0.8/ix_values.yaml rename to trains/community/castopod/1.0.9/ix_values.yaml diff --git a/trains/community/castopod/1.0.8/migrations/migrate_from_kubernetes b/trains/community/castopod/1.0.9/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/castopod/1.0.8/migrations/migrate_from_kubernetes rename to trains/community/castopod/1.0.9/migrations/migrate_from_kubernetes diff --git a/trains/community/castopod/1.0.8/migrations/migration_helpers/__init__.py b/trains/community/castopod/1.0.9/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/castopod/1.0.8/migrations/migration_helpers/__init__.py rename to trains/community/castopod/1.0.9/migrations/migration_helpers/__init__.py diff --git a/trains/community/castopod/1.0.8/migrations/migration_helpers/cpu.py b/trains/community/castopod/1.0.9/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/castopod/1.0.8/migrations/migration_helpers/cpu.py rename to trains/community/castopod/1.0.9/migrations/migration_helpers/cpu.py diff --git a/trains/community/castopod/1.0.8/migrations/migration_helpers/dns_config.py b/trains/community/castopod/1.0.9/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/castopod/1.0.8/migrations/migration_helpers/dns_config.py rename to trains/community/castopod/1.0.9/migrations/migration_helpers/dns_config.py diff --git a/trains/community/castopod/1.0.8/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/castopod/1.0.9/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/castopod/1.0.8/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/castopod/1.0.9/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/castopod/1.0.8/migrations/migration_helpers/memory.py b/trains/community/castopod/1.0.9/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/castopod/1.0.8/migrations/migration_helpers/memory.py rename to trains/community/castopod/1.0.9/migrations/migration_helpers/memory.py diff --git a/trains/community/castopod/1.0.8/migrations/migration_helpers/resources.py b/trains/community/castopod/1.0.9/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/castopod/1.0.8/migrations/migration_helpers/resources.py rename to trains/community/castopod/1.0.9/migrations/migration_helpers/resources.py diff --git a/trains/community/castopod/1.0.8/migrations/migration_helpers/storage.py b/trains/community/castopod/1.0.9/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/castopod/1.0.8/migrations/migration_helpers/storage.py rename to trains/community/castopod/1.0.9/migrations/migration_helpers/storage.py diff --git a/trains/community/castopod/1.0.8/questions.yaml b/trains/community/castopod/1.0.9/questions.yaml similarity index 100% rename from trains/community/castopod/1.0.8/questions.yaml rename to trains/community/castopod/1.0.9/questions.yaml diff --git a/trains/community/castopod/1.0.8/templates/docker-compose.yaml b/trains/community/castopod/1.0.9/templates/docker-compose.yaml similarity index 100% rename from trains/community/castopod/1.0.8/templates/docker-compose.yaml rename to trains/community/castopod/1.0.9/templates/docker-compose.yaml diff --git a/trains/community/castopod/1.0.8/templates/library/base_v1_1_3/__init__.py b/trains/community/castopod/1.0.9/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/castopod/1.0.8/templates/library/base_v1_1_3/__init__.py rename to trains/community/castopod/1.0.9/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/castopod/1.0.8/templates/library/base_v1_1_3/environment.py b/trains/community/castopod/1.0.9/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/castopod/1.0.8/templates/library/base_v1_1_3/environment.py rename to trains/community/castopod/1.0.9/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/castopod/1.0.9/templates/library/base_v1_1_4/healthchecks.py b/trains/community/castopod/1.0.9/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/community/castopod/1.0.9/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/castopod/1.0.8/templates/library/base_v1_1_3/mariadb.py b/trains/community/castopod/1.0.9/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/castopod/1.0.8/templates/library/base_v1_1_3/mariadb.py rename to trains/community/castopod/1.0.9/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/castopod/1.0.8/templates/library/base_v1_1_3/metadata.py b/trains/community/castopod/1.0.9/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/castopod/1.0.8/templates/library/base_v1_1_3/metadata.py rename to trains/community/castopod/1.0.9/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/castopod/1.0.8/templates/library/base_v1_1_3/network.py b/trains/community/castopod/1.0.9/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/castopod/1.0.8/templates/library/base_v1_1_3/network.py rename to trains/community/castopod/1.0.9/templates/library/base_v1_1_4/network.py diff --git a/trains/community/castopod/1.0.9/templates/library/base_v1_1_4/permissions.py b/trains/community/castopod/1.0.9/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/community/castopod/1.0.9/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/community/castopod/1.0.8/templates/library/base_v1_1_3/ports.py b/trains/community/castopod/1.0.9/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/castopod/1.0.8/templates/library/base_v1_1_3/ports.py rename to trains/community/castopod/1.0.9/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/castopod/1.0.8/templates/library/base_v1_1_3/postgres.py b/trains/community/castopod/1.0.9/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/castopod/1.0.8/templates/library/base_v1_1_3/postgres.py rename to trains/community/castopod/1.0.9/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/castopod/1.0.8/templates/library/base_v1_1_3/redis.py b/trains/community/castopod/1.0.9/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/castopod/1.0.8/templates/library/base_v1_1_3/redis.py rename to trains/community/castopod/1.0.9/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/castopod/1.0.8/templates/library/base_v1_1_3/resources.py b/trains/community/castopod/1.0.9/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/castopod/1.0.8/templates/library/base_v1_1_3/resources.py rename to trains/community/castopod/1.0.9/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/castopod/1.0.8/templates/library/base_v1_1_3/security.py b/trains/community/castopod/1.0.9/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/castopod/1.0.8/templates/library/base_v1_1_3/security.py rename to trains/community/castopod/1.0.9/templates/library/base_v1_1_4/security.py diff --git a/trains/community/castopod/1.0.8/templates/library/base_v1_1_3/storage.py b/trains/community/castopod/1.0.9/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/castopod/1.0.8/templates/library/base_v1_1_3/storage.py rename to trains/community/castopod/1.0.9/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/castopod/1.0.8/templates/library/base_v1_1_3/utils.py b/trains/community/castopod/1.0.9/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/castopod/1.0.8/templates/library/base_v1_1_3/utils.py rename to trains/community/castopod/1.0.9/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/castopod/1.0.8/templates/test_values/2fa-values.yaml b/trains/community/castopod/1.0.9/templates/test_values/2fa-values.yaml similarity index 100% rename from trains/community/castopod/1.0.8/templates/test_values/2fa-values.yaml rename to trains/community/castopod/1.0.9/templates/test_values/2fa-values.yaml diff --git a/trains/community/castopod/1.0.8/templates/test_values/basic-values.yaml b/trains/community/castopod/1.0.9/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/castopod/1.0.8/templates/test_values/basic-values.yaml rename to trains/community/castopod/1.0.9/templates/test_values/basic-values.yaml diff --git a/trains/community/castopod/1.0.8/templates/test_values/redirect-values.yaml b/trains/community/castopod/1.0.9/templates/test_values/redirect-values.yaml similarity index 100% rename from trains/community/castopod/1.0.8/templates/test_values/redirect-values.yaml rename to trains/community/castopod/1.0.9/templates/test_values/redirect-values.yaml diff --git a/trains/community/chia/1.0.14/templates/library/base_v1_1_3/healthchecks.py b/trains/community/chia/1.0.14/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/community/chia/1.0.14/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/chia/1.0.14/templates/library/base_v1_1_3/permissions.py b/trains/community/chia/1.0.14/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/community/chia/1.0.14/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/community/chia/1.0.14/README.md b/trains/community/chia/1.0.15/README.md similarity index 100% rename from trains/community/chia/1.0.14/README.md rename to trains/community/chia/1.0.15/README.md diff --git a/trains/community/chia/1.0.14/app.yaml b/trains/community/chia/1.0.15/app.yaml similarity index 84% rename from trains/community/chia/1.0.14/app.yaml rename to trains/community/chia/1.0.15/app.yaml index 5745c4f909..fd80fa31d7 100644 --- a/trains/community/chia/1.0.14/app.yaml +++ b/trains/community/chia/1.0.15/app.yaml @@ -11,8 +11,8 @@ keywords: - blockchain - hard-drive - chia -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -30,4 +30,4 @@ sources: - https://www.chia.net/ title: Chia train: community -version: 1.0.14 +version: 1.0.15 diff --git a/trains/community/chia/1.0.14/ix_values.yaml b/trains/community/chia/1.0.15/ix_values.yaml similarity index 100% rename from trains/community/chia/1.0.14/ix_values.yaml rename to trains/community/chia/1.0.15/ix_values.yaml diff --git a/trains/community/chia/1.0.14/migrations/migrate_from_kubernetes b/trains/community/chia/1.0.15/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/chia/1.0.14/migrations/migrate_from_kubernetes rename to trains/community/chia/1.0.15/migrations/migrate_from_kubernetes diff --git a/trains/community/chia/1.0.14/migrations/migration_helpers/__init__.py b/trains/community/chia/1.0.15/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/chia/1.0.14/migrations/migration_helpers/__init__.py rename to trains/community/chia/1.0.15/migrations/migration_helpers/__init__.py diff --git a/trains/community/chia/1.0.14/migrations/migration_helpers/cpu.py b/trains/community/chia/1.0.15/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/chia/1.0.14/migrations/migration_helpers/cpu.py rename to trains/community/chia/1.0.15/migrations/migration_helpers/cpu.py diff --git a/trains/community/chia/1.0.14/migrations/migration_helpers/dns_config.py b/trains/community/chia/1.0.15/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/chia/1.0.14/migrations/migration_helpers/dns_config.py rename to trains/community/chia/1.0.15/migrations/migration_helpers/dns_config.py diff --git a/trains/community/chia/1.0.14/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/chia/1.0.15/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/chia/1.0.14/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/chia/1.0.15/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/chia/1.0.14/migrations/migration_helpers/memory.py b/trains/community/chia/1.0.15/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/chia/1.0.14/migrations/migration_helpers/memory.py rename to trains/community/chia/1.0.15/migrations/migration_helpers/memory.py diff --git a/trains/community/chia/1.0.14/migrations/migration_helpers/resources.py b/trains/community/chia/1.0.15/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/chia/1.0.14/migrations/migration_helpers/resources.py rename to trains/community/chia/1.0.15/migrations/migration_helpers/resources.py diff --git a/trains/community/chia/1.0.14/migrations/migration_helpers/storage.py b/trains/community/chia/1.0.15/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/chia/1.0.14/migrations/migration_helpers/storage.py rename to trains/community/chia/1.0.15/migrations/migration_helpers/storage.py diff --git a/trains/community/chia/1.0.14/questions.yaml b/trains/community/chia/1.0.15/questions.yaml similarity index 100% rename from trains/community/chia/1.0.14/questions.yaml rename to trains/community/chia/1.0.15/questions.yaml diff --git a/trains/community/chia/1.0.14/templates/docker-compose.yaml b/trains/community/chia/1.0.15/templates/docker-compose.yaml similarity index 100% rename from trains/community/chia/1.0.14/templates/docker-compose.yaml rename to trains/community/chia/1.0.15/templates/docker-compose.yaml diff --git a/trains/community/chia/1.0.14/templates/library/base_v1_1_3/__init__.py b/trains/community/chia/1.0.15/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/chia/1.0.14/templates/library/base_v1_1_3/__init__.py rename to trains/community/chia/1.0.15/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/chia/1.0.14/templates/library/base_v1_1_3/environment.py b/trains/community/chia/1.0.15/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/chia/1.0.14/templates/library/base_v1_1_3/environment.py rename to trains/community/chia/1.0.15/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/chia/1.0.15/templates/library/base_v1_1_4/healthchecks.py b/trains/community/chia/1.0.15/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/community/chia/1.0.15/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/chia/1.0.14/templates/library/base_v1_1_3/mariadb.py b/trains/community/chia/1.0.15/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/chia/1.0.14/templates/library/base_v1_1_3/mariadb.py rename to trains/community/chia/1.0.15/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/chia/1.0.14/templates/library/base_v1_1_3/metadata.py b/trains/community/chia/1.0.15/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/chia/1.0.14/templates/library/base_v1_1_3/metadata.py rename to trains/community/chia/1.0.15/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/chia/1.0.14/templates/library/base_v1_1_3/network.py b/trains/community/chia/1.0.15/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/chia/1.0.14/templates/library/base_v1_1_3/network.py rename to trains/community/chia/1.0.15/templates/library/base_v1_1_4/network.py diff --git a/trains/community/chia/1.0.15/templates/library/base_v1_1_4/permissions.py b/trains/community/chia/1.0.15/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/community/chia/1.0.15/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/community/chia/1.0.14/templates/library/base_v1_1_3/ports.py b/trains/community/chia/1.0.15/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/chia/1.0.14/templates/library/base_v1_1_3/ports.py rename to trains/community/chia/1.0.15/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/chia/1.0.14/templates/library/base_v1_1_3/postgres.py b/trains/community/chia/1.0.15/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/chia/1.0.14/templates/library/base_v1_1_3/postgres.py rename to trains/community/chia/1.0.15/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/chia/1.0.14/templates/library/base_v1_1_3/redis.py b/trains/community/chia/1.0.15/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/chia/1.0.14/templates/library/base_v1_1_3/redis.py rename to trains/community/chia/1.0.15/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/chia/1.0.14/templates/library/base_v1_1_3/resources.py b/trains/community/chia/1.0.15/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/chia/1.0.14/templates/library/base_v1_1_3/resources.py rename to trains/community/chia/1.0.15/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/chia/1.0.14/templates/library/base_v1_1_3/security.py b/trains/community/chia/1.0.15/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/chia/1.0.14/templates/library/base_v1_1_3/security.py rename to trains/community/chia/1.0.15/templates/library/base_v1_1_4/security.py diff --git a/trains/community/chia/1.0.14/templates/library/base_v1_1_3/storage.py b/trains/community/chia/1.0.15/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/chia/1.0.14/templates/library/base_v1_1_3/storage.py rename to trains/community/chia/1.0.15/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/chia/1.0.14/templates/library/base_v1_1_3/utils.py b/trains/community/chia/1.0.15/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/chia/1.0.14/templates/library/base_v1_1_3/utils.py rename to trains/community/chia/1.0.15/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/chia/1.0.14/templates/test_values/basic-values.yaml b/trains/community/chia/1.0.15/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/chia/1.0.14/templates/test_values/basic-values.yaml rename to trains/community/chia/1.0.15/templates/test_values/basic-values.yaml diff --git a/trains/community/chia/1.0.14/templates/test_values/farmer-values.yaml b/trains/community/chia/1.0.15/templates/test_values/farmer-values.yaml similarity index 100% rename from trains/community/chia/1.0.14/templates/test_values/farmer-values.yaml rename to trains/community/chia/1.0.15/templates/test_values/farmer-values.yaml diff --git a/trains/community/clamav/1.1.9/README.md b/trains/community/clamav/1.1.10/README.md similarity index 100% rename from trains/community/clamav/1.1.9/README.md rename to trains/community/clamav/1.1.10/README.md diff --git a/trains/community/clamav/1.1.9/app.yaml b/trains/community/clamav/1.1.10/app.yaml similarity index 89% rename from trains/community/clamav/1.1.9/app.yaml rename to trains/community/clamav/1.1.10/app.yaml index 711fe456c1..3aa0d9ea1c 100644 --- a/trains/community/clamav/1.1.9/app.yaml +++ b/trains/community/clamav/1.1.10/app.yaml @@ -19,8 +19,8 @@ icon: https://media.sys.truenas.net/apps/clamav/icons/icon.png keywords: - anti-virus - clamav -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -38,4 +38,4 @@ sources: - https://www.clamav.net/ title: ClamAV train: community -version: 1.1.9 +version: 1.1.10 diff --git a/trains/community/clamav/1.1.9/ix_values.yaml b/trains/community/clamav/1.1.10/ix_values.yaml similarity index 100% rename from trains/community/clamav/1.1.9/ix_values.yaml rename to trains/community/clamav/1.1.10/ix_values.yaml diff --git a/trains/community/clamav/1.1.9/migrations/migrate_from_kubernetes b/trains/community/clamav/1.1.10/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/clamav/1.1.9/migrations/migrate_from_kubernetes rename to trains/community/clamav/1.1.10/migrations/migrate_from_kubernetes diff --git a/trains/community/clamav/1.1.9/migrations/migration_helpers/__init__.py b/trains/community/clamav/1.1.10/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/clamav/1.1.9/migrations/migration_helpers/__init__.py rename to trains/community/clamav/1.1.10/migrations/migration_helpers/__init__.py diff --git a/trains/community/clamav/1.1.9/migrations/migration_helpers/cpu.py b/trains/community/clamav/1.1.10/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/clamav/1.1.9/migrations/migration_helpers/cpu.py rename to trains/community/clamav/1.1.10/migrations/migration_helpers/cpu.py diff --git a/trains/community/clamav/1.1.9/migrations/migration_helpers/dns_config.py b/trains/community/clamav/1.1.10/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/clamav/1.1.9/migrations/migration_helpers/dns_config.py rename to trains/community/clamav/1.1.10/migrations/migration_helpers/dns_config.py diff --git a/trains/community/clamav/1.1.9/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/clamav/1.1.10/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/clamav/1.1.9/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/clamav/1.1.10/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/clamav/1.1.9/migrations/migration_helpers/memory.py b/trains/community/clamav/1.1.10/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/clamav/1.1.9/migrations/migration_helpers/memory.py rename to trains/community/clamav/1.1.10/migrations/migration_helpers/memory.py diff --git a/trains/community/clamav/1.1.9/migrations/migration_helpers/resources.py b/trains/community/clamav/1.1.10/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/clamav/1.1.9/migrations/migration_helpers/resources.py rename to trains/community/clamav/1.1.10/migrations/migration_helpers/resources.py diff --git a/trains/community/clamav/1.1.9/migrations/migration_helpers/storage.py b/trains/community/clamav/1.1.10/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/clamav/1.1.9/migrations/migration_helpers/storage.py rename to trains/community/clamav/1.1.10/migrations/migration_helpers/storage.py diff --git a/trains/community/clamav/1.1.9/questions.yaml b/trains/community/clamav/1.1.10/questions.yaml similarity index 100% rename from trains/community/clamav/1.1.9/questions.yaml rename to trains/community/clamav/1.1.10/questions.yaml diff --git a/trains/community/clamav/1.1.9/templates/docker-compose.yaml b/trains/community/clamav/1.1.10/templates/docker-compose.yaml similarity index 100% rename from trains/community/clamav/1.1.9/templates/docker-compose.yaml rename to trains/community/clamav/1.1.10/templates/docker-compose.yaml diff --git a/trains/community/clamav/1.1.9/templates/library/base_v1_1_3/__init__.py b/trains/community/clamav/1.1.10/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/clamav/1.1.9/templates/library/base_v1_1_3/__init__.py rename to trains/community/clamav/1.1.10/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/clamav/1.1.9/templates/library/base_v1_1_3/environment.py b/trains/community/clamav/1.1.10/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/clamav/1.1.9/templates/library/base_v1_1_3/environment.py rename to trains/community/clamav/1.1.10/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/clamav/1.1.10/templates/library/base_v1_1_4/healthchecks.py b/trains/community/clamav/1.1.10/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/community/clamav/1.1.10/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/clamav/1.1.9/templates/library/base_v1_1_3/mariadb.py b/trains/community/clamav/1.1.10/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/clamav/1.1.9/templates/library/base_v1_1_3/mariadb.py rename to trains/community/clamav/1.1.10/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/clamav/1.1.9/templates/library/base_v1_1_3/metadata.py b/trains/community/clamav/1.1.10/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/clamav/1.1.9/templates/library/base_v1_1_3/metadata.py rename to trains/community/clamav/1.1.10/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/clamav/1.1.9/templates/library/base_v1_1_3/network.py b/trains/community/clamav/1.1.10/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/clamav/1.1.9/templates/library/base_v1_1_3/network.py rename to trains/community/clamav/1.1.10/templates/library/base_v1_1_4/network.py diff --git a/trains/community/clamav/1.1.10/templates/library/base_v1_1_4/permissions.py b/trains/community/clamav/1.1.10/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/community/clamav/1.1.10/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/community/clamav/1.1.9/templates/library/base_v1_1_3/ports.py b/trains/community/clamav/1.1.10/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/clamav/1.1.9/templates/library/base_v1_1_3/ports.py rename to trains/community/clamav/1.1.10/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/clamav/1.1.9/templates/library/base_v1_1_3/postgres.py b/trains/community/clamav/1.1.10/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/clamav/1.1.9/templates/library/base_v1_1_3/postgres.py rename to trains/community/clamav/1.1.10/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/clamav/1.1.9/templates/library/base_v1_1_3/redis.py b/trains/community/clamav/1.1.10/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/clamav/1.1.9/templates/library/base_v1_1_3/redis.py rename to trains/community/clamav/1.1.10/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/clamav/1.1.9/templates/library/base_v1_1_3/resources.py b/trains/community/clamav/1.1.10/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/clamav/1.1.9/templates/library/base_v1_1_3/resources.py rename to trains/community/clamav/1.1.10/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/clamav/1.1.9/templates/library/base_v1_1_3/security.py b/trains/community/clamav/1.1.10/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/clamav/1.1.9/templates/library/base_v1_1_3/security.py rename to trains/community/clamav/1.1.10/templates/library/base_v1_1_4/security.py diff --git a/trains/community/clamav/1.1.9/templates/library/base_v1_1_3/storage.py b/trains/community/clamav/1.1.10/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/clamav/1.1.9/templates/library/base_v1_1_3/storage.py rename to trains/community/clamav/1.1.10/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/clamav/1.1.9/templates/library/base_v1_1_3/utils.py b/trains/community/clamav/1.1.10/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/clamav/1.1.9/templates/library/base_v1_1_3/utils.py rename to trains/community/clamav/1.1.10/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/clamav/1.1.9/templates/test_values/basic-values.yaml b/trains/community/clamav/1.1.10/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/clamav/1.1.9/templates/test_values/basic-values.yaml rename to trains/community/clamav/1.1.10/templates/test_values/basic-values.yaml diff --git a/trains/community/clamav/1.1.9/templates/test_values/milterd-values.yaml b/trains/community/clamav/1.1.10/templates/test_values/milterd-values.yaml similarity index 100% rename from trains/community/clamav/1.1.9/templates/test_values/milterd-values.yaml rename to trains/community/clamav/1.1.10/templates/test_values/milterd-values.yaml diff --git a/trains/community/clamav/1.1.9/templates/test_values/no-clamd-values.yaml b/trains/community/clamav/1.1.10/templates/test_values/no-clamd-values.yaml similarity index 100% rename from trains/community/clamav/1.1.9/templates/test_values/no-clamd-values.yaml rename to trains/community/clamav/1.1.10/templates/test_values/no-clamd-values.yaml diff --git a/trains/community/clamav/1.1.9/templates/test_values/no-freshclamd-values.yaml b/trains/community/clamav/1.1.10/templates/test_values/no-freshclamd-values.yaml similarity index 100% rename from trains/community/clamav/1.1.9/templates/test_values/no-freshclamd-values.yaml rename to trains/community/clamav/1.1.10/templates/test_values/no-freshclamd-values.yaml diff --git a/trains/community/clamav/1.1.9/templates/library/base_v1_1_3/healthchecks.py b/trains/community/clamav/1.1.9/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/community/clamav/1.1.9/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/clamav/1.1.9/templates/library/base_v1_1_3/permissions.py b/trains/community/clamav/1.1.9/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/community/clamav/1.1.9/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/community/cloudflared/1.1.12/templates/library/base_v1_1_3/healthchecks.py b/trains/community/cloudflared/1.1.12/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/community/cloudflared/1.1.12/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/cloudflared/1.1.12/templates/library/base_v1_1_3/permissions.py b/trains/community/cloudflared/1.1.12/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/community/cloudflared/1.1.12/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/community/cloudflared/1.1.12/README.md b/trains/community/cloudflared/1.1.13/README.md similarity index 100% rename from trains/community/cloudflared/1.1.12/README.md rename to trains/community/cloudflared/1.1.13/README.md diff --git a/trains/community/cloudflared/1.1.12/app.yaml b/trains/community/cloudflared/1.1.13/app.yaml similarity index 86% rename from trains/community/cloudflared/1.1.12/app.yaml rename to trains/community/cloudflared/1.1.13/app.yaml index b33aa9985f..cd5621b48c 100644 --- a/trains/community/cloudflared/1.1.12/app.yaml +++ b/trains/community/cloudflared/1.1.13/app.yaml @@ -11,8 +11,8 @@ keywords: - network - cloudflare - tunnel -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -30,4 +30,4 @@ sources: - https://hub.docker.com/r/cloudflare/cloudflared title: Cloudflared train: community -version: 1.1.12 +version: 1.1.13 diff --git a/trains/community/cloudflared/1.1.12/ix_values.yaml b/trains/community/cloudflared/1.1.13/ix_values.yaml similarity index 100% rename from trains/community/cloudflared/1.1.12/ix_values.yaml rename to trains/community/cloudflared/1.1.13/ix_values.yaml diff --git a/trains/community/cloudflared/1.1.12/migrations/migrate_from_kubernetes b/trains/community/cloudflared/1.1.13/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/cloudflared/1.1.12/migrations/migrate_from_kubernetes rename to trains/community/cloudflared/1.1.13/migrations/migrate_from_kubernetes diff --git a/trains/community/cloudflared/1.1.12/migrations/migration_helpers/__init__.py b/trains/community/cloudflared/1.1.13/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/cloudflared/1.1.12/migrations/migration_helpers/__init__.py rename to trains/community/cloudflared/1.1.13/migrations/migration_helpers/__init__.py diff --git a/trains/community/cloudflared/1.1.12/migrations/migration_helpers/cpu.py b/trains/community/cloudflared/1.1.13/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/cloudflared/1.1.12/migrations/migration_helpers/cpu.py rename to trains/community/cloudflared/1.1.13/migrations/migration_helpers/cpu.py diff --git a/trains/community/cloudflared/1.1.12/migrations/migration_helpers/dns_config.py b/trains/community/cloudflared/1.1.13/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/cloudflared/1.1.12/migrations/migration_helpers/dns_config.py rename to trains/community/cloudflared/1.1.13/migrations/migration_helpers/dns_config.py diff --git a/trains/community/cloudflared/1.1.12/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/cloudflared/1.1.13/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/cloudflared/1.1.12/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/cloudflared/1.1.13/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/cloudflared/1.1.12/migrations/migration_helpers/memory.py b/trains/community/cloudflared/1.1.13/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/cloudflared/1.1.12/migrations/migration_helpers/memory.py rename to trains/community/cloudflared/1.1.13/migrations/migration_helpers/memory.py diff --git a/trains/community/cloudflared/1.1.12/migrations/migration_helpers/resources.py b/trains/community/cloudflared/1.1.13/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/cloudflared/1.1.12/migrations/migration_helpers/resources.py rename to trains/community/cloudflared/1.1.13/migrations/migration_helpers/resources.py diff --git a/trains/community/cloudflared/1.1.12/migrations/migration_helpers/storage.py b/trains/community/cloudflared/1.1.13/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/cloudflared/1.1.12/migrations/migration_helpers/storage.py rename to trains/community/cloudflared/1.1.13/migrations/migration_helpers/storage.py diff --git a/trains/community/cloudflared/1.1.12/questions.yaml b/trains/community/cloudflared/1.1.13/questions.yaml similarity index 100% rename from trains/community/cloudflared/1.1.12/questions.yaml rename to trains/community/cloudflared/1.1.13/questions.yaml diff --git a/trains/community/cloudflared/1.1.12/templates/docker-compose.yaml b/trains/community/cloudflared/1.1.13/templates/docker-compose.yaml similarity index 100% rename from trains/community/cloudflared/1.1.12/templates/docker-compose.yaml rename to trains/community/cloudflared/1.1.13/templates/docker-compose.yaml diff --git a/trains/community/cloudflared/1.1.12/templates/library/base_v1_1_3/__init__.py b/trains/community/cloudflared/1.1.13/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/cloudflared/1.1.12/templates/library/base_v1_1_3/__init__.py rename to trains/community/cloudflared/1.1.13/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/cloudflared/1.1.12/templates/library/base_v1_1_3/environment.py b/trains/community/cloudflared/1.1.13/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/cloudflared/1.1.12/templates/library/base_v1_1_3/environment.py rename to trains/community/cloudflared/1.1.13/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/cloudflared/1.1.13/templates/library/base_v1_1_4/healthchecks.py b/trains/community/cloudflared/1.1.13/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/community/cloudflared/1.1.13/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/cloudflared/1.1.12/templates/library/base_v1_1_3/mariadb.py b/trains/community/cloudflared/1.1.13/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/cloudflared/1.1.12/templates/library/base_v1_1_3/mariadb.py rename to trains/community/cloudflared/1.1.13/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/cloudflared/1.1.12/templates/library/base_v1_1_3/metadata.py b/trains/community/cloudflared/1.1.13/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/cloudflared/1.1.12/templates/library/base_v1_1_3/metadata.py rename to trains/community/cloudflared/1.1.13/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/cloudflared/1.1.12/templates/library/base_v1_1_3/network.py b/trains/community/cloudflared/1.1.13/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/cloudflared/1.1.12/templates/library/base_v1_1_3/network.py rename to trains/community/cloudflared/1.1.13/templates/library/base_v1_1_4/network.py diff --git a/trains/community/cloudflared/1.1.13/templates/library/base_v1_1_4/permissions.py b/trains/community/cloudflared/1.1.13/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/community/cloudflared/1.1.13/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/community/cloudflared/1.1.12/templates/library/base_v1_1_3/ports.py b/trains/community/cloudflared/1.1.13/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/cloudflared/1.1.12/templates/library/base_v1_1_3/ports.py rename to trains/community/cloudflared/1.1.13/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/cloudflared/1.1.12/templates/library/base_v1_1_3/postgres.py b/trains/community/cloudflared/1.1.13/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/cloudflared/1.1.12/templates/library/base_v1_1_3/postgres.py rename to trains/community/cloudflared/1.1.13/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/cloudflared/1.1.12/templates/library/base_v1_1_3/redis.py b/trains/community/cloudflared/1.1.13/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/cloudflared/1.1.12/templates/library/base_v1_1_3/redis.py rename to trains/community/cloudflared/1.1.13/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/cloudflared/1.1.12/templates/library/base_v1_1_3/resources.py b/trains/community/cloudflared/1.1.13/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/cloudflared/1.1.12/templates/library/base_v1_1_3/resources.py rename to trains/community/cloudflared/1.1.13/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/cloudflared/1.1.12/templates/library/base_v1_1_3/security.py b/trains/community/cloudflared/1.1.13/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/cloudflared/1.1.12/templates/library/base_v1_1_3/security.py rename to trains/community/cloudflared/1.1.13/templates/library/base_v1_1_4/security.py diff --git a/trains/community/cloudflared/1.1.12/templates/library/base_v1_1_3/storage.py b/trains/community/cloudflared/1.1.13/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/cloudflared/1.1.12/templates/library/base_v1_1_3/storage.py rename to trains/community/cloudflared/1.1.13/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/cloudflared/1.1.12/templates/library/base_v1_1_3/utils.py b/trains/community/cloudflared/1.1.13/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/cloudflared/1.1.12/templates/library/base_v1_1_3/utils.py rename to trains/community/cloudflared/1.1.13/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/cloudflared/1.1.12/templates/test_values/basic-values.yaml b/trains/community/cloudflared/1.1.13/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/cloudflared/1.1.12/templates/test_values/basic-values.yaml rename to trains/community/cloudflared/1.1.13/templates/test_values/basic-values.yaml diff --git a/trains/community/dashy/1.0.17/templates/library/base_v1_1_3/healthchecks.py b/trains/community/dashy/1.0.17/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/community/dashy/1.0.17/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/dashy/1.0.17/templates/library/base_v1_1_3/permissions.py b/trains/community/dashy/1.0.17/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/community/dashy/1.0.17/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/community/dashy/1.0.17/README.md b/trains/community/dashy/1.0.18/README.md similarity index 100% rename from trains/community/dashy/1.0.17/README.md rename to trains/community/dashy/1.0.18/README.md diff --git a/trains/community/dashy/1.0.17/app.yaml b/trains/community/dashy/1.0.18/app.yaml similarity index 85% rename from trains/community/dashy/1.0.17/app.yaml rename to trains/community/dashy/1.0.18/app.yaml index 415005a47c..80164b5ebc 100644 --- a/trains/community/dashy/1.0.17/app.yaml +++ b/trains/community/dashy/1.0.18/app.yaml @@ -8,8 +8,8 @@ host_mounts: [] icon: https://media.sys.truenas.net/apps/dashy/icons/icon.png keywords: - dashboard -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -29,4 +29,4 @@ sources: - https://github.com/lissy93/dashy title: Dashy train: community -version: 1.0.17 +version: 1.0.18 diff --git a/trains/community/dashy/1.0.17/ix_values.yaml b/trains/community/dashy/1.0.18/ix_values.yaml similarity index 100% rename from trains/community/dashy/1.0.17/ix_values.yaml rename to trains/community/dashy/1.0.18/ix_values.yaml diff --git a/trains/community/dashy/1.0.17/migrations/migrate_from_kubernetes b/trains/community/dashy/1.0.18/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/dashy/1.0.17/migrations/migrate_from_kubernetes rename to trains/community/dashy/1.0.18/migrations/migrate_from_kubernetes diff --git a/trains/community/dashy/1.0.17/migrations/migration_helpers/__init__.py b/trains/community/dashy/1.0.18/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/dashy/1.0.17/migrations/migration_helpers/__init__.py rename to trains/community/dashy/1.0.18/migrations/migration_helpers/__init__.py diff --git a/trains/community/dashy/1.0.17/migrations/migration_helpers/cpu.py b/trains/community/dashy/1.0.18/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/dashy/1.0.17/migrations/migration_helpers/cpu.py rename to trains/community/dashy/1.0.18/migrations/migration_helpers/cpu.py diff --git a/trains/community/dashy/1.0.17/migrations/migration_helpers/dns_config.py b/trains/community/dashy/1.0.18/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/dashy/1.0.17/migrations/migration_helpers/dns_config.py rename to trains/community/dashy/1.0.18/migrations/migration_helpers/dns_config.py diff --git a/trains/community/dashy/1.0.17/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/dashy/1.0.18/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/dashy/1.0.17/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/dashy/1.0.18/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/dashy/1.0.17/migrations/migration_helpers/memory.py b/trains/community/dashy/1.0.18/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/dashy/1.0.17/migrations/migration_helpers/memory.py rename to trains/community/dashy/1.0.18/migrations/migration_helpers/memory.py diff --git a/trains/community/dashy/1.0.17/migrations/migration_helpers/resources.py b/trains/community/dashy/1.0.18/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/dashy/1.0.17/migrations/migration_helpers/resources.py rename to trains/community/dashy/1.0.18/migrations/migration_helpers/resources.py diff --git a/trains/community/dashy/1.0.17/migrations/migration_helpers/storage.py b/trains/community/dashy/1.0.18/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/dashy/1.0.17/migrations/migration_helpers/storage.py rename to trains/community/dashy/1.0.18/migrations/migration_helpers/storage.py diff --git a/trains/community/dashy/1.0.17/questions.yaml b/trains/community/dashy/1.0.18/questions.yaml similarity index 100% rename from trains/community/dashy/1.0.17/questions.yaml rename to trains/community/dashy/1.0.18/questions.yaml diff --git a/trains/community/dashy/1.0.17/templates/docker-compose.yaml b/trains/community/dashy/1.0.18/templates/docker-compose.yaml similarity index 100% rename from trains/community/dashy/1.0.17/templates/docker-compose.yaml rename to trains/community/dashy/1.0.18/templates/docker-compose.yaml diff --git a/trains/community/dashy/1.0.17/templates/library/base_v1_1_3/__init__.py b/trains/community/dashy/1.0.18/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/dashy/1.0.17/templates/library/base_v1_1_3/__init__.py rename to trains/community/dashy/1.0.18/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/dashy/1.0.17/templates/library/base_v1_1_3/environment.py b/trains/community/dashy/1.0.18/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/dashy/1.0.17/templates/library/base_v1_1_3/environment.py rename to trains/community/dashy/1.0.18/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/dashy/1.0.18/templates/library/base_v1_1_4/healthchecks.py b/trains/community/dashy/1.0.18/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/community/dashy/1.0.18/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/dashy/1.0.17/templates/library/base_v1_1_3/mariadb.py b/trains/community/dashy/1.0.18/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/dashy/1.0.17/templates/library/base_v1_1_3/mariadb.py rename to trains/community/dashy/1.0.18/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/dashy/1.0.17/templates/library/base_v1_1_3/metadata.py b/trains/community/dashy/1.0.18/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/dashy/1.0.17/templates/library/base_v1_1_3/metadata.py rename to trains/community/dashy/1.0.18/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/dashy/1.0.17/templates/library/base_v1_1_3/network.py b/trains/community/dashy/1.0.18/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/dashy/1.0.17/templates/library/base_v1_1_3/network.py rename to trains/community/dashy/1.0.18/templates/library/base_v1_1_4/network.py diff --git a/trains/community/dashy/1.0.18/templates/library/base_v1_1_4/permissions.py b/trains/community/dashy/1.0.18/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/community/dashy/1.0.18/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/community/dashy/1.0.17/templates/library/base_v1_1_3/ports.py b/trains/community/dashy/1.0.18/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/dashy/1.0.17/templates/library/base_v1_1_3/ports.py rename to trains/community/dashy/1.0.18/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/dashy/1.0.17/templates/library/base_v1_1_3/postgres.py b/trains/community/dashy/1.0.18/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/dashy/1.0.17/templates/library/base_v1_1_3/postgres.py rename to trains/community/dashy/1.0.18/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/dashy/1.0.17/templates/library/base_v1_1_3/redis.py b/trains/community/dashy/1.0.18/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/dashy/1.0.17/templates/library/base_v1_1_3/redis.py rename to trains/community/dashy/1.0.18/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/dashy/1.0.17/templates/library/base_v1_1_3/resources.py b/trains/community/dashy/1.0.18/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/dashy/1.0.17/templates/library/base_v1_1_3/resources.py rename to trains/community/dashy/1.0.18/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/dashy/1.0.17/templates/library/base_v1_1_3/security.py b/trains/community/dashy/1.0.18/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/dashy/1.0.17/templates/library/base_v1_1_3/security.py rename to trains/community/dashy/1.0.18/templates/library/base_v1_1_4/security.py diff --git a/trains/community/dashy/1.0.17/templates/library/base_v1_1_3/storage.py b/trains/community/dashy/1.0.18/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/dashy/1.0.17/templates/library/base_v1_1_3/storage.py rename to trains/community/dashy/1.0.18/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/dashy/1.0.17/templates/library/base_v1_1_3/utils.py b/trains/community/dashy/1.0.18/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/dashy/1.0.17/templates/library/base_v1_1_3/utils.py rename to trains/community/dashy/1.0.18/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/dashy/1.0.17/templates/test_values/basic-values.yaml b/trains/community/dashy/1.0.18/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/dashy/1.0.17/templates/test_values/basic-values.yaml rename to trains/community/dashy/1.0.18/templates/test_values/basic-values.yaml diff --git a/trains/community/dashy/1.0.17/templates/test_values/https-values.yaml b/trains/community/dashy/1.0.18/templates/test_values/https-values.yaml similarity index 100% rename from trains/community/dashy/1.0.17/templates/test_values/https-values.yaml rename to trains/community/dashy/1.0.18/templates/test_values/https-values.yaml diff --git a/trains/community/ddns-updater/1.0.23/templates/library/base_v1_1_3/healthchecks.py b/trains/community/ddns-updater/1.0.23/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/community/ddns-updater/1.0.23/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/ddns-updater/1.0.23/templates/library/base_v1_1_3/permissions.py b/trains/community/ddns-updater/1.0.23/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/community/ddns-updater/1.0.23/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/community/ddns-updater/1.0.23/README.md b/trains/community/ddns-updater/1.0.24/README.md similarity index 100% rename from trains/community/ddns-updater/1.0.23/README.md rename to trains/community/ddns-updater/1.0.24/README.md diff --git a/trains/community/ddns-updater/1.0.23/app.yaml b/trains/community/ddns-updater/1.0.24/app.yaml similarity index 87% rename from trains/community/ddns-updater/1.0.23/app.yaml rename to trains/community/ddns-updater/1.0.24/app.yaml index 9abf8bca5d..ebac6cf5f5 100644 --- a/trains/community/ddns-updater/1.0.23/app.yaml +++ b/trains/community/ddns-updater/1.0.24/app.yaml @@ -9,8 +9,8 @@ icon: https://media.sys.truenas.net/apps/ddns-updater/icons/icon.svg keywords: - ddns-updater - ddns -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -30,4 +30,4 @@ sources: - https://hub.docker.com/r/qmcgaw/ddns-updater title: DDNS Updater train: community -version: 1.0.23 +version: 1.0.24 diff --git a/trains/community/ddns-updater/1.0.23/ix_values.yaml b/trains/community/ddns-updater/1.0.24/ix_values.yaml similarity index 100% rename from trains/community/ddns-updater/1.0.23/ix_values.yaml rename to trains/community/ddns-updater/1.0.24/ix_values.yaml diff --git a/trains/community/ddns-updater/1.0.23/migrations/migrate_from_kubernetes b/trains/community/ddns-updater/1.0.24/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/ddns-updater/1.0.23/migrations/migrate_from_kubernetes rename to trains/community/ddns-updater/1.0.24/migrations/migrate_from_kubernetes diff --git a/trains/community/ddns-updater/1.0.23/migrations/migration_helpers/__init__.py b/trains/community/ddns-updater/1.0.24/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/ddns-updater/1.0.23/migrations/migration_helpers/__init__.py rename to trains/community/ddns-updater/1.0.24/migrations/migration_helpers/__init__.py diff --git a/trains/community/ddns-updater/1.0.23/migrations/migration_helpers/cpu.py b/trains/community/ddns-updater/1.0.24/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/ddns-updater/1.0.23/migrations/migration_helpers/cpu.py rename to trains/community/ddns-updater/1.0.24/migrations/migration_helpers/cpu.py diff --git a/trains/community/ddns-updater/1.0.23/migrations/migration_helpers/dns_config.py b/trains/community/ddns-updater/1.0.24/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/ddns-updater/1.0.23/migrations/migration_helpers/dns_config.py rename to trains/community/ddns-updater/1.0.24/migrations/migration_helpers/dns_config.py diff --git a/trains/community/ddns-updater/1.0.23/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/ddns-updater/1.0.24/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/ddns-updater/1.0.23/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/ddns-updater/1.0.24/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/ddns-updater/1.0.23/migrations/migration_helpers/memory.py b/trains/community/ddns-updater/1.0.24/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/ddns-updater/1.0.23/migrations/migration_helpers/memory.py rename to trains/community/ddns-updater/1.0.24/migrations/migration_helpers/memory.py diff --git a/trains/community/ddns-updater/1.0.23/migrations/migration_helpers/resources.py b/trains/community/ddns-updater/1.0.24/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/ddns-updater/1.0.23/migrations/migration_helpers/resources.py rename to trains/community/ddns-updater/1.0.24/migrations/migration_helpers/resources.py diff --git a/trains/community/ddns-updater/1.0.23/migrations/migration_helpers/storage.py b/trains/community/ddns-updater/1.0.24/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/ddns-updater/1.0.23/migrations/migration_helpers/storage.py rename to trains/community/ddns-updater/1.0.24/migrations/migration_helpers/storage.py diff --git a/trains/community/ddns-updater/1.0.23/questions.yaml b/trains/community/ddns-updater/1.0.24/questions.yaml similarity index 100% rename from trains/community/ddns-updater/1.0.23/questions.yaml rename to trains/community/ddns-updater/1.0.24/questions.yaml diff --git a/trains/community/ddns-updater/1.0.23/templates/docker-compose.yaml b/trains/community/ddns-updater/1.0.24/templates/docker-compose.yaml similarity index 100% rename from trains/community/ddns-updater/1.0.23/templates/docker-compose.yaml rename to trains/community/ddns-updater/1.0.24/templates/docker-compose.yaml diff --git a/trains/community/ddns-updater/1.0.23/templates/library/base_v1_1_3/__init__.py b/trains/community/ddns-updater/1.0.24/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/ddns-updater/1.0.23/templates/library/base_v1_1_3/__init__.py rename to trains/community/ddns-updater/1.0.24/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/ddns-updater/1.0.23/templates/library/base_v1_1_3/environment.py b/trains/community/ddns-updater/1.0.24/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/ddns-updater/1.0.23/templates/library/base_v1_1_3/environment.py rename to trains/community/ddns-updater/1.0.24/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/ddns-updater/1.0.24/templates/library/base_v1_1_4/healthchecks.py b/trains/community/ddns-updater/1.0.24/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/community/ddns-updater/1.0.24/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/ddns-updater/1.0.23/templates/library/base_v1_1_3/mariadb.py b/trains/community/ddns-updater/1.0.24/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/ddns-updater/1.0.23/templates/library/base_v1_1_3/mariadb.py rename to trains/community/ddns-updater/1.0.24/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/ddns-updater/1.0.23/templates/library/base_v1_1_3/metadata.py b/trains/community/ddns-updater/1.0.24/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/ddns-updater/1.0.23/templates/library/base_v1_1_3/metadata.py rename to trains/community/ddns-updater/1.0.24/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/ddns-updater/1.0.23/templates/library/base_v1_1_3/network.py b/trains/community/ddns-updater/1.0.24/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/ddns-updater/1.0.23/templates/library/base_v1_1_3/network.py rename to trains/community/ddns-updater/1.0.24/templates/library/base_v1_1_4/network.py diff --git a/trains/community/ddns-updater/1.0.24/templates/library/base_v1_1_4/permissions.py b/trains/community/ddns-updater/1.0.24/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/community/ddns-updater/1.0.24/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/community/ddns-updater/1.0.23/templates/library/base_v1_1_3/ports.py b/trains/community/ddns-updater/1.0.24/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/ddns-updater/1.0.23/templates/library/base_v1_1_3/ports.py rename to trains/community/ddns-updater/1.0.24/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/ddns-updater/1.0.23/templates/library/base_v1_1_3/postgres.py b/trains/community/ddns-updater/1.0.24/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/ddns-updater/1.0.23/templates/library/base_v1_1_3/postgres.py rename to trains/community/ddns-updater/1.0.24/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/ddns-updater/1.0.23/templates/library/base_v1_1_3/redis.py b/trains/community/ddns-updater/1.0.24/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/ddns-updater/1.0.23/templates/library/base_v1_1_3/redis.py rename to trains/community/ddns-updater/1.0.24/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/ddns-updater/1.0.23/templates/library/base_v1_1_3/resources.py b/trains/community/ddns-updater/1.0.24/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/ddns-updater/1.0.23/templates/library/base_v1_1_3/resources.py rename to trains/community/ddns-updater/1.0.24/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/ddns-updater/1.0.23/templates/library/base_v1_1_3/security.py b/trains/community/ddns-updater/1.0.24/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/ddns-updater/1.0.23/templates/library/base_v1_1_3/security.py rename to trains/community/ddns-updater/1.0.24/templates/library/base_v1_1_4/security.py diff --git a/trains/community/ddns-updater/1.0.23/templates/library/base_v1_1_3/storage.py b/trains/community/ddns-updater/1.0.24/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/ddns-updater/1.0.23/templates/library/base_v1_1_3/storage.py rename to trains/community/ddns-updater/1.0.24/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/ddns-updater/1.0.23/templates/library/base_v1_1_3/utils.py b/trains/community/ddns-updater/1.0.24/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/ddns-updater/1.0.23/templates/library/base_v1_1_3/utils.py rename to trains/community/ddns-updater/1.0.24/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/ddns-updater/1.0.23/templates/library/community/ddns-updater/v1_0_23/__init__.py b/trains/community/ddns-updater/1.0.24/templates/library/community/ddns-updater/v1_0_24/__init__.py similarity index 100% rename from trains/community/ddns-updater/1.0.23/templates/library/community/ddns-updater/v1_0_23/__init__.py rename to trains/community/ddns-updater/1.0.24/templates/library/community/ddns-updater/v1_0_24/__init__.py diff --git a/trains/community/ddns-updater/1.0.23/templates/library/community/ddns-updater/v1_0_23/config.py b/trains/community/ddns-updater/1.0.24/templates/library/community/ddns-updater/v1_0_24/config.py similarity index 99% rename from trains/community/ddns-updater/1.0.23/templates/library/community/ddns-updater/v1_0_23/config.py rename to trains/community/ddns-updater/1.0.24/templates/library/community/ddns-updater/v1_0_24/config.py index b8604baa85..920ddc1042 100644 --- a/trains/community/ddns-updater/1.0.23/templates/library/community/ddns-updater/v1_0_23/config.py +++ b/trains/community/ddns-updater/1.0.24/templates/library/community/ddns-updater/v1_0_24/config.py @@ -1,4 +1,4 @@ -from base_v1_1_3 import utils +from base_v1_1_4 import utils import json valid_ip_dns_providers = [ diff --git a/trains/community/ddns-updater/1.0.23/templates/test_values/aliyun-values.yaml b/trains/community/ddns-updater/1.0.24/templates/test_values/aliyun-values.yaml similarity index 100% rename from trains/community/ddns-updater/1.0.23/templates/test_values/aliyun-values.yaml rename to trains/community/ddns-updater/1.0.24/templates/test_values/aliyun-values.yaml diff --git a/trains/community/ddns-updater/1.0.23/templates/test_values/allinkl-values.yaml b/trains/community/ddns-updater/1.0.24/templates/test_values/allinkl-values.yaml similarity index 100% rename from trains/community/ddns-updater/1.0.23/templates/test_values/allinkl-values.yaml rename to trains/community/ddns-updater/1.0.24/templates/test_values/allinkl-values.yaml diff --git a/trains/community/ddns-updater/1.0.23/templates/test_values/basic-values.yaml b/trains/community/ddns-updater/1.0.24/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/ddns-updater/1.0.23/templates/test_values/basic-values.yaml rename to trains/community/ddns-updater/1.0.24/templates/test_values/basic-values.yaml diff --git a/trains/community/ddns-updater/1.0.23/templates/test_values/cloudflare-values.yaml b/trains/community/ddns-updater/1.0.24/templates/test_values/cloudflare-values.yaml similarity index 100% rename from trains/community/ddns-updater/1.0.23/templates/test_values/cloudflare-values.yaml rename to trains/community/ddns-updater/1.0.24/templates/test_values/cloudflare-values.yaml diff --git a/trains/community/ddns-updater/1.0.23/templates/test_values/dd24-values.yaml b/trains/community/ddns-updater/1.0.24/templates/test_values/dd24-values.yaml similarity index 100% rename from trains/community/ddns-updater/1.0.23/templates/test_values/dd24-values.yaml rename to trains/community/ddns-updater/1.0.24/templates/test_values/dd24-values.yaml diff --git a/trains/community/ddns-updater/1.0.23/templates/test_values/ddnss-values.yaml b/trains/community/ddns-updater/1.0.24/templates/test_values/ddnss-values.yaml similarity index 100% rename from trains/community/ddns-updater/1.0.23/templates/test_values/ddnss-values.yaml rename to trains/community/ddns-updater/1.0.24/templates/test_values/ddnss-values.yaml diff --git a/trains/community/ddns-updater/1.0.23/templates/test_values/desec-values.yaml b/trains/community/ddns-updater/1.0.24/templates/test_values/desec-values.yaml similarity index 100% rename from trains/community/ddns-updater/1.0.23/templates/test_values/desec-values.yaml rename to trains/community/ddns-updater/1.0.24/templates/test_values/desec-values.yaml diff --git a/trains/community/ddns-updater/1.0.23/templates/test_values/digitalocean-values.yaml b/trains/community/ddns-updater/1.0.24/templates/test_values/digitalocean-values.yaml similarity index 100% rename from trains/community/ddns-updater/1.0.23/templates/test_values/digitalocean-values.yaml rename to trains/community/ddns-updater/1.0.24/templates/test_values/digitalocean-values.yaml diff --git a/trains/community/ddns-updater/1.0.23/templates/test_values/dnsomatic-values.yaml b/trains/community/ddns-updater/1.0.24/templates/test_values/dnsomatic-values.yaml similarity index 100% rename from trains/community/ddns-updater/1.0.23/templates/test_values/dnsomatic-values.yaml rename to trains/community/ddns-updater/1.0.24/templates/test_values/dnsomatic-values.yaml diff --git a/trains/community/ddns-updater/1.0.23/templates/test_values/dnspod-values.yaml b/trains/community/ddns-updater/1.0.24/templates/test_values/dnspod-values.yaml similarity index 100% rename from trains/community/ddns-updater/1.0.23/templates/test_values/dnspod-values.yaml rename to trains/community/ddns-updater/1.0.24/templates/test_values/dnspod-values.yaml diff --git a/trains/community/ddns-updater/1.0.23/templates/test_values/dondominio-values.yaml b/trains/community/ddns-updater/1.0.24/templates/test_values/dondominio-values.yaml similarity index 100% rename from trains/community/ddns-updater/1.0.23/templates/test_values/dondominio-values.yaml rename to trains/community/ddns-updater/1.0.24/templates/test_values/dondominio-values.yaml diff --git a/trains/community/ddns-updater/1.0.23/templates/test_values/dreamhost-values.yaml b/trains/community/ddns-updater/1.0.24/templates/test_values/dreamhost-values.yaml similarity index 100% rename from trains/community/ddns-updater/1.0.23/templates/test_values/dreamhost-values.yaml rename to trains/community/ddns-updater/1.0.24/templates/test_values/dreamhost-values.yaml diff --git a/trains/community/ddns-updater/1.0.23/templates/test_values/duckdns-values.yaml b/trains/community/ddns-updater/1.0.24/templates/test_values/duckdns-values.yaml similarity index 100% rename from trains/community/ddns-updater/1.0.23/templates/test_values/duckdns-values.yaml rename to trains/community/ddns-updater/1.0.24/templates/test_values/duckdns-values.yaml diff --git a/trains/community/ddns-updater/1.0.23/templates/test_values/dyn-values.yaml b/trains/community/ddns-updater/1.0.24/templates/test_values/dyn-values.yaml similarity index 100% rename from trains/community/ddns-updater/1.0.23/templates/test_values/dyn-values.yaml rename to trains/community/ddns-updater/1.0.24/templates/test_values/dyn-values.yaml diff --git a/trains/community/ddns-updater/1.0.23/templates/test_values/dynu-values.yaml b/trains/community/ddns-updater/1.0.24/templates/test_values/dynu-values.yaml similarity index 100% rename from trains/community/ddns-updater/1.0.23/templates/test_values/dynu-values.yaml rename to trains/community/ddns-updater/1.0.24/templates/test_values/dynu-values.yaml diff --git a/trains/community/ddns-updater/1.0.23/templates/test_values/dynv6-values.yaml b/trains/community/ddns-updater/1.0.24/templates/test_values/dynv6-values.yaml similarity index 100% rename from trains/community/ddns-updater/1.0.23/templates/test_values/dynv6-values.yaml rename to trains/community/ddns-updater/1.0.24/templates/test_values/dynv6-values.yaml diff --git a/trains/community/ddns-updater/1.0.23/templates/test_values/easydns-values.yaml b/trains/community/ddns-updater/1.0.24/templates/test_values/easydns-values.yaml similarity index 100% rename from trains/community/ddns-updater/1.0.23/templates/test_values/easydns-values.yaml rename to trains/community/ddns-updater/1.0.24/templates/test_values/easydns-values.yaml diff --git a/trains/community/ddns-updater/1.0.23/templates/test_values/freedns-values.yaml b/trains/community/ddns-updater/1.0.24/templates/test_values/freedns-values.yaml similarity index 100% rename from trains/community/ddns-updater/1.0.23/templates/test_values/freedns-values.yaml rename to trains/community/ddns-updater/1.0.24/templates/test_values/freedns-values.yaml diff --git a/trains/community/ddns-updater/1.0.23/templates/test_values/gandi-values.yaml b/trains/community/ddns-updater/1.0.24/templates/test_values/gandi-values.yaml similarity index 100% rename from trains/community/ddns-updater/1.0.23/templates/test_values/gandi-values.yaml rename to trains/community/ddns-updater/1.0.24/templates/test_values/gandi-values.yaml diff --git a/trains/community/ddns-updater/1.0.23/templates/test_values/gcp-values.yaml b/trains/community/ddns-updater/1.0.24/templates/test_values/gcp-values.yaml similarity index 100% rename from trains/community/ddns-updater/1.0.23/templates/test_values/gcp-values.yaml rename to trains/community/ddns-updater/1.0.24/templates/test_values/gcp-values.yaml diff --git a/trains/community/ddns-updater/1.0.23/templates/test_values/godaddy-values.yaml b/trains/community/ddns-updater/1.0.24/templates/test_values/godaddy-values.yaml similarity index 100% rename from trains/community/ddns-updater/1.0.23/templates/test_values/godaddy-values.yaml rename to trains/community/ddns-updater/1.0.24/templates/test_values/godaddy-values.yaml diff --git a/trains/community/ddns-updater/1.0.23/templates/test_values/goip-values.yaml b/trains/community/ddns-updater/1.0.24/templates/test_values/goip-values.yaml similarity index 100% rename from trains/community/ddns-updater/1.0.23/templates/test_values/goip-values.yaml rename to trains/community/ddns-updater/1.0.24/templates/test_values/goip-values.yaml diff --git a/trains/community/ddns-updater/1.0.23/templates/test_values/he-values.yaml b/trains/community/ddns-updater/1.0.24/templates/test_values/he-values.yaml similarity index 100% rename from trains/community/ddns-updater/1.0.23/templates/test_values/he-values.yaml rename to trains/community/ddns-updater/1.0.24/templates/test_values/he-values.yaml diff --git a/trains/community/ddns-updater/1.0.23/templates/test_values/hetzner-values.yaml b/trains/community/ddns-updater/1.0.24/templates/test_values/hetzner-values.yaml similarity index 100% rename from trains/community/ddns-updater/1.0.23/templates/test_values/hetzner-values.yaml rename to trains/community/ddns-updater/1.0.24/templates/test_values/hetzner-values.yaml diff --git a/trains/community/ddns-updater/1.0.23/templates/test_values/infomaniak-values.yaml b/trains/community/ddns-updater/1.0.24/templates/test_values/infomaniak-values.yaml similarity index 100% rename from trains/community/ddns-updater/1.0.23/templates/test_values/infomaniak-values.yaml rename to trains/community/ddns-updater/1.0.24/templates/test_values/infomaniak-values.yaml diff --git a/trains/community/ddns-updater/1.0.23/templates/test_values/inwx-values.yaml b/trains/community/ddns-updater/1.0.24/templates/test_values/inwx-values.yaml similarity index 100% rename from trains/community/ddns-updater/1.0.23/templates/test_values/inwx-values.yaml rename to trains/community/ddns-updater/1.0.24/templates/test_values/inwx-values.yaml diff --git a/trains/community/ddns-updater/1.0.23/templates/test_values/ionos-values.yaml b/trains/community/ddns-updater/1.0.24/templates/test_values/ionos-values.yaml similarity index 100% rename from trains/community/ddns-updater/1.0.23/templates/test_values/ionos-values.yaml rename to trains/community/ddns-updater/1.0.24/templates/test_values/ionos-values.yaml diff --git a/trains/community/ddns-updater/1.0.23/templates/test_values/linode-values.yaml b/trains/community/ddns-updater/1.0.24/templates/test_values/linode-values.yaml similarity index 100% rename from trains/community/ddns-updater/1.0.23/templates/test_values/linode-values.yaml rename to trains/community/ddns-updater/1.0.24/templates/test_values/linode-values.yaml diff --git a/trains/community/ddns-updater/1.0.23/templates/test_values/luadns-values.yaml b/trains/community/ddns-updater/1.0.24/templates/test_values/luadns-values.yaml similarity index 100% rename from trains/community/ddns-updater/1.0.23/templates/test_values/luadns-values.yaml rename to trains/community/ddns-updater/1.0.24/templates/test_values/luadns-values.yaml diff --git a/trains/community/ddns-updater/1.0.23/templates/test_values/namecheap-values.yaml b/trains/community/ddns-updater/1.0.24/templates/test_values/namecheap-values.yaml similarity index 100% rename from trains/community/ddns-updater/1.0.23/templates/test_values/namecheap-values.yaml rename to trains/community/ddns-updater/1.0.24/templates/test_values/namecheap-values.yaml diff --git a/trains/community/ddns-updater/1.0.23/templates/test_values/namecom-values.yaml b/trains/community/ddns-updater/1.0.24/templates/test_values/namecom-values.yaml similarity index 100% rename from trains/community/ddns-updater/1.0.23/templates/test_values/namecom-values.yaml rename to trains/community/ddns-updater/1.0.24/templates/test_values/namecom-values.yaml diff --git a/trains/community/ddns-updater/1.0.23/templates/test_values/netcup-values.yaml b/trains/community/ddns-updater/1.0.24/templates/test_values/netcup-values.yaml similarity index 100% rename from trains/community/ddns-updater/1.0.23/templates/test_values/netcup-values.yaml rename to trains/community/ddns-updater/1.0.24/templates/test_values/netcup-values.yaml diff --git a/trains/community/ddns-updater/1.0.23/templates/test_values/njalla-values.yaml b/trains/community/ddns-updater/1.0.24/templates/test_values/njalla-values.yaml similarity index 100% rename from trains/community/ddns-updater/1.0.23/templates/test_values/njalla-values.yaml rename to trains/community/ddns-updater/1.0.24/templates/test_values/njalla-values.yaml diff --git a/trains/community/ddns-updater/1.0.23/templates/test_values/noip-values.yaml b/trains/community/ddns-updater/1.0.24/templates/test_values/noip-values.yaml similarity index 100% rename from trains/community/ddns-updater/1.0.23/templates/test_values/noip-values.yaml rename to trains/community/ddns-updater/1.0.24/templates/test_values/noip-values.yaml diff --git a/trains/community/ddns-updater/1.0.23/templates/test_values/nowdns-values.yaml b/trains/community/ddns-updater/1.0.24/templates/test_values/nowdns-values.yaml similarity index 100% rename from trains/community/ddns-updater/1.0.23/templates/test_values/nowdns-values.yaml rename to trains/community/ddns-updater/1.0.24/templates/test_values/nowdns-values.yaml diff --git a/trains/community/ddns-updater/1.0.23/templates/test_values/opendns-values.yaml b/trains/community/ddns-updater/1.0.24/templates/test_values/opendns-values.yaml similarity index 100% rename from trains/community/ddns-updater/1.0.23/templates/test_values/opendns-values.yaml rename to trains/community/ddns-updater/1.0.24/templates/test_values/opendns-values.yaml diff --git a/trains/community/ddns-updater/1.0.23/templates/test_values/ovh-values.yaml b/trains/community/ddns-updater/1.0.24/templates/test_values/ovh-values.yaml similarity index 100% rename from trains/community/ddns-updater/1.0.23/templates/test_values/ovh-values.yaml rename to trains/community/ddns-updater/1.0.24/templates/test_values/ovh-values.yaml diff --git a/trains/community/ddns-updater/1.0.23/templates/test_values/porkbun-values.yaml b/trains/community/ddns-updater/1.0.24/templates/test_values/porkbun-values.yaml similarity index 100% rename from trains/community/ddns-updater/1.0.23/templates/test_values/porkbun-values.yaml rename to trains/community/ddns-updater/1.0.24/templates/test_values/porkbun-values.yaml diff --git a/trains/community/ddns-updater/1.0.23/templates/test_values/route53-values.yaml b/trains/community/ddns-updater/1.0.24/templates/test_values/route53-values.yaml similarity index 100% rename from trains/community/ddns-updater/1.0.23/templates/test_values/route53-values.yaml rename to trains/community/ddns-updater/1.0.24/templates/test_values/route53-values.yaml diff --git a/trains/community/ddns-updater/1.0.23/templates/test_values/selfhostde-values.yaml b/trains/community/ddns-updater/1.0.24/templates/test_values/selfhostde-values.yaml similarity index 100% rename from trains/community/ddns-updater/1.0.23/templates/test_values/selfhostde-values.yaml rename to trains/community/ddns-updater/1.0.24/templates/test_values/selfhostde-values.yaml diff --git a/trains/community/ddns-updater/1.0.23/templates/test_values/servercow-values.yaml b/trains/community/ddns-updater/1.0.24/templates/test_values/servercow-values.yaml similarity index 100% rename from trains/community/ddns-updater/1.0.23/templates/test_values/servercow-values.yaml rename to trains/community/ddns-updater/1.0.24/templates/test_values/servercow-values.yaml diff --git a/trains/community/ddns-updater/1.0.23/templates/test_values/spdyn-values.yaml b/trains/community/ddns-updater/1.0.24/templates/test_values/spdyn-values.yaml similarity index 100% rename from trains/community/ddns-updater/1.0.23/templates/test_values/spdyn-values.yaml rename to trains/community/ddns-updater/1.0.24/templates/test_values/spdyn-values.yaml diff --git a/trains/community/ddns-updater/1.0.23/templates/test_values/strato-values.yaml b/trains/community/ddns-updater/1.0.24/templates/test_values/strato-values.yaml similarity index 100% rename from trains/community/ddns-updater/1.0.23/templates/test_values/strato-values.yaml rename to trains/community/ddns-updater/1.0.24/templates/test_values/strato-values.yaml diff --git a/trains/community/ddns-updater/1.0.23/templates/test_values/variomedia-values.yaml b/trains/community/ddns-updater/1.0.24/templates/test_values/variomedia-values.yaml similarity index 100% rename from trains/community/ddns-updater/1.0.23/templates/test_values/variomedia-values.yaml rename to trains/community/ddns-updater/1.0.24/templates/test_values/variomedia-values.yaml diff --git a/trains/community/ddns-updater/1.0.23/templates/test_values/zoneedit-values.yaml b/trains/community/ddns-updater/1.0.24/templates/test_values/zoneedit-values.yaml similarity index 100% rename from trains/community/ddns-updater/1.0.23/templates/test_values/zoneedit-values.yaml rename to trains/community/ddns-updater/1.0.24/templates/test_values/zoneedit-values.yaml diff --git a/trains/community/deluge/1.0.17/templates/library/base_v1_1_3/healthchecks.py b/trains/community/deluge/1.0.17/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/community/deluge/1.0.17/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/deluge/1.0.17/templates/library/base_v1_1_3/permissions.py b/trains/community/deluge/1.0.17/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/community/deluge/1.0.17/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/community/deluge/1.0.17/README.md b/trains/community/deluge/1.0.18/README.md similarity index 100% rename from trains/community/deluge/1.0.17/README.md rename to trains/community/deluge/1.0.18/README.md diff --git a/trains/community/deluge/1.0.17/app.yaml b/trains/community/deluge/1.0.18/app.yaml similarity index 89% rename from trains/community/deluge/1.0.17/app.yaml rename to trains/community/deluge/1.0.18/app.yaml index 1e01e76ff7..e8d2a2d50a 100644 --- a/trains/community/deluge/1.0.17/app.yaml +++ b/trains/community/deluge/1.0.18/app.yaml @@ -19,8 +19,8 @@ icon: https://media.sys.truenas.net/apps/deluge/icons/icon.png keywords: - torrent - download -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -38,4 +38,4 @@ sources: - https://deluge-torrent.org/ title: Deluge train: community -version: 1.0.17 +version: 1.0.18 diff --git a/trains/community/deluge/1.0.17/ix_values.yaml b/trains/community/deluge/1.0.18/ix_values.yaml similarity index 100% rename from trains/community/deluge/1.0.17/ix_values.yaml rename to trains/community/deluge/1.0.18/ix_values.yaml diff --git a/trains/community/deluge/1.0.17/migrations/migrate_from_kubernetes b/trains/community/deluge/1.0.18/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/deluge/1.0.17/migrations/migrate_from_kubernetes rename to trains/community/deluge/1.0.18/migrations/migrate_from_kubernetes diff --git a/trains/community/deluge/1.0.17/migrations/migration_helpers/__init__.py b/trains/community/deluge/1.0.18/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/deluge/1.0.17/migrations/migration_helpers/__init__.py rename to trains/community/deluge/1.0.18/migrations/migration_helpers/__init__.py diff --git a/trains/community/deluge/1.0.17/migrations/migration_helpers/cpu.py b/trains/community/deluge/1.0.18/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/deluge/1.0.17/migrations/migration_helpers/cpu.py rename to trains/community/deluge/1.0.18/migrations/migration_helpers/cpu.py diff --git a/trains/community/deluge/1.0.17/migrations/migration_helpers/dns_config.py b/trains/community/deluge/1.0.18/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/deluge/1.0.17/migrations/migration_helpers/dns_config.py rename to trains/community/deluge/1.0.18/migrations/migration_helpers/dns_config.py diff --git a/trains/community/deluge/1.0.17/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/deluge/1.0.18/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/deluge/1.0.17/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/deluge/1.0.18/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/deluge/1.0.17/migrations/migration_helpers/memory.py b/trains/community/deluge/1.0.18/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/deluge/1.0.17/migrations/migration_helpers/memory.py rename to trains/community/deluge/1.0.18/migrations/migration_helpers/memory.py diff --git a/trains/community/deluge/1.0.17/migrations/migration_helpers/resources.py b/trains/community/deluge/1.0.18/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/deluge/1.0.17/migrations/migration_helpers/resources.py rename to trains/community/deluge/1.0.18/migrations/migration_helpers/resources.py diff --git a/trains/community/deluge/1.0.17/migrations/migration_helpers/storage.py b/trains/community/deluge/1.0.18/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/deluge/1.0.17/migrations/migration_helpers/storage.py rename to trains/community/deluge/1.0.18/migrations/migration_helpers/storage.py diff --git a/trains/community/deluge/1.0.17/questions.yaml b/trains/community/deluge/1.0.18/questions.yaml similarity index 100% rename from trains/community/deluge/1.0.17/questions.yaml rename to trains/community/deluge/1.0.18/questions.yaml diff --git a/trains/community/deluge/1.0.17/templates/docker-compose.yaml b/trains/community/deluge/1.0.18/templates/docker-compose.yaml similarity index 100% rename from trains/community/deluge/1.0.17/templates/docker-compose.yaml rename to trains/community/deluge/1.0.18/templates/docker-compose.yaml diff --git a/trains/community/deluge/1.0.17/templates/library/base_v1_1_3/__init__.py b/trains/community/deluge/1.0.18/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/deluge/1.0.17/templates/library/base_v1_1_3/__init__.py rename to trains/community/deluge/1.0.18/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/deluge/1.0.17/templates/library/base_v1_1_3/environment.py b/trains/community/deluge/1.0.18/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/deluge/1.0.17/templates/library/base_v1_1_3/environment.py rename to trains/community/deluge/1.0.18/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/deluge/1.0.18/templates/library/base_v1_1_4/healthchecks.py b/trains/community/deluge/1.0.18/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/community/deluge/1.0.18/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/deluge/1.0.17/templates/library/base_v1_1_3/mariadb.py b/trains/community/deluge/1.0.18/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/deluge/1.0.17/templates/library/base_v1_1_3/mariadb.py rename to trains/community/deluge/1.0.18/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/deluge/1.0.17/templates/library/base_v1_1_3/metadata.py b/trains/community/deluge/1.0.18/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/deluge/1.0.17/templates/library/base_v1_1_3/metadata.py rename to trains/community/deluge/1.0.18/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/deluge/1.0.17/templates/library/base_v1_1_3/network.py b/trains/community/deluge/1.0.18/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/deluge/1.0.17/templates/library/base_v1_1_3/network.py rename to trains/community/deluge/1.0.18/templates/library/base_v1_1_4/network.py diff --git a/trains/community/deluge/1.0.18/templates/library/base_v1_1_4/permissions.py b/trains/community/deluge/1.0.18/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/community/deluge/1.0.18/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/community/deluge/1.0.17/templates/library/base_v1_1_3/ports.py b/trains/community/deluge/1.0.18/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/deluge/1.0.17/templates/library/base_v1_1_3/ports.py rename to trains/community/deluge/1.0.18/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/deluge/1.0.17/templates/library/base_v1_1_3/postgres.py b/trains/community/deluge/1.0.18/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/deluge/1.0.17/templates/library/base_v1_1_3/postgres.py rename to trains/community/deluge/1.0.18/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/deluge/1.0.17/templates/library/base_v1_1_3/redis.py b/trains/community/deluge/1.0.18/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/deluge/1.0.17/templates/library/base_v1_1_3/redis.py rename to trains/community/deluge/1.0.18/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/deluge/1.0.17/templates/library/base_v1_1_3/resources.py b/trains/community/deluge/1.0.18/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/deluge/1.0.17/templates/library/base_v1_1_3/resources.py rename to trains/community/deluge/1.0.18/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/deluge/1.0.17/templates/library/base_v1_1_3/security.py b/trains/community/deluge/1.0.18/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/deluge/1.0.17/templates/library/base_v1_1_3/security.py rename to trains/community/deluge/1.0.18/templates/library/base_v1_1_4/security.py diff --git a/trains/community/deluge/1.0.17/templates/library/base_v1_1_3/storage.py b/trains/community/deluge/1.0.18/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/deluge/1.0.17/templates/library/base_v1_1_3/storage.py rename to trains/community/deluge/1.0.18/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/deluge/1.0.17/templates/library/base_v1_1_3/utils.py b/trains/community/deluge/1.0.18/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/deluge/1.0.17/templates/library/base_v1_1_3/utils.py rename to trains/community/deluge/1.0.18/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/deluge/1.0.17/templates/test_values/basic-values.yaml b/trains/community/deluge/1.0.18/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/deluge/1.0.17/templates/test_values/basic-values.yaml rename to trains/community/deluge/1.0.18/templates/test_values/basic-values.yaml diff --git a/trains/community/deluge/1.0.17/templates/test_values/hostnet-values.yaml b/trains/community/deluge/1.0.18/templates/test_values/hostnet-values.yaml similarity index 100% rename from trains/community/deluge/1.0.17/templates/test_values/hostnet-values.yaml rename to trains/community/deluge/1.0.18/templates/test_values/hostnet-values.yaml diff --git a/trains/community/distribution/1.0.18/templates/library/base_v1_1_3/healthchecks.py b/trains/community/distribution/1.0.18/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/community/distribution/1.0.18/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/distribution/1.0.18/templates/library/base_v1_1_3/permissions.py b/trains/community/distribution/1.0.18/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/community/distribution/1.0.18/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/community/distribution/1.0.18/README.md b/trains/community/distribution/1.0.19/README.md similarity index 100% rename from trains/community/distribution/1.0.18/README.md rename to trains/community/distribution/1.0.19/README.md diff --git a/trains/community/distribution/1.0.18/app.yaml b/trains/community/distribution/1.0.19/app.yaml similarity index 86% rename from trains/community/distribution/1.0.18/app.yaml rename to trains/community/distribution/1.0.19/app.yaml index 9fbfbd209a..2fd511a576 100644 --- a/trains/community/distribution/1.0.18/app.yaml +++ b/trains/community/distribution/1.0.19/app.yaml @@ -10,8 +10,8 @@ icon: https://media.sys.truenas.net/apps/distribution/icons/icon.svg keywords: - registry - container -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -30,4 +30,4 @@ sources: - https://github.com/distribution/distribution title: Distribution train: community -version: 1.0.18 +version: 1.0.19 diff --git a/trains/community/distribution/1.0.18/ix_values.yaml b/trains/community/distribution/1.0.19/ix_values.yaml similarity index 100% rename from trains/community/distribution/1.0.18/ix_values.yaml rename to trains/community/distribution/1.0.19/ix_values.yaml diff --git a/trains/community/distribution/1.0.18/migrations/migrate_from_kubernetes b/trains/community/distribution/1.0.19/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/distribution/1.0.18/migrations/migrate_from_kubernetes rename to trains/community/distribution/1.0.19/migrations/migrate_from_kubernetes diff --git a/trains/community/distribution/1.0.18/migrations/migration_helpers/__init__.py b/trains/community/distribution/1.0.19/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/distribution/1.0.18/migrations/migration_helpers/__init__.py rename to trains/community/distribution/1.0.19/migrations/migration_helpers/__init__.py diff --git a/trains/community/distribution/1.0.18/migrations/migration_helpers/cpu.py b/trains/community/distribution/1.0.19/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/distribution/1.0.18/migrations/migration_helpers/cpu.py rename to trains/community/distribution/1.0.19/migrations/migration_helpers/cpu.py diff --git a/trains/community/distribution/1.0.18/migrations/migration_helpers/dns_config.py b/trains/community/distribution/1.0.19/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/distribution/1.0.18/migrations/migration_helpers/dns_config.py rename to trains/community/distribution/1.0.19/migrations/migration_helpers/dns_config.py diff --git a/trains/community/distribution/1.0.18/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/distribution/1.0.19/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/distribution/1.0.18/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/distribution/1.0.19/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/distribution/1.0.18/migrations/migration_helpers/memory.py b/trains/community/distribution/1.0.19/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/distribution/1.0.18/migrations/migration_helpers/memory.py rename to trains/community/distribution/1.0.19/migrations/migration_helpers/memory.py diff --git a/trains/community/distribution/1.0.18/migrations/migration_helpers/resources.py b/trains/community/distribution/1.0.19/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/distribution/1.0.18/migrations/migration_helpers/resources.py rename to trains/community/distribution/1.0.19/migrations/migration_helpers/resources.py diff --git a/trains/community/distribution/1.0.18/migrations/migration_helpers/storage.py b/trains/community/distribution/1.0.19/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/distribution/1.0.18/migrations/migration_helpers/storage.py rename to trains/community/distribution/1.0.19/migrations/migration_helpers/storage.py diff --git a/trains/community/distribution/1.0.18/questions.yaml b/trains/community/distribution/1.0.19/questions.yaml similarity index 100% rename from trains/community/distribution/1.0.18/questions.yaml rename to trains/community/distribution/1.0.19/questions.yaml diff --git a/trains/community/distribution/1.0.18/templates/docker-compose.yaml b/trains/community/distribution/1.0.19/templates/docker-compose.yaml similarity index 100% rename from trains/community/distribution/1.0.18/templates/docker-compose.yaml rename to trains/community/distribution/1.0.19/templates/docker-compose.yaml diff --git a/trains/community/distribution/1.0.18/templates/library/base_v1_1_3/__init__.py b/trains/community/distribution/1.0.19/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/distribution/1.0.18/templates/library/base_v1_1_3/__init__.py rename to trains/community/distribution/1.0.19/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/distribution/1.0.18/templates/library/base_v1_1_3/environment.py b/trains/community/distribution/1.0.19/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/distribution/1.0.18/templates/library/base_v1_1_3/environment.py rename to trains/community/distribution/1.0.19/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/distribution/1.0.19/templates/library/base_v1_1_4/healthchecks.py b/trains/community/distribution/1.0.19/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/community/distribution/1.0.19/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/distribution/1.0.18/templates/library/base_v1_1_3/mariadb.py b/trains/community/distribution/1.0.19/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/distribution/1.0.18/templates/library/base_v1_1_3/mariadb.py rename to trains/community/distribution/1.0.19/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/distribution/1.0.18/templates/library/base_v1_1_3/metadata.py b/trains/community/distribution/1.0.19/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/distribution/1.0.18/templates/library/base_v1_1_3/metadata.py rename to trains/community/distribution/1.0.19/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/distribution/1.0.18/templates/library/base_v1_1_3/network.py b/trains/community/distribution/1.0.19/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/distribution/1.0.18/templates/library/base_v1_1_3/network.py rename to trains/community/distribution/1.0.19/templates/library/base_v1_1_4/network.py diff --git a/trains/community/distribution/1.0.19/templates/library/base_v1_1_4/permissions.py b/trains/community/distribution/1.0.19/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/community/distribution/1.0.19/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/community/distribution/1.0.18/templates/library/base_v1_1_3/ports.py b/trains/community/distribution/1.0.19/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/distribution/1.0.18/templates/library/base_v1_1_3/ports.py rename to trains/community/distribution/1.0.19/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/distribution/1.0.18/templates/library/base_v1_1_3/postgres.py b/trains/community/distribution/1.0.19/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/distribution/1.0.18/templates/library/base_v1_1_3/postgres.py rename to trains/community/distribution/1.0.19/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/distribution/1.0.18/templates/library/base_v1_1_3/redis.py b/trains/community/distribution/1.0.19/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/distribution/1.0.18/templates/library/base_v1_1_3/redis.py rename to trains/community/distribution/1.0.19/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/distribution/1.0.18/templates/library/base_v1_1_3/resources.py b/trains/community/distribution/1.0.19/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/distribution/1.0.18/templates/library/base_v1_1_3/resources.py rename to trains/community/distribution/1.0.19/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/distribution/1.0.18/templates/library/base_v1_1_3/security.py b/trains/community/distribution/1.0.19/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/distribution/1.0.18/templates/library/base_v1_1_3/security.py rename to trains/community/distribution/1.0.19/templates/library/base_v1_1_4/security.py diff --git a/trains/community/distribution/1.0.18/templates/library/base_v1_1_3/storage.py b/trains/community/distribution/1.0.19/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/distribution/1.0.18/templates/library/base_v1_1_3/storage.py rename to trains/community/distribution/1.0.19/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/distribution/1.0.18/templates/library/base_v1_1_3/utils.py b/trains/community/distribution/1.0.19/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/distribution/1.0.18/templates/library/base_v1_1_3/utils.py rename to trains/community/distribution/1.0.19/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/distribution/1.0.18/templates/test_values/auth-values.yaml b/trains/community/distribution/1.0.19/templates/test_values/auth-values.yaml similarity index 100% rename from trains/community/distribution/1.0.18/templates/test_values/auth-values.yaml rename to trains/community/distribution/1.0.19/templates/test_values/auth-values.yaml diff --git a/trains/community/distribution/1.0.18/templates/test_values/basic-values.yaml b/trains/community/distribution/1.0.19/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/distribution/1.0.18/templates/test_values/basic-values.yaml rename to trains/community/distribution/1.0.19/templates/test_values/basic-values.yaml diff --git a/trains/community/distribution/1.0.18/templates/test_values/https-values.yaml b/trains/community/distribution/1.0.19/templates/test_values/https-values.yaml similarity index 100% rename from trains/community/distribution/1.0.18/templates/test_values/https-values.yaml rename to trains/community/distribution/1.0.19/templates/test_values/https-values.yaml diff --git a/trains/community/dockge/1.0.16/templates/library/base_v1_1_3/healthchecks.py b/trains/community/dockge/1.0.16/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/community/dockge/1.0.16/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/dockge/1.0.16/templates/library/base_v1_1_3/permissions.py b/trains/community/dockge/1.0.16/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/community/dockge/1.0.16/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/community/dockge/1.0.16/README.md b/trains/community/dockge/1.0.17/README.md similarity index 100% rename from trains/community/dockge/1.0.16/README.md rename to trains/community/dockge/1.0.17/README.md diff --git a/trains/community/dockge/1.0.16/app.yaml b/trains/community/dockge/1.0.17/app.yaml similarity index 91% rename from trains/community/dockge/1.0.16/app.yaml rename to trains/community/dockge/1.0.17/app.yaml index 4f4d0e80c8..61008a66d0 100644 --- a/trains/community/dockge/1.0.16/app.yaml +++ b/trains/community/dockge/1.0.17/app.yaml @@ -28,8 +28,8 @@ icon: https://media.sys.truenas.net/apps/dockge/icons/icon.svg keywords: - docker - compose -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -48,4 +48,4 @@ sources: - https://github.com/louislam/dockge title: Dockge train: community -version: 1.0.16 +version: 1.0.17 diff --git a/trains/community/dockge/1.0.16/ix_values.yaml b/trains/community/dockge/1.0.17/ix_values.yaml similarity index 100% rename from trains/community/dockge/1.0.16/ix_values.yaml rename to trains/community/dockge/1.0.17/ix_values.yaml diff --git a/trains/community/dockge/1.0.16/migrations/migration_helpers/__init__.py b/trains/community/dockge/1.0.17/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/dockge/1.0.16/migrations/migration_helpers/__init__.py rename to trains/community/dockge/1.0.17/migrations/migration_helpers/__init__.py diff --git a/trains/community/dockge/1.0.16/migrations/migration_helpers/cpu.py b/trains/community/dockge/1.0.17/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/dockge/1.0.16/migrations/migration_helpers/cpu.py rename to trains/community/dockge/1.0.17/migrations/migration_helpers/cpu.py diff --git a/trains/community/dockge/1.0.16/migrations/migration_helpers/dns_config.py b/trains/community/dockge/1.0.17/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/dockge/1.0.16/migrations/migration_helpers/dns_config.py rename to trains/community/dockge/1.0.17/migrations/migration_helpers/dns_config.py diff --git a/trains/community/dockge/1.0.16/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/dockge/1.0.17/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/dockge/1.0.16/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/dockge/1.0.17/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/dockge/1.0.16/migrations/migration_helpers/memory.py b/trains/community/dockge/1.0.17/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/dockge/1.0.16/migrations/migration_helpers/memory.py rename to trains/community/dockge/1.0.17/migrations/migration_helpers/memory.py diff --git a/trains/community/dockge/1.0.16/migrations/migration_helpers/resources.py b/trains/community/dockge/1.0.17/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/dockge/1.0.16/migrations/migration_helpers/resources.py rename to trains/community/dockge/1.0.17/migrations/migration_helpers/resources.py diff --git a/trains/community/dockge/1.0.16/migrations/migration_helpers/storage.py b/trains/community/dockge/1.0.17/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/dockge/1.0.16/migrations/migration_helpers/storage.py rename to trains/community/dockge/1.0.17/migrations/migration_helpers/storage.py diff --git a/trains/community/dockge/1.0.16/questions.yaml b/trains/community/dockge/1.0.17/questions.yaml similarity index 100% rename from trains/community/dockge/1.0.16/questions.yaml rename to trains/community/dockge/1.0.17/questions.yaml diff --git a/trains/community/dockge/1.0.16/templates/docker-compose.yaml b/trains/community/dockge/1.0.17/templates/docker-compose.yaml similarity index 100% rename from trains/community/dockge/1.0.16/templates/docker-compose.yaml rename to trains/community/dockge/1.0.17/templates/docker-compose.yaml diff --git a/trains/community/dockge/1.0.16/templates/library/base_v1_1_3/__init__.py b/trains/community/dockge/1.0.17/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/dockge/1.0.16/templates/library/base_v1_1_3/__init__.py rename to trains/community/dockge/1.0.17/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/dockge/1.0.16/templates/library/base_v1_1_3/environment.py b/trains/community/dockge/1.0.17/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/dockge/1.0.16/templates/library/base_v1_1_3/environment.py rename to trains/community/dockge/1.0.17/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/dockge/1.0.17/templates/library/base_v1_1_4/healthchecks.py b/trains/community/dockge/1.0.17/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/community/dockge/1.0.17/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/dockge/1.0.16/templates/library/base_v1_1_3/mariadb.py b/trains/community/dockge/1.0.17/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/dockge/1.0.16/templates/library/base_v1_1_3/mariadb.py rename to trains/community/dockge/1.0.17/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/dockge/1.0.16/templates/library/base_v1_1_3/metadata.py b/trains/community/dockge/1.0.17/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/dockge/1.0.16/templates/library/base_v1_1_3/metadata.py rename to trains/community/dockge/1.0.17/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/dockge/1.0.16/templates/library/base_v1_1_3/network.py b/trains/community/dockge/1.0.17/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/dockge/1.0.16/templates/library/base_v1_1_3/network.py rename to trains/community/dockge/1.0.17/templates/library/base_v1_1_4/network.py diff --git a/trains/community/dockge/1.0.17/templates/library/base_v1_1_4/permissions.py b/trains/community/dockge/1.0.17/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/community/dockge/1.0.17/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/community/dockge/1.0.16/templates/library/base_v1_1_3/ports.py b/trains/community/dockge/1.0.17/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/dockge/1.0.16/templates/library/base_v1_1_3/ports.py rename to trains/community/dockge/1.0.17/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/dockge/1.0.16/templates/library/base_v1_1_3/postgres.py b/trains/community/dockge/1.0.17/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/dockge/1.0.16/templates/library/base_v1_1_3/postgres.py rename to trains/community/dockge/1.0.17/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/dockge/1.0.16/templates/library/base_v1_1_3/redis.py b/trains/community/dockge/1.0.17/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/dockge/1.0.16/templates/library/base_v1_1_3/redis.py rename to trains/community/dockge/1.0.17/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/dockge/1.0.16/templates/library/base_v1_1_3/resources.py b/trains/community/dockge/1.0.17/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/dockge/1.0.16/templates/library/base_v1_1_3/resources.py rename to trains/community/dockge/1.0.17/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/dockge/1.0.16/templates/library/base_v1_1_3/security.py b/trains/community/dockge/1.0.17/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/dockge/1.0.16/templates/library/base_v1_1_3/security.py rename to trains/community/dockge/1.0.17/templates/library/base_v1_1_4/security.py diff --git a/trains/community/dockge/1.0.16/templates/library/base_v1_1_3/storage.py b/trains/community/dockge/1.0.17/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/dockge/1.0.16/templates/library/base_v1_1_3/storage.py rename to trains/community/dockge/1.0.17/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/dockge/1.0.16/templates/library/base_v1_1_3/utils.py b/trains/community/dockge/1.0.17/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/dockge/1.0.16/templates/library/base_v1_1_3/utils.py rename to trains/community/dockge/1.0.17/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/dockge/1.0.16/templates/test_values/basic-values.yaml b/trains/community/dockge/1.0.17/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/dockge/1.0.16/templates/test_values/basic-values.yaml rename to trains/community/dockge/1.0.17/templates/test_values/basic-values.yaml diff --git a/trains/community/dockge/1.0.16/templates/test_values/https-values.yaml b/trains/community/dockge/1.0.17/templates/test_values/https-values.yaml similarity index 100% rename from trains/community/dockge/1.0.16/templates/test_values/https-values.yaml rename to trains/community/dockge/1.0.17/templates/test_values/https-values.yaml diff --git a/trains/community/drawio/1.1.10/templates/library/base_v1_1_3/healthchecks.py b/trains/community/drawio/1.1.10/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/community/drawio/1.1.10/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/drawio/1.1.10/templates/library/base_v1_1_3/permissions.py b/trains/community/drawio/1.1.10/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/community/drawio/1.1.10/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/community/drawio/1.1.10/README.md b/trains/community/drawio/1.1.11/README.md similarity index 100% rename from trains/community/drawio/1.1.10/README.md rename to trains/community/drawio/1.1.11/README.md diff --git a/trains/community/drawio/1.1.10/app.yaml b/trains/community/drawio/1.1.11/app.yaml similarity index 88% rename from trains/community/drawio/1.1.10/app.yaml rename to trains/community/drawio/1.1.11/app.yaml index ec66fe9a80..f5e6766a57 100644 --- a/trains/community/drawio/1.1.10/app.yaml +++ b/trains/community/drawio/1.1.11/app.yaml @@ -9,8 +9,8 @@ icon: https://media.sys.truenas.net/apps/drawio/icons/icon.png keywords: - diagram - whiteboard -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -32,4 +32,4 @@ sources: - https://github.com/jgraph/drawio title: Draw.io train: community -version: 1.1.10 +version: 1.1.11 diff --git a/trains/community/drawio/1.1.10/ix_values.yaml b/trains/community/drawio/1.1.11/ix_values.yaml similarity index 100% rename from trains/community/drawio/1.1.10/ix_values.yaml rename to trains/community/drawio/1.1.11/ix_values.yaml diff --git a/trains/community/drawio/1.1.10/migrations/migrate_from_kubernetes b/trains/community/drawio/1.1.11/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/drawio/1.1.10/migrations/migrate_from_kubernetes rename to trains/community/drawio/1.1.11/migrations/migrate_from_kubernetes diff --git a/trains/community/drawio/1.1.10/migrations/migration_helpers/__init__.py b/trains/community/drawio/1.1.11/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/drawio/1.1.10/migrations/migration_helpers/__init__.py rename to trains/community/drawio/1.1.11/migrations/migration_helpers/__init__.py diff --git a/trains/community/drawio/1.1.10/migrations/migration_helpers/cpu.py b/trains/community/drawio/1.1.11/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/drawio/1.1.10/migrations/migration_helpers/cpu.py rename to trains/community/drawio/1.1.11/migrations/migration_helpers/cpu.py diff --git a/trains/community/drawio/1.1.10/migrations/migration_helpers/dns_config.py b/trains/community/drawio/1.1.11/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/drawio/1.1.10/migrations/migration_helpers/dns_config.py rename to trains/community/drawio/1.1.11/migrations/migration_helpers/dns_config.py diff --git a/trains/community/drawio/1.1.10/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/drawio/1.1.11/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/drawio/1.1.10/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/drawio/1.1.11/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/drawio/1.1.10/migrations/migration_helpers/memory.py b/trains/community/drawio/1.1.11/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/drawio/1.1.10/migrations/migration_helpers/memory.py rename to trains/community/drawio/1.1.11/migrations/migration_helpers/memory.py diff --git a/trains/community/drawio/1.1.10/migrations/migration_helpers/resources.py b/trains/community/drawio/1.1.11/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/drawio/1.1.10/migrations/migration_helpers/resources.py rename to trains/community/drawio/1.1.11/migrations/migration_helpers/resources.py diff --git a/trains/community/drawio/1.1.10/migrations/migration_helpers/storage.py b/trains/community/drawio/1.1.11/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/drawio/1.1.10/migrations/migration_helpers/storage.py rename to trains/community/drawio/1.1.11/migrations/migration_helpers/storage.py diff --git a/trains/community/drawio/1.1.10/questions.yaml b/trains/community/drawio/1.1.11/questions.yaml similarity index 100% rename from trains/community/drawio/1.1.10/questions.yaml rename to trains/community/drawio/1.1.11/questions.yaml diff --git a/trains/community/drawio/1.1.10/templates/docker-compose.yaml b/trains/community/drawio/1.1.11/templates/docker-compose.yaml similarity index 100% rename from trains/community/drawio/1.1.10/templates/docker-compose.yaml rename to trains/community/drawio/1.1.11/templates/docker-compose.yaml diff --git a/trains/community/drawio/1.1.10/templates/library/base_v1_1_3/__init__.py b/trains/community/drawio/1.1.11/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/drawio/1.1.10/templates/library/base_v1_1_3/__init__.py rename to trains/community/drawio/1.1.11/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/drawio/1.1.10/templates/library/base_v1_1_3/environment.py b/trains/community/drawio/1.1.11/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/drawio/1.1.10/templates/library/base_v1_1_3/environment.py rename to trains/community/drawio/1.1.11/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/drawio/1.1.11/templates/library/base_v1_1_4/healthchecks.py b/trains/community/drawio/1.1.11/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/community/drawio/1.1.11/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/drawio/1.1.10/templates/library/base_v1_1_3/mariadb.py b/trains/community/drawio/1.1.11/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/drawio/1.1.10/templates/library/base_v1_1_3/mariadb.py rename to trains/community/drawio/1.1.11/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/drawio/1.1.10/templates/library/base_v1_1_3/metadata.py b/trains/community/drawio/1.1.11/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/drawio/1.1.10/templates/library/base_v1_1_3/metadata.py rename to trains/community/drawio/1.1.11/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/drawio/1.1.10/templates/library/base_v1_1_3/network.py b/trains/community/drawio/1.1.11/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/drawio/1.1.10/templates/library/base_v1_1_3/network.py rename to trains/community/drawio/1.1.11/templates/library/base_v1_1_4/network.py diff --git a/trains/community/drawio/1.1.11/templates/library/base_v1_1_4/permissions.py b/trains/community/drawio/1.1.11/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/community/drawio/1.1.11/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/community/drawio/1.1.10/templates/library/base_v1_1_3/ports.py b/trains/community/drawio/1.1.11/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/drawio/1.1.10/templates/library/base_v1_1_3/ports.py rename to trains/community/drawio/1.1.11/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/drawio/1.1.10/templates/library/base_v1_1_3/postgres.py b/trains/community/drawio/1.1.11/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/drawio/1.1.10/templates/library/base_v1_1_3/postgres.py rename to trains/community/drawio/1.1.11/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/drawio/1.1.10/templates/library/base_v1_1_3/redis.py b/trains/community/drawio/1.1.11/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/drawio/1.1.10/templates/library/base_v1_1_3/redis.py rename to trains/community/drawio/1.1.11/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/drawio/1.1.10/templates/library/base_v1_1_3/resources.py b/trains/community/drawio/1.1.11/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/drawio/1.1.10/templates/library/base_v1_1_3/resources.py rename to trains/community/drawio/1.1.11/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/drawio/1.1.10/templates/library/base_v1_1_3/security.py b/trains/community/drawio/1.1.11/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/drawio/1.1.10/templates/library/base_v1_1_3/security.py rename to trains/community/drawio/1.1.11/templates/library/base_v1_1_4/security.py diff --git a/trains/community/drawio/1.1.10/templates/library/base_v1_1_3/storage.py b/trains/community/drawio/1.1.11/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/drawio/1.1.10/templates/library/base_v1_1_3/storage.py rename to trains/community/drawio/1.1.11/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/drawio/1.1.10/templates/library/base_v1_1_3/utils.py b/trains/community/drawio/1.1.11/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/drawio/1.1.10/templates/library/base_v1_1_3/utils.py rename to trains/community/drawio/1.1.11/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/drawio/1.1.10/templates/test_values/basic-values.yaml b/trains/community/drawio/1.1.11/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/drawio/1.1.10/templates/test_values/basic-values.yaml rename to trains/community/drawio/1.1.11/templates/test_values/basic-values.yaml diff --git a/trains/community/filebrowser/1.1.10/templates/library/base_v1_1_3/healthchecks.py b/trains/community/filebrowser/1.1.10/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/community/filebrowser/1.1.10/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/filebrowser/1.1.10/templates/library/base_v1_1_3/permissions.py b/trains/community/filebrowser/1.1.10/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/community/filebrowser/1.1.10/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/community/filebrowser/1.1.10/README.md b/trains/community/filebrowser/1.1.11/README.md similarity index 100% rename from trains/community/filebrowser/1.1.10/README.md rename to trains/community/filebrowser/1.1.11/README.md diff --git a/trains/community/filebrowser/1.1.10/app.yaml b/trains/community/filebrowser/1.1.11/app.yaml similarity index 90% rename from trains/community/filebrowser/1.1.10/app.yaml rename to trains/community/filebrowser/1.1.11/app.yaml index b6cdbb495f..ee97400e1e 100644 --- a/trains/community/filebrowser/1.1.10/app.yaml +++ b/trains/community/filebrowser/1.1.11/app.yaml @@ -10,8 +10,8 @@ icon: https://media.sys.truenas.net/apps/filebrowser/icons/icon.png keywords: - files - browser -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -33,4 +33,4 @@ sources: - https://hub.docker.com/r/filebrowser/filebrowser title: File Browser train: community -version: 1.1.10 +version: 1.1.11 diff --git a/trains/community/filebrowser/1.1.10/ix_values.yaml b/trains/community/filebrowser/1.1.11/ix_values.yaml similarity index 100% rename from trains/community/filebrowser/1.1.10/ix_values.yaml rename to trains/community/filebrowser/1.1.11/ix_values.yaml diff --git a/trains/community/filebrowser/1.1.10/migrations/migrate_from_kubernetes b/trains/community/filebrowser/1.1.11/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/filebrowser/1.1.10/migrations/migrate_from_kubernetes rename to trains/community/filebrowser/1.1.11/migrations/migrate_from_kubernetes diff --git a/trains/community/filebrowser/1.1.10/migrations/migration_helpers/__init__.py b/trains/community/filebrowser/1.1.11/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/filebrowser/1.1.10/migrations/migration_helpers/__init__.py rename to trains/community/filebrowser/1.1.11/migrations/migration_helpers/__init__.py diff --git a/trains/community/filebrowser/1.1.10/migrations/migration_helpers/cpu.py b/trains/community/filebrowser/1.1.11/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/filebrowser/1.1.10/migrations/migration_helpers/cpu.py rename to trains/community/filebrowser/1.1.11/migrations/migration_helpers/cpu.py diff --git a/trains/community/filebrowser/1.1.10/migrations/migration_helpers/dns_config.py b/trains/community/filebrowser/1.1.11/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/filebrowser/1.1.10/migrations/migration_helpers/dns_config.py rename to trains/community/filebrowser/1.1.11/migrations/migration_helpers/dns_config.py diff --git a/trains/community/filebrowser/1.1.10/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/filebrowser/1.1.11/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/filebrowser/1.1.10/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/filebrowser/1.1.11/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/filebrowser/1.1.10/migrations/migration_helpers/memory.py b/trains/community/filebrowser/1.1.11/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/filebrowser/1.1.10/migrations/migration_helpers/memory.py rename to trains/community/filebrowser/1.1.11/migrations/migration_helpers/memory.py diff --git a/trains/community/filebrowser/1.1.10/migrations/migration_helpers/resources.py b/trains/community/filebrowser/1.1.11/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/filebrowser/1.1.10/migrations/migration_helpers/resources.py rename to trains/community/filebrowser/1.1.11/migrations/migration_helpers/resources.py diff --git a/trains/community/filebrowser/1.1.10/migrations/migration_helpers/storage.py b/trains/community/filebrowser/1.1.11/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/filebrowser/1.1.10/migrations/migration_helpers/storage.py rename to trains/community/filebrowser/1.1.11/migrations/migration_helpers/storage.py diff --git a/trains/community/filebrowser/1.1.10/questions.yaml b/trains/community/filebrowser/1.1.11/questions.yaml similarity index 100% rename from trains/community/filebrowser/1.1.10/questions.yaml rename to trains/community/filebrowser/1.1.11/questions.yaml diff --git a/trains/community/filebrowser/1.1.10/templates/docker-compose.yaml b/trains/community/filebrowser/1.1.11/templates/docker-compose.yaml similarity index 100% rename from trains/community/filebrowser/1.1.10/templates/docker-compose.yaml rename to trains/community/filebrowser/1.1.11/templates/docker-compose.yaml diff --git a/trains/community/filebrowser/1.1.10/templates/library/base_v1_1_3/__init__.py b/trains/community/filebrowser/1.1.11/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/filebrowser/1.1.10/templates/library/base_v1_1_3/__init__.py rename to trains/community/filebrowser/1.1.11/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/filebrowser/1.1.10/templates/library/base_v1_1_3/environment.py b/trains/community/filebrowser/1.1.11/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/filebrowser/1.1.10/templates/library/base_v1_1_3/environment.py rename to trains/community/filebrowser/1.1.11/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/filebrowser/1.1.11/templates/library/base_v1_1_4/healthchecks.py b/trains/community/filebrowser/1.1.11/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/community/filebrowser/1.1.11/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/filebrowser/1.1.10/templates/library/base_v1_1_3/mariadb.py b/trains/community/filebrowser/1.1.11/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/filebrowser/1.1.10/templates/library/base_v1_1_3/mariadb.py rename to trains/community/filebrowser/1.1.11/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/filebrowser/1.1.10/templates/library/base_v1_1_3/metadata.py b/trains/community/filebrowser/1.1.11/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/filebrowser/1.1.10/templates/library/base_v1_1_3/metadata.py rename to trains/community/filebrowser/1.1.11/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/filebrowser/1.1.10/templates/library/base_v1_1_3/network.py b/trains/community/filebrowser/1.1.11/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/filebrowser/1.1.10/templates/library/base_v1_1_3/network.py rename to trains/community/filebrowser/1.1.11/templates/library/base_v1_1_4/network.py diff --git a/trains/community/filebrowser/1.1.11/templates/library/base_v1_1_4/permissions.py b/trains/community/filebrowser/1.1.11/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/community/filebrowser/1.1.11/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/community/filebrowser/1.1.10/templates/library/base_v1_1_3/ports.py b/trains/community/filebrowser/1.1.11/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/filebrowser/1.1.10/templates/library/base_v1_1_3/ports.py rename to trains/community/filebrowser/1.1.11/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/filebrowser/1.1.10/templates/library/base_v1_1_3/postgres.py b/trains/community/filebrowser/1.1.11/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/filebrowser/1.1.10/templates/library/base_v1_1_3/postgres.py rename to trains/community/filebrowser/1.1.11/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/filebrowser/1.1.10/templates/library/base_v1_1_3/redis.py b/trains/community/filebrowser/1.1.11/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/filebrowser/1.1.10/templates/library/base_v1_1_3/redis.py rename to trains/community/filebrowser/1.1.11/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/filebrowser/1.1.10/templates/library/base_v1_1_3/resources.py b/trains/community/filebrowser/1.1.11/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/filebrowser/1.1.10/templates/library/base_v1_1_3/resources.py rename to trains/community/filebrowser/1.1.11/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/filebrowser/1.1.10/templates/library/base_v1_1_3/security.py b/trains/community/filebrowser/1.1.11/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/filebrowser/1.1.10/templates/library/base_v1_1_3/security.py rename to trains/community/filebrowser/1.1.11/templates/library/base_v1_1_4/security.py diff --git a/trains/community/filebrowser/1.1.10/templates/library/base_v1_1_3/storage.py b/trains/community/filebrowser/1.1.11/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/filebrowser/1.1.10/templates/library/base_v1_1_3/storage.py rename to trains/community/filebrowser/1.1.11/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/filebrowser/1.1.10/templates/library/base_v1_1_3/utils.py b/trains/community/filebrowser/1.1.11/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/filebrowser/1.1.10/templates/library/base_v1_1_3/utils.py rename to trains/community/filebrowser/1.1.11/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/filebrowser/1.1.10/templates/test_values/basic-values.yaml b/trains/community/filebrowser/1.1.11/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/filebrowser/1.1.10/templates/test_values/basic-values.yaml rename to trains/community/filebrowser/1.1.11/templates/test_values/basic-values.yaml diff --git a/trains/community/filebrowser/1.1.10/templates/test_values/https-values.yaml b/trains/community/filebrowser/1.1.11/templates/test_values/https-values.yaml similarity index 100% rename from trains/community/filebrowser/1.1.10/templates/test_values/https-values.yaml rename to trains/community/filebrowser/1.1.11/templates/test_values/https-values.yaml diff --git a/trains/community/firefly-iii/1.2.17/templates/library/base_v1_1_3/healthchecks.py b/trains/community/firefly-iii/1.2.17/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/community/firefly-iii/1.2.17/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/firefly-iii/1.2.17/templates/library/base_v1_1_3/permissions.py b/trains/community/firefly-iii/1.2.17/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/community/firefly-iii/1.2.17/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/community/firefly-iii/1.2.17/README.md b/trains/community/firefly-iii/1.2.18/README.md similarity index 100% rename from trains/community/firefly-iii/1.2.17/README.md rename to trains/community/firefly-iii/1.2.18/README.md diff --git a/trains/community/firefly-iii/1.2.17/app.yaml b/trains/community/firefly-iii/1.2.18/app.yaml similarity index 93% rename from trains/community/firefly-iii/1.2.17/app.yaml rename to trains/community/firefly-iii/1.2.18/app.yaml index 00df3bbb93..28c62c1be3 100644 --- a/trains/community/firefly-iii/1.2.17/app.yaml +++ b/trains/community/firefly-iii/1.2.18/app.yaml @@ -19,8 +19,8 @@ host_mounts: [] icon: https://media.sys.truenas.net/apps/firefly-iii/icons/icon.png keywords: - finance -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -57,4 +57,4 @@ sources: - https://github.com/firefly-iii/firefly-iii title: Firefly III train: community -version: 1.2.17 +version: 1.2.18 diff --git a/trains/community/firefly-iii/1.2.17/ix_values.yaml b/trains/community/firefly-iii/1.2.18/ix_values.yaml similarity index 100% rename from trains/community/firefly-iii/1.2.17/ix_values.yaml rename to trains/community/firefly-iii/1.2.18/ix_values.yaml diff --git a/trains/community/firefly-iii/1.2.17/migrations/migrate_from_kubernetes b/trains/community/firefly-iii/1.2.18/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/firefly-iii/1.2.17/migrations/migrate_from_kubernetes rename to trains/community/firefly-iii/1.2.18/migrations/migrate_from_kubernetes diff --git a/trains/community/firefly-iii/1.2.17/migrations/migration_helpers/__init__.py b/trains/community/firefly-iii/1.2.18/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/firefly-iii/1.2.17/migrations/migration_helpers/__init__.py rename to trains/community/firefly-iii/1.2.18/migrations/migration_helpers/__init__.py diff --git a/trains/community/firefly-iii/1.2.17/migrations/migration_helpers/cpu.py b/trains/community/firefly-iii/1.2.18/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/firefly-iii/1.2.17/migrations/migration_helpers/cpu.py rename to trains/community/firefly-iii/1.2.18/migrations/migration_helpers/cpu.py diff --git a/trains/community/firefly-iii/1.2.17/migrations/migration_helpers/dns_config.py b/trains/community/firefly-iii/1.2.18/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/firefly-iii/1.2.17/migrations/migration_helpers/dns_config.py rename to trains/community/firefly-iii/1.2.18/migrations/migration_helpers/dns_config.py diff --git a/trains/community/firefly-iii/1.2.17/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/firefly-iii/1.2.18/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/firefly-iii/1.2.17/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/firefly-iii/1.2.18/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/firefly-iii/1.2.17/migrations/migration_helpers/memory.py b/trains/community/firefly-iii/1.2.18/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/firefly-iii/1.2.17/migrations/migration_helpers/memory.py rename to trains/community/firefly-iii/1.2.18/migrations/migration_helpers/memory.py diff --git a/trains/community/firefly-iii/1.2.17/migrations/migration_helpers/resources.py b/trains/community/firefly-iii/1.2.18/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/firefly-iii/1.2.17/migrations/migration_helpers/resources.py rename to trains/community/firefly-iii/1.2.18/migrations/migration_helpers/resources.py diff --git a/trains/community/firefly-iii/1.2.17/migrations/migration_helpers/storage.py b/trains/community/firefly-iii/1.2.18/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/firefly-iii/1.2.17/migrations/migration_helpers/storage.py rename to trains/community/firefly-iii/1.2.18/migrations/migration_helpers/storage.py diff --git a/trains/community/firefly-iii/1.2.17/questions.yaml b/trains/community/firefly-iii/1.2.18/questions.yaml similarity index 100% rename from trains/community/firefly-iii/1.2.17/questions.yaml rename to trains/community/firefly-iii/1.2.18/questions.yaml diff --git a/trains/community/firefly-iii/1.2.17/templates/docker-compose.yaml b/trains/community/firefly-iii/1.2.18/templates/docker-compose.yaml similarity index 100% rename from trains/community/firefly-iii/1.2.17/templates/docker-compose.yaml rename to trains/community/firefly-iii/1.2.18/templates/docker-compose.yaml diff --git a/trains/community/firefly-iii/1.2.17/templates/library/base_v1_1_3/__init__.py b/trains/community/firefly-iii/1.2.18/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/firefly-iii/1.2.17/templates/library/base_v1_1_3/__init__.py rename to trains/community/firefly-iii/1.2.18/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/firefly-iii/1.2.17/templates/library/base_v1_1_3/environment.py b/trains/community/firefly-iii/1.2.18/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/firefly-iii/1.2.17/templates/library/base_v1_1_3/environment.py rename to trains/community/firefly-iii/1.2.18/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/firefly-iii/1.2.18/templates/library/base_v1_1_4/healthchecks.py b/trains/community/firefly-iii/1.2.18/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/community/firefly-iii/1.2.18/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/firefly-iii/1.2.17/templates/library/base_v1_1_3/mariadb.py b/trains/community/firefly-iii/1.2.18/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/firefly-iii/1.2.17/templates/library/base_v1_1_3/mariadb.py rename to trains/community/firefly-iii/1.2.18/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/firefly-iii/1.2.17/templates/library/base_v1_1_3/metadata.py b/trains/community/firefly-iii/1.2.18/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/firefly-iii/1.2.17/templates/library/base_v1_1_3/metadata.py rename to trains/community/firefly-iii/1.2.18/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/firefly-iii/1.2.17/templates/library/base_v1_1_3/network.py b/trains/community/firefly-iii/1.2.18/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/firefly-iii/1.2.17/templates/library/base_v1_1_3/network.py rename to trains/community/firefly-iii/1.2.18/templates/library/base_v1_1_4/network.py diff --git a/trains/community/firefly-iii/1.2.18/templates/library/base_v1_1_4/permissions.py b/trains/community/firefly-iii/1.2.18/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/community/firefly-iii/1.2.18/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/community/firefly-iii/1.2.17/templates/library/base_v1_1_3/ports.py b/trains/community/firefly-iii/1.2.18/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/firefly-iii/1.2.17/templates/library/base_v1_1_3/ports.py rename to trains/community/firefly-iii/1.2.18/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/firefly-iii/1.2.17/templates/library/base_v1_1_3/postgres.py b/trains/community/firefly-iii/1.2.18/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/firefly-iii/1.2.17/templates/library/base_v1_1_3/postgres.py rename to trains/community/firefly-iii/1.2.18/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/firefly-iii/1.2.17/templates/library/base_v1_1_3/redis.py b/trains/community/firefly-iii/1.2.18/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/firefly-iii/1.2.17/templates/library/base_v1_1_3/redis.py rename to trains/community/firefly-iii/1.2.18/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/firefly-iii/1.2.17/templates/library/base_v1_1_3/resources.py b/trains/community/firefly-iii/1.2.18/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/firefly-iii/1.2.17/templates/library/base_v1_1_3/resources.py rename to trains/community/firefly-iii/1.2.18/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/firefly-iii/1.2.17/templates/library/base_v1_1_3/security.py b/trains/community/firefly-iii/1.2.18/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/firefly-iii/1.2.17/templates/library/base_v1_1_3/security.py rename to trains/community/firefly-iii/1.2.18/templates/library/base_v1_1_4/security.py diff --git a/trains/community/firefly-iii/1.2.17/templates/library/base_v1_1_3/storage.py b/trains/community/firefly-iii/1.2.18/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/firefly-iii/1.2.17/templates/library/base_v1_1_3/storage.py rename to trains/community/firefly-iii/1.2.18/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/firefly-iii/1.2.17/templates/library/base_v1_1_3/utils.py b/trains/community/firefly-iii/1.2.18/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/firefly-iii/1.2.17/templates/library/base_v1_1_3/utils.py rename to trains/community/firefly-iii/1.2.18/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/firefly-iii/1.2.17/templates/test_values/basic-values.yaml b/trains/community/firefly-iii/1.2.18/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/firefly-iii/1.2.17/templates/test_values/basic-values.yaml rename to trains/community/firefly-iii/1.2.18/templates/test_values/basic-values.yaml diff --git a/trains/community/firefly-iii/1.2.17/templates/test_values/importer-values.yaml b/trains/community/firefly-iii/1.2.18/templates/test_values/importer-values.yaml similarity index 100% rename from trains/community/firefly-iii/1.2.17/templates/test_values/importer-values.yaml rename to trains/community/firefly-iii/1.2.18/templates/test_values/importer-values.yaml diff --git a/trains/community/flame/1.0.18/templates/library/base_v1_1_3/healthchecks.py b/trains/community/flame/1.0.18/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/community/flame/1.0.18/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/flame/1.0.18/templates/library/base_v1_1_3/permissions.py b/trains/community/flame/1.0.18/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/community/flame/1.0.18/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/community/flame/1.0.18/README.md b/trains/community/flame/1.0.19/README.md similarity index 100% rename from trains/community/flame/1.0.18/README.md rename to trains/community/flame/1.0.19/README.md diff --git a/trains/community/flame/1.0.18/app.yaml b/trains/community/flame/1.0.19/app.yaml similarity index 88% rename from trains/community/flame/1.0.18/app.yaml rename to trains/community/flame/1.0.19/app.yaml index ab38384d71..4230912971 100644 --- a/trains/community/flame/1.0.18/app.yaml +++ b/trains/community/flame/1.0.19/app.yaml @@ -14,8 +14,8 @@ host_mounts: [] icon: https://media.sys.truenas.net/apps/flame/icons/icon.png keywords: - startpage -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -34,4 +34,4 @@ sources: - https://github.com/pawelmalak/flame title: Flame train: community -version: 1.0.18 +version: 1.0.19 diff --git a/trains/community/flame/1.0.18/ix_values.yaml b/trains/community/flame/1.0.19/ix_values.yaml similarity index 100% rename from trains/community/flame/1.0.18/ix_values.yaml rename to trains/community/flame/1.0.19/ix_values.yaml diff --git a/trains/community/flame/1.0.18/migrations/migrate_from_kubernetes b/trains/community/flame/1.0.19/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/flame/1.0.18/migrations/migrate_from_kubernetes rename to trains/community/flame/1.0.19/migrations/migrate_from_kubernetes diff --git a/trains/community/flame/1.0.18/migrations/migration_helpers/__init__.py b/trains/community/flame/1.0.19/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/flame/1.0.18/migrations/migration_helpers/__init__.py rename to trains/community/flame/1.0.19/migrations/migration_helpers/__init__.py diff --git a/trains/community/flame/1.0.18/migrations/migration_helpers/cpu.py b/trains/community/flame/1.0.19/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/flame/1.0.18/migrations/migration_helpers/cpu.py rename to trains/community/flame/1.0.19/migrations/migration_helpers/cpu.py diff --git a/trains/community/flame/1.0.18/migrations/migration_helpers/dns_config.py b/trains/community/flame/1.0.19/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/flame/1.0.18/migrations/migration_helpers/dns_config.py rename to trains/community/flame/1.0.19/migrations/migration_helpers/dns_config.py diff --git a/trains/community/flame/1.0.18/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/flame/1.0.19/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/flame/1.0.18/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/flame/1.0.19/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/flame/1.0.18/migrations/migration_helpers/memory.py b/trains/community/flame/1.0.19/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/flame/1.0.18/migrations/migration_helpers/memory.py rename to trains/community/flame/1.0.19/migrations/migration_helpers/memory.py diff --git a/trains/community/flame/1.0.18/migrations/migration_helpers/resources.py b/trains/community/flame/1.0.19/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/flame/1.0.18/migrations/migration_helpers/resources.py rename to trains/community/flame/1.0.19/migrations/migration_helpers/resources.py diff --git a/trains/community/flame/1.0.18/migrations/migration_helpers/storage.py b/trains/community/flame/1.0.19/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/flame/1.0.18/migrations/migration_helpers/storage.py rename to trains/community/flame/1.0.19/migrations/migration_helpers/storage.py diff --git a/trains/community/flame/1.0.18/questions.yaml b/trains/community/flame/1.0.19/questions.yaml similarity index 100% rename from trains/community/flame/1.0.18/questions.yaml rename to trains/community/flame/1.0.19/questions.yaml diff --git a/trains/community/flame/1.0.18/templates/docker-compose.yaml b/trains/community/flame/1.0.19/templates/docker-compose.yaml similarity index 100% rename from trains/community/flame/1.0.18/templates/docker-compose.yaml rename to trains/community/flame/1.0.19/templates/docker-compose.yaml diff --git a/trains/community/flame/1.0.18/templates/library/base_v1_1_3/__init__.py b/trains/community/flame/1.0.19/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/flame/1.0.18/templates/library/base_v1_1_3/__init__.py rename to trains/community/flame/1.0.19/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/flame/1.0.18/templates/library/base_v1_1_3/environment.py b/trains/community/flame/1.0.19/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/flame/1.0.18/templates/library/base_v1_1_3/environment.py rename to trains/community/flame/1.0.19/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/flame/1.0.19/templates/library/base_v1_1_4/healthchecks.py b/trains/community/flame/1.0.19/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/community/flame/1.0.19/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/flame/1.0.18/templates/library/base_v1_1_3/mariadb.py b/trains/community/flame/1.0.19/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/flame/1.0.18/templates/library/base_v1_1_3/mariadb.py rename to trains/community/flame/1.0.19/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/flame/1.0.18/templates/library/base_v1_1_3/metadata.py b/trains/community/flame/1.0.19/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/flame/1.0.18/templates/library/base_v1_1_3/metadata.py rename to trains/community/flame/1.0.19/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/flame/1.0.18/templates/library/base_v1_1_3/network.py b/trains/community/flame/1.0.19/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/flame/1.0.18/templates/library/base_v1_1_3/network.py rename to trains/community/flame/1.0.19/templates/library/base_v1_1_4/network.py diff --git a/trains/community/flame/1.0.19/templates/library/base_v1_1_4/permissions.py b/trains/community/flame/1.0.19/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/community/flame/1.0.19/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/community/flame/1.0.18/templates/library/base_v1_1_3/ports.py b/trains/community/flame/1.0.19/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/flame/1.0.18/templates/library/base_v1_1_3/ports.py rename to trains/community/flame/1.0.19/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/flame/1.0.18/templates/library/base_v1_1_3/postgres.py b/trains/community/flame/1.0.19/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/flame/1.0.18/templates/library/base_v1_1_3/postgres.py rename to trains/community/flame/1.0.19/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/flame/1.0.18/templates/library/base_v1_1_3/redis.py b/trains/community/flame/1.0.19/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/flame/1.0.18/templates/library/base_v1_1_3/redis.py rename to trains/community/flame/1.0.19/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/flame/1.0.18/templates/library/base_v1_1_3/resources.py b/trains/community/flame/1.0.19/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/flame/1.0.18/templates/library/base_v1_1_3/resources.py rename to trains/community/flame/1.0.19/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/flame/1.0.18/templates/library/base_v1_1_3/security.py b/trains/community/flame/1.0.19/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/flame/1.0.18/templates/library/base_v1_1_3/security.py rename to trains/community/flame/1.0.19/templates/library/base_v1_1_4/security.py diff --git a/trains/community/flame/1.0.18/templates/library/base_v1_1_3/storage.py b/trains/community/flame/1.0.19/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/flame/1.0.18/templates/library/base_v1_1_3/storage.py rename to trains/community/flame/1.0.19/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/flame/1.0.18/templates/library/base_v1_1_3/utils.py b/trains/community/flame/1.0.19/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/flame/1.0.18/templates/library/base_v1_1_3/utils.py rename to trains/community/flame/1.0.19/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/flame/1.0.18/templates/test_values/basic-values.yaml b/trains/community/flame/1.0.19/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/flame/1.0.18/templates/test_values/basic-values.yaml rename to trains/community/flame/1.0.19/templates/test_values/basic-values.yaml diff --git a/trains/community/freshrss/1.1.13/templates/library/base_v1_1_3/healthchecks.py b/trains/community/freshrss/1.1.13/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/community/freshrss/1.1.13/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/freshrss/1.1.13/templates/library/base_v1_1_3/permissions.py b/trains/community/freshrss/1.1.13/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/community/freshrss/1.1.13/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/community/freshrss/1.1.13/README.md b/trains/community/freshrss/1.1.14/README.md similarity index 100% rename from trains/community/freshrss/1.1.13/README.md rename to trains/community/freshrss/1.1.14/README.md diff --git a/trains/community/freshrss/1.1.13/app.yaml b/trains/community/freshrss/1.1.14/app.yaml similarity index 90% rename from trains/community/freshrss/1.1.13/app.yaml rename to trains/community/freshrss/1.1.14/app.yaml index 2706dd523a..c353f99fe2 100644 --- a/trains/community/freshrss/1.1.13/app.yaml +++ b/trains/community/freshrss/1.1.14/app.yaml @@ -15,8 +15,8 @@ icon: https://media.sys.truenas.net/apps/freshrss/icons/icon.png keywords: - rss - news -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -41,4 +41,4 @@ sources: - https://hub.docker.com/r/freshrss/freshrss title: FreshRSS train: community -version: 1.1.13 +version: 1.1.14 diff --git a/trains/community/freshrss/1.1.13/ix_values.yaml b/trains/community/freshrss/1.1.14/ix_values.yaml similarity index 100% rename from trains/community/freshrss/1.1.13/ix_values.yaml rename to trains/community/freshrss/1.1.14/ix_values.yaml diff --git a/trains/community/freshrss/1.1.13/migrations/migrate_from_kubernetes b/trains/community/freshrss/1.1.14/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/freshrss/1.1.13/migrations/migrate_from_kubernetes rename to trains/community/freshrss/1.1.14/migrations/migrate_from_kubernetes diff --git a/trains/community/freshrss/1.1.13/migrations/migration_helpers/__init__.py b/trains/community/freshrss/1.1.14/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/freshrss/1.1.13/migrations/migration_helpers/__init__.py rename to trains/community/freshrss/1.1.14/migrations/migration_helpers/__init__.py diff --git a/trains/community/freshrss/1.1.13/migrations/migration_helpers/cpu.py b/trains/community/freshrss/1.1.14/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/freshrss/1.1.13/migrations/migration_helpers/cpu.py rename to trains/community/freshrss/1.1.14/migrations/migration_helpers/cpu.py diff --git a/trains/community/freshrss/1.1.13/migrations/migration_helpers/dns_config.py b/trains/community/freshrss/1.1.14/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/freshrss/1.1.13/migrations/migration_helpers/dns_config.py rename to trains/community/freshrss/1.1.14/migrations/migration_helpers/dns_config.py diff --git a/trains/community/freshrss/1.1.13/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/freshrss/1.1.14/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/freshrss/1.1.13/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/freshrss/1.1.14/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/freshrss/1.1.13/migrations/migration_helpers/memory.py b/trains/community/freshrss/1.1.14/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/freshrss/1.1.13/migrations/migration_helpers/memory.py rename to trains/community/freshrss/1.1.14/migrations/migration_helpers/memory.py diff --git a/trains/community/freshrss/1.1.13/migrations/migration_helpers/resources.py b/trains/community/freshrss/1.1.14/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/freshrss/1.1.13/migrations/migration_helpers/resources.py rename to trains/community/freshrss/1.1.14/migrations/migration_helpers/resources.py diff --git a/trains/community/freshrss/1.1.13/migrations/migration_helpers/storage.py b/trains/community/freshrss/1.1.14/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/freshrss/1.1.13/migrations/migration_helpers/storage.py rename to trains/community/freshrss/1.1.14/migrations/migration_helpers/storage.py diff --git a/trains/community/freshrss/1.1.13/questions.yaml b/trains/community/freshrss/1.1.14/questions.yaml similarity index 100% rename from trains/community/freshrss/1.1.13/questions.yaml rename to trains/community/freshrss/1.1.14/questions.yaml diff --git a/trains/community/freshrss/1.1.13/templates/docker-compose.yaml b/trains/community/freshrss/1.1.14/templates/docker-compose.yaml similarity index 100% rename from trains/community/freshrss/1.1.13/templates/docker-compose.yaml rename to trains/community/freshrss/1.1.14/templates/docker-compose.yaml diff --git a/trains/community/freshrss/1.1.13/templates/library/base_v1_1_3/__init__.py b/trains/community/freshrss/1.1.14/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/freshrss/1.1.13/templates/library/base_v1_1_3/__init__.py rename to trains/community/freshrss/1.1.14/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/freshrss/1.1.13/templates/library/base_v1_1_3/environment.py b/trains/community/freshrss/1.1.14/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/freshrss/1.1.13/templates/library/base_v1_1_3/environment.py rename to trains/community/freshrss/1.1.14/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/freshrss/1.1.14/templates/library/base_v1_1_4/healthchecks.py b/trains/community/freshrss/1.1.14/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/community/freshrss/1.1.14/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/freshrss/1.1.13/templates/library/base_v1_1_3/mariadb.py b/trains/community/freshrss/1.1.14/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/freshrss/1.1.13/templates/library/base_v1_1_3/mariadb.py rename to trains/community/freshrss/1.1.14/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/freshrss/1.1.13/templates/library/base_v1_1_3/metadata.py b/trains/community/freshrss/1.1.14/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/freshrss/1.1.13/templates/library/base_v1_1_3/metadata.py rename to trains/community/freshrss/1.1.14/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/freshrss/1.1.13/templates/library/base_v1_1_3/network.py b/trains/community/freshrss/1.1.14/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/freshrss/1.1.13/templates/library/base_v1_1_3/network.py rename to trains/community/freshrss/1.1.14/templates/library/base_v1_1_4/network.py diff --git a/trains/community/freshrss/1.1.14/templates/library/base_v1_1_4/permissions.py b/trains/community/freshrss/1.1.14/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/community/freshrss/1.1.14/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/community/freshrss/1.1.13/templates/library/base_v1_1_3/ports.py b/trains/community/freshrss/1.1.14/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/freshrss/1.1.13/templates/library/base_v1_1_3/ports.py rename to trains/community/freshrss/1.1.14/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/freshrss/1.1.13/templates/library/base_v1_1_3/postgres.py b/trains/community/freshrss/1.1.14/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/freshrss/1.1.13/templates/library/base_v1_1_3/postgres.py rename to trains/community/freshrss/1.1.14/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/freshrss/1.1.13/templates/library/base_v1_1_3/redis.py b/trains/community/freshrss/1.1.14/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/freshrss/1.1.13/templates/library/base_v1_1_3/redis.py rename to trains/community/freshrss/1.1.14/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/freshrss/1.1.13/templates/library/base_v1_1_3/resources.py b/trains/community/freshrss/1.1.14/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/freshrss/1.1.13/templates/library/base_v1_1_3/resources.py rename to trains/community/freshrss/1.1.14/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/freshrss/1.1.13/templates/library/base_v1_1_3/security.py b/trains/community/freshrss/1.1.14/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/freshrss/1.1.13/templates/library/base_v1_1_3/security.py rename to trains/community/freshrss/1.1.14/templates/library/base_v1_1_4/security.py diff --git a/trains/community/freshrss/1.1.13/templates/library/base_v1_1_3/storage.py b/trains/community/freshrss/1.1.14/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/freshrss/1.1.13/templates/library/base_v1_1_3/storage.py rename to trains/community/freshrss/1.1.14/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/freshrss/1.1.13/templates/library/base_v1_1_3/utils.py b/trains/community/freshrss/1.1.14/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/freshrss/1.1.13/templates/library/base_v1_1_3/utils.py rename to trains/community/freshrss/1.1.14/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/freshrss/1.1.13/templates/test_values/basic-values.yaml b/trains/community/freshrss/1.1.14/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/freshrss/1.1.13/templates/test_values/basic-values.yaml rename to trains/community/freshrss/1.1.14/templates/test_values/basic-values.yaml diff --git a/trains/community/frigate/1.0.8/templates/library/base_v1_1_3/healthchecks.py b/trains/community/frigate/1.0.8/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/community/frigate/1.0.8/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/frigate/1.0.8/templates/library/base_v1_1_3/permissions.py b/trains/community/frigate/1.0.8/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/community/frigate/1.0.8/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/community/frigate/1.0.8/README.md b/trains/community/frigate/1.0.9/README.md similarity index 100% rename from trains/community/frigate/1.0.8/README.md rename to trains/community/frigate/1.0.9/README.md diff --git a/trains/community/frigate/1.0.8/app.yaml b/trains/community/frigate/1.0.9/app.yaml similarity index 91% rename from trains/community/frigate/1.0.8/app.yaml rename to trains/community/frigate/1.0.9/app.yaml index adb619c15b..3d35b79283 100644 --- a/trains/community/frigate/1.0.8/app.yaml +++ b/trains/community/frigate/1.0.9/app.yaml @@ -19,8 +19,8 @@ icon: https://media.sys.truenas.net/apps/frigate/icons/icon.svg keywords: - camera - nvr -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -40,4 +40,4 @@ sources: - https://github.com/blakeblackshear/frigate title: Frigate train: community -version: 1.0.8 +version: 1.0.9 diff --git a/trains/community/frigate/1.0.8/ix_values.yaml b/trains/community/frigate/1.0.9/ix_values.yaml similarity index 100% rename from trains/community/frigate/1.0.8/ix_values.yaml rename to trains/community/frigate/1.0.9/ix_values.yaml diff --git a/trains/community/frigate/1.0.8/migrations/migrate_from_kubernetes b/trains/community/frigate/1.0.9/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/frigate/1.0.8/migrations/migrate_from_kubernetes rename to trains/community/frigate/1.0.9/migrations/migrate_from_kubernetes diff --git a/trains/community/frigate/1.0.8/migrations/migration_helpers/__init__.py b/trains/community/frigate/1.0.9/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/frigate/1.0.8/migrations/migration_helpers/__init__.py rename to trains/community/frigate/1.0.9/migrations/migration_helpers/__init__.py diff --git a/trains/community/frigate/1.0.8/migrations/migration_helpers/cpu.py b/trains/community/frigate/1.0.9/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/frigate/1.0.8/migrations/migration_helpers/cpu.py rename to trains/community/frigate/1.0.9/migrations/migration_helpers/cpu.py diff --git a/trains/community/frigate/1.0.8/migrations/migration_helpers/dns_config.py b/trains/community/frigate/1.0.9/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/frigate/1.0.8/migrations/migration_helpers/dns_config.py rename to trains/community/frigate/1.0.9/migrations/migration_helpers/dns_config.py diff --git a/trains/community/frigate/1.0.8/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/frigate/1.0.9/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/frigate/1.0.8/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/frigate/1.0.9/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/frigate/1.0.8/migrations/migration_helpers/memory.py b/trains/community/frigate/1.0.9/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/frigate/1.0.8/migrations/migration_helpers/memory.py rename to trains/community/frigate/1.0.9/migrations/migration_helpers/memory.py diff --git a/trains/community/frigate/1.0.8/migrations/migration_helpers/resources.py b/trains/community/frigate/1.0.9/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/frigate/1.0.8/migrations/migration_helpers/resources.py rename to trains/community/frigate/1.0.9/migrations/migration_helpers/resources.py diff --git a/trains/community/frigate/1.0.8/migrations/migration_helpers/storage.py b/trains/community/frigate/1.0.9/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/frigate/1.0.8/migrations/migration_helpers/storage.py rename to trains/community/frigate/1.0.9/migrations/migration_helpers/storage.py diff --git a/trains/community/frigate/1.0.8/questions.yaml b/trains/community/frigate/1.0.9/questions.yaml similarity index 100% rename from trains/community/frigate/1.0.8/questions.yaml rename to trains/community/frigate/1.0.9/questions.yaml diff --git a/trains/community/frigate/1.0.8/templates/docker-compose.yaml b/trains/community/frigate/1.0.9/templates/docker-compose.yaml similarity index 100% rename from trains/community/frigate/1.0.8/templates/docker-compose.yaml rename to trains/community/frigate/1.0.9/templates/docker-compose.yaml diff --git a/trains/community/frigate/1.0.8/templates/library/base_v1_1_3/__init__.py b/trains/community/frigate/1.0.9/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/frigate/1.0.8/templates/library/base_v1_1_3/__init__.py rename to trains/community/frigate/1.0.9/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/frigate/1.0.8/templates/library/base_v1_1_3/environment.py b/trains/community/frigate/1.0.9/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/frigate/1.0.8/templates/library/base_v1_1_3/environment.py rename to trains/community/frigate/1.0.9/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/frigate/1.0.9/templates/library/base_v1_1_4/healthchecks.py b/trains/community/frigate/1.0.9/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/community/frigate/1.0.9/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/frigate/1.0.8/templates/library/base_v1_1_3/mariadb.py b/trains/community/frigate/1.0.9/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/frigate/1.0.8/templates/library/base_v1_1_3/mariadb.py rename to trains/community/frigate/1.0.9/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/frigate/1.0.8/templates/library/base_v1_1_3/metadata.py b/trains/community/frigate/1.0.9/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/frigate/1.0.8/templates/library/base_v1_1_3/metadata.py rename to trains/community/frigate/1.0.9/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/frigate/1.0.8/templates/library/base_v1_1_3/network.py b/trains/community/frigate/1.0.9/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/frigate/1.0.8/templates/library/base_v1_1_3/network.py rename to trains/community/frigate/1.0.9/templates/library/base_v1_1_4/network.py diff --git a/trains/community/frigate/1.0.9/templates/library/base_v1_1_4/permissions.py b/trains/community/frigate/1.0.9/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/community/frigate/1.0.9/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/community/frigate/1.0.8/templates/library/base_v1_1_3/ports.py b/trains/community/frigate/1.0.9/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/frigate/1.0.8/templates/library/base_v1_1_3/ports.py rename to trains/community/frigate/1.0.9/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/frigate/1.0.8/templates/library/base_v1_1_3/postgres.py b/trains/community/frigate/1.0.9/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/frigate/1.0.8/templates/library/base_v1_1_3/postgres.py rename to trains/community/frigate/1.0.9/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/frigate/1.0.8/templates/library/base_v1_1_3/redis.py b/trains/community/frigate/1.0.9/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/frigate/1.0.8/templates/library/base_v1_1_3/redis.py rename to trains/community/frigate/1.0.9/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/frigate/1.0.8/templates/library/base_v1_1_3/resources.py b/trains/community/frigate/1.0.9/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/frigate/1.0.8/templates/library/base_v1_1_3/resources.py rename to trains/community/frigate/1.0.9/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/frigate/1.0.8/templates/library/base_v1_1_3/security.py b/trains/community/frigate/1.0.9/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/frigate/1.0.8/templates/library/base_v1_1_3/security.py rename to trains/community/frigate/1.0.9/templates/library/base_v1_1_4/security.py diff --git a/trains/community/frigate/1.0.8/templates/library/base_v1_1_3/storage.py b/trains/community/frigate/1.0.9/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/frigate/1.0.8/templates/library/base_v1_1_3/storage.py rename to trains/community/frigate/1.0.9/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/frigate/1.0.8/templates/library/base_v1_1_3/utils.py b/trains/community/frigate/1.0.9/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/frigate/1.0.8/templates/library/base_v1_1_3/utils.py rename to trains/community/frigate/1.0.9/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/frigate/1.0.8/templates/test_values/basic-values.yaml b/trains/community/frigate/1.0.9/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/frigate/1.0.8/templates/test_values/basic-values.yaml rename to trains/community/frigate/1.0.9/templates/test_values/basic-values.yaml diff --git a/trains/community/fscrawler/1.0.16/templates/library/base_v1_1_3/healthchecks.py b/trains/community/fscrawler/1.0.16/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/community/fscrawler/1.0.16/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/fscrawler/1.0.16/templates/library/base_v1_1_3/permissions.py b/trains/community/fscrawler/1.0.16/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/community/fscrawler/1.0.16/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/community/fscrawler/1.0.16/README.md b/trains/community/fscrawler/1.0.17/README.md similarity index 100% rename from trains/community/fscrawler/1.0.16/README.md rename to trains/community/fscrawler/1.0.17/README.md diff --git a/trains/community/fscrawler/1.0.16/app.yaml b/trains/community/fscrawler/1.0.17/app.yaml similarity index 86% rename from trains/community/fscrawler/1.0.16/app.yaml rename to trains/community/fscrawler/1.0.17/app.yaml index c2983b6fb4..d8c9ad3d68 100644 --- a/trains/community/fscrawler/1.0.16/app.yaml +++ b/trains/community/fscrawler/1.0.17/app.yaml @@ -10,8 +10,8 @@ icon: https://media.sys.truenas.net/apps/fscrawler/icons/icon.svg keywords: - index - crawler -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -30,4 +30,4 @@ sources: - https://fscrawler.readthedocs.io/ title: FSCrawler train: community -version: 1.0.16 +version: 1.0.17 diff --git a/trains/community/fscrawler/1.0.16/ix_values.yaml b/trains/community/fscrawler/1.0.17/ix_values.yaml similarity index 100% rename from trains/community/fscrawler/1.0.16/ix_values.yaml rename to trains/community/fscrawler/1.0.17/ix_values.yaml diff --git a/trains/community/fscrawler/1.0.16/migrations/migrate_from_kubernetes b/trains/community/fscrawler/1.0.17/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/fscrawler/1.0.16/migrations/migrate_from_kubernetes rename to trains/community/fscrawler/1.0.17/migrations/migrate_from_kubernetes diff --git a/trains/community/fscrawler/1.0.16/migrations/migration_helpers/__init__.py b/trains/community/fscrawler/1.0.17/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/fscrawler/1.0.16/migrations/migration_helpers/__init__.py rename to trains/community/fscrawler/1.0.17/migrations/migration_helpers/__init__.py diff --git a/trains/community/fscrawler/1.0.16/migrations/migration_helpers/cpu.py b/trains/community/fscrawler/1.0.17/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/fscrawler/1.0.16/migrations/migration_helpers/cpu.py rename to trains/community/fscrawler/1.0.17/migrations/migration_helpers/cpu.py diff --git a/trains/community/fscrawler/1.0.16/migrations/migration_helpers/dns_config.py b/trains/community/fscrawler/1.0.17/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/fscrawler/1.0.16/migrations/migration_helpers/dns_config.py rename to trains/community/fscrawler/1.0.17/migrations/migration_helpers/dns_config.py diff --git a/trains/community/fscrawler/1.0.16/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/fscrawler/1.0.17/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/fscrawler/1.0.16/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/fscrawler/1.0.17/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/fscrawler/1.0.16/migrations/migration_helpers/memory.py b/trains/community/fscrawler/1.0.17/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/fscrawler/1.0.16/migrations/migration_helpers/memory.py rename to trains/community/fscrawler/1.0.17/migrations/migration_helpers/memory.py diff --git a/trains/community/fscrawler/1.0.16/migrations/migration_helpers/resources.py b/trains/community/fscrawler/1.0.17/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/fscrawler/1.0.16/migrations/migration_helpers/resources.py rename to trains/community/fscrawler/1.0.17/migrations/migration_helpers/resources.py diff --git a/trains/community/fscrawler/1.0.16/migrations/migration_helpers/storage.py b/trains/community/fscrawler/1.0.17/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/fscrawler/1.0.16/migrations/migration_helpers/storage.py rename to trains/community/fscrawler/1.0.17/migrations/migration_helpers/storage.py diff --git a/trains/community/fscrawler/1.0.16/questions.yaml b/trains/community/fscrawler/1.0.17/questions.yaml similarity index 100% rename from trains/community/fscrawler/1.0.16/questions.yaml rename to trains/community/fscrawler/1.0.17/questions.yaml diff --git a/trains/community/fscrawler/1.0.16/templates/docker-compose.yaml b/trains/community/fscrawler/1.0.17/templates/docker-compose.yaml similarity index 100% rename from trains/community/fscrawler/1.0.16/templates/docker-compose.yaml rename to trains/community/fscrawler/1.0.17/templates/docker-compose.yaml diff --git a/trains/community/fscrawler/1.0.16/templates/library/base_v1_1_3/__init__.py b/trains/community/fscrawler/1.0.17/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/fscrawler/1.0.16/templates/library/base_v1_1_3/__init__.py rename to trains/community/fscrawler/1.0.17/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/fscrawler/1.0.16/templates/library/base_v1_1_3/environment.py b/trains/community/fscrawler/1.0.17/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/fscrawler/1.0.16/templates/library/base_v1_1_3/environment.py rename to trains/community/fscrawler/1.0.17/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/fscrawler/1.0.17/templates/library/base_v1_1_4/healthchecks.py b/trains/community/fscrawler/1.0.17/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/community/fscrawler/1.0.17/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/fscrawler/1.0.16/templates/library/base_v1_1_3/mariadb.py b/trains/community/fscrawler/1.0.17/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/fscrawler/1.0.16/templates/library/base_v1_1_3/mariadb.py rename to trains/community/fscrawler/1.0.17/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/fscrawler/1.0.16/templates/library/base_v1_1_3/metadata.py b/trains/community/fscrawler/1.0.17/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/fscrawler/1.0.16/templates/library/base_v1_1_3/metadata.py rename to trains/community/fscrawler/1.0.17/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/fscrawler/1.0.16/templates/library/base_v1_1_3/network.py b/trains/community/fscrawler/1.0.17/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/fscrawler/1.0.16/templates/library/base_v1_1_3/network.py rename to trains/community/fscrawler/1.0.17/templates/library/base_v1_1_4/network.py diff --git a/trains/community/fscrawler/1.0.17/templates/library/base_v1_1_4/permissions.py b/trains/community/fscrawler/1.0.17/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/community/fscrawler/1.0.17/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/community/fscrawler/1.0.16/templates/library/base_v1_1_3/ports.py b/trains/community/fscrawler/1.0.17/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/fscrawler/1.0.16/templates/library/base_v1_1_3/ports.py rename to trains/community/fscrawler/1.0.17/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/fscrawler/1.0.16/templates/library/base_v1_1_3/postgres.py b/trains/community/fscrawler/1.0.17/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/fscrawler/1.0.16/templates/library/base_v1_1_3/postgres.py rename to trains/community/fscrawler/1.0.17/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/fscrawler/1.0.16/templates/library/base_v1_1_3/redis.py b/trains/community/fscrawler/1.0.17/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/fscrawler/1.0.16/templates/library/base_v1_1_3/redis.py rename to trains/community/fscrawler/1.0.17/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/fscrawler/1.0.16/templates/library/base_v1_1_3/resources.py b/trains/community/fscrawler/1.0.17/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/fscrawler/1.0.16/templates/library/base_v1_1_3/resources.py rename to trains/community/fscrawler/1.0.17/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/fscrawler/1.0.16/templates/library/base_v1_1_3/security.py b/trains/community/fscrawler/1.0.17/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/fscrawler/1.0.16/templates/library/base_v1_1_3/security.py rename to trains/community/fscrawler/1.0.17/templates/library/base_v1_1_4/security.py diff --git a/trains/community/fscrawler/1.0.16/templates/library/base_v1_1_3/storage.py b/trains/community/fscrawler/1.0.17/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/fscrawler/1.0.16/templates/library/base_v1_1_3/storage.py rename to trains/community/fscrawler/1.0.17/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/fscrawler/1.0.16/templates/library/base_v1_1_3/utils.py b/trains/community/fscrawler/1.0.17/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/fscrawler/1.0.16/templates/library/base_v1_1_3/utils.py rename to trains/community/fscrawler/1.0.17/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/fscrawler/1.0.16/templates/test_values/basic-values.yaml b/trains/community/fscrawler/1.0.17/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/fscrawler/1.0.16/templates/test_values/basic-values.yaml rename to trains/community/fscrawler/1.0.17/templates/test_values/basic-values.yaml diff --git a/trains/community/fscrawler/1.0.16/templates/test_values/job-values.yaml b/trains/community/fscrawler/1.0.17/templates/test_values/job-values.yaml similarity index 100% rename from trains/community/fscrawler/1.0.16/templates/test_values/job-values.yaml rename to trains/community/fscrawler/1.0.17/templates/test_values/job-values.yaml diff --git a/trains/community/fscrawler/1.0.16/templates/test_values/no-ocr-values.yaml b/trains/community/fscrawler/1.0.17/templates/test_values/no-ocr-values.yaml similarity index 100% rename from trains/community/fscrawler/1.0.16/templates/test_values/no-ocr-values.yaml rename to trains/community/fscrawler/1.0.17/templates/test_values/no-ocr-values.yaml diff --git a/trains/community/fscrawler/1.0.16/templates/test_values/rest-values.yaml b/trains/community/fscrawler/1.0.17/templates/test_values/rest-values.yaml similarity index 100% rename from trains/community/fscrawler/1.0.16/templates/test_values/rest-values.yaml rename to trains/community/fscrawler/1.0.17/templates/test_values/rest-values.yaml diff --git a/trains/community/gitea/1.0.11/templates/library/base_v1_1_3/healthchecks.py b/trains/community/gitea/1.0.11/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/community/gitea/1.0.11/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/gitea/1.0.11/templates/library/base_v1_1_3/permissions.py b/trains/community/gitea/1.0.11/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/community/gitea/1.0.11/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/community/gitea/1.0.11/README.md b/trains/community/gitea/1.0.12/README.md similarity index 100% rename from trains/community/gitea/1.0.11/README.md rename to trains/community/gitea/1.0.12/README.md diff --git a/trains/community/gitea/1.0.11/app.yaml b/trains/community/gitea/1.0.12/app.yaml similarity index 88% rename from trains/community/gitea/1.0.11/app.yaml rename to trains/community/gitea/1.0.12/app.yaml index 728f82649f..8a4d27438a 100644 --- a/trains/community/gitea/1.0.11/app.yaml +++ b/trains/community/gitea/1.0.12/app.yaml @@ -10,8 +10,8 @@ keywords: - git - gitea - source control -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -33,4 +33,4 @@ sources: - https://docs.gitea.io/en-us/install-with-docker-rootless title: Gitea train: community -version: 1.0.11 +version: 1.0.12 diff --git a/trains/community/gitea/1.0.11/ix_values.yaml b/trains/community/gitea/1.0.12/ix_values.yaml similarity index 100% rename from trains/community/gitea/1.0.11/ix_values.yaml rename to trains/community/gitea/1.0.12/ix_values.yaml diff --git a/trains/community/gitea/1.0.11/migrations/migrate_from_kubernetes b/trains/community/gitea/1.0.12/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/gitea/1.0.11/migrations/migrate_from_kubernetes rename to trains/community/gitea/1.0.12/migrations/migrate_from_kubernetes diff --git a/trains/community/gitea/1.0.11/migrations/migration_helpers/__init__.py b/trains/community/gitea/1.0.12/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/gitea/1.0.11/migrations/migration_helpers/__init__.py rename to trains/community/gitea/1.0.12/migrations/migration_helpers/__init__.py diff --git a/trains/community/gitea/1.0.11/migrations/migration_helpers/cpu.py b/trains/community/gitea/1.0.12/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/gitea/1.0.11/migrations/migration_helpers/cpu.py rename to trains/community/gitea/1.0.12/migrations/migration_helpers/cpu.py diff --git a/trains/community/gitea/1.0.11/migrations/migration_helpers/dns_config.py b/trains/community/gitea/1.0.12/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/gitea/1.0.11/migrations/migration_helpers/dns_config.py rename to trains/community/gitea/1.0.12/migrations/migration_helpers/dns_config.py diff --git a/trains/community/gitea/1.0.11/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/gitea/1.0.12/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/gitea/1.0.11/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/gitea/1.0.12/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/gitea/1.0.11/migrations/migration_helpers/memory.py b/trains/community/gitea/1.0.12/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/gitea/1.0.11/migrations/migration_helpers/memory.py rename to trains/community/gitea/1.0.12/migrations/migration_helpers/memory.py diff --git a/trains/community/gitea/1.0.11/migrations/migration_helpers/resources.py b/trains/community/gitea/1.0.12/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/gitea/1.0.11/migrations/migration_helpers/resources.py rename to trains/community/gitea/1.0.12/migrations/migration_helpers/resources.py diff --git a/trains/community/gitea/1.0.11/migrations/migration_helpers/storage.py b/trains/community/gitea/1.0.12/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/gitea/1.0.11/migrations/migration_helpers/storage.py rename to trains/community/gitea/1.0.12/migrations/migration_helpers/storage.py diff --git a/trains/community/gitea/1.0.11/questions.yaml b/trains/community/gitea/1.0.12/questions.yaml similarity index 100% rename from trains/community/gitea/1.0.11/questions.yaml rename to trains/community/gitea/1.0.12/questions.yaml diff --git a/trains/community/gitea/1.0.11/templates/docker-compose.yaml b/trains/community/gitea/1.0.12/templates/docker-compose.yaml similarity index 100% rename from trains/community/gitea/1.0.11/templates/docker-compose.yaml rename to trains/community/gitea/1.0.12/templates/docker-compose.yaml diff --git a/trains/community/gitea/1.0.11/templates/library/base_v1_1_3/__init__.py b/trains/community/gitea/1.0.12/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/gitea/1.0.11/templates/library/base_v1_1_3/__init__.py rename to trains/community/gitea/1.0.12/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/gitea/1.0.11/templates/library/base_v1_1_3/environment.py b/trains/community/gitea/1.0.12/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/gitea/1.0.11/templates/library/base_v1_1_3/environment.py rename to trains/community/gitea/1.0.12/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/gitea/1.0.12/templates/library/base_v1_1_4/healthchecks.py b/trains/community/gitea/1.0.12/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/community/gitea/1.0.12/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/gitea/1.0.11/templates/library/base_v1_1_3/mariadb.py b/trains/community/gitea/1.0.12/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/gitea/1.0.11/templates/library/base_v1_1_3/mariadb.py rename to trains/community/gitea/1.0.12/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/gitea/1.0.11/templates/library/base_v1_1_3/metadata.py b/trains/community/gitea/1.0.12/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/gitea/1.0.11/templates/library/base_v1_1_3/metadata.py rename to trains/community/gitea/1.0.12/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/gitea/1.0.11/templates/library/base_v1_1_3/network.py b/trains/community/gitea/1.0.12/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/gitea/1.0.11/templates/library/base_v1_1_3/network.py rename to trains/community/gitea/1.0.12/templates/library/base_v1_1_4/network.py diff --git a/trains/community/gitea/1.0.12/templates/library/base_v1_1_4/permissions.py b/trains/community/gitea/1.0.12/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/community/gitea/1.0.12/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/community/gitea/1.0.11/templates/library/base_v1_1_3/ports.py b/trains/community/gitea/1.0.12/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/gitea/1.0.11/templates/library/base_v1_1_3/ports.py rename to trains/community/gitea/1.0.12/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/gitea/1.0.11/templates/library/base_v1_1_3/postgres.py b/trains/community/gitea/1.0.12/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/gitea/1.0.11/templates/library/base_v1_1_3/postgres.py rename to trains/community/gitea/1.0.12/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/gitea/1.0.11/templates/library/base_v1_1_3/redis.py b/trains/community/gitea/1.0.12/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/gitea/1.0.11/templates/library/base_v1_1_3/redis.py rename to trains/community/gitea/1.0.12/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/gitea/1.0.11/templates/library/base_v1_1_3/resources.py b/trains/community/gitea/1.0.12/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/gitea/1.0.11/templates/library/base_v1_1_3/resources.py rename to trains/community/gitea/1.0.12/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/gitea/1.0.11/templates/library/base_v1_1_3/security.py b/trains/community/gitea/1.0.12/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/gitea/1.0.11/templates/library/base_v1_1_3/security.py rename to trains/community/gitea/1.0.12/templates/library/base_v1_1_4/security.py diff --git a/trains/community/gitea/1.0.11/templates/library/base_v1_1_3/storage.py b/trains/community/gitea/1.0.12/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/gitea/1.0.11/templates/library/base_v1_1_3/storage.py rename to trains/community/gitea/1.0.12/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/gitea/1.0.11/templates/library/base_v1_1_3/utils.py b/trains/community/gitea/1.0.12/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/gitea/1.0.11/templates/library/base_v1_1_3/utils.py rename to trains/community/gitea/1.0.12/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/gitea/1.0.11/templates/test_values/basic-values.yaml b/trains/community/gitea/1.0.12/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/gitea/1.0.11/templates/test_values/basic-values.yaml rename to trains/community/gitea/1.0.12/templates/test_values/basic-values.yaml diff --git a/trains/community/gitea/1.0.11/templates/test_values/https-values.yaml b/trains/community/gitea/1.0.12/templates/test_values/https-values.yaml similarity index 100% rename from trains/community/gitea/1.0.11/templates/test_values/https-values.yaml rename to trains/community/gitea/1.0.12/templates/test_values/https-values.yaml diff --git a/trains/community/grafana/1.1.11/templates/library/base_v1_1_3/healthchecks.py b/trains/community/grafana/1.1.11/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/community/grafana/1.1.11/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/grafana/1.1.11/templates/library/base_v1_1_3/permissions.py b/trains/community/grafana/1.1.11/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/community/grafana/1.1.11/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/community/grafana/1.1.11/README.md b/trains/community/grafana/1.1.12/README.md similarity index 100% rename from trains/community/grafana/1.1.11/README.md rename to trains/community/grafana/1.1.12/README.md diff --git a/trains/community/grafana/1.1.11/app.yaml b/trains/community/grafana/1.1.12/app.yaml similarity index 88% rename from trains/community/grafana/1.1.11/app.yaml rename to trains/community/grafana/1.1.12/app.yaml index 6edbc2a7cc..5ab05d1991 100644 --- a/trains/community/grafana/1.1.11/app.yaml +++ b/trains/community/grafana/1.1.12/app.yaml @@ -12,8 +12,8 @@ keywords: - monitoring - metrics - dashboards -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -34,4 +34,4 @@ sources: - https://github.com/grafana title: Grafana train: community -version: 1.1.11 +version: 1.1.12 diff --git a/trains/community/grafana/1.1.11/ix_values.yaml b/trains/community/grafana/1.1.12/ix_values.yaml similarity index 100% rename from trains/community/grafana/1.1.11/ix_values.yaml rename to trains/community/grafana/1.1.12/ix_values.yaml diff --git a/trains/community/grafana/1.1.11/migrations/migrate_from_kubernetes b/trains/community/grafana/1.1.12/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/grafana/1.1.11/migrations/migrate_from_kubernetes rename to trains/community/grafana/1.1.12/migrations/migrate_from_kubernetes diff --git a/trains/community/grafana/1.1.11/migrations/migration_helpers/__init__.py b/trains/community/grafana/1.1.12/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/grafana/1.1.11/migrations/migration_helpers/__init__.py rename to trains/community/grafana/1.1.12/migrations/migration_helpers/__init__.py diff --git a/trains/community/grafana/1.1.11/migrations/migration_helpers/cpu.py b/trains/community/grafana/1.1.12/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/grafana/1.1.11/migrations/migration_helpers/cpu.py rename to trains/community/grafana/1.1.12/migrations/migration_helpers/cpu.py diff --git a/trains/community/grafana/1.1.11/migrations/migration_helpers/dns_config.py b/trains/community/grafana/1.1.12/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/grafana/1.1.11/migrations/migration_helpers/dns_config.py rename to trains/community/grafana/1.1.12/migrations/migration_helpers/dns_config.py diff --git a/trains/community/grafana/1.1.11/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/grafana/1.1.12/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/grafana/1.1.11/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/grafana/1.1.12/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/grafana/1.1.11/migrations/migration_helpers/memory.py b/trains/community/grafana/1.1.12/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/grafana/1.1.11/migrations/migration_helpers/memory.py rename to trains/community/grafana/1.1.12/migrations/migration_helpers/memory.py diff --git a/trains/community/grafana/1.1.11/migrations/migration_helpers/resources.py b/trains/community/grafana/1.1.12/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/grafana/1.1.11/migrations/migration_helpers/resources.py rename to trains/community/grafana/1.1.12/migrations/migration_helpers/resources.py diff --git a/trains/community/grafana/1.1.11/migrations/migration_helpers/storage.py b/trains/community/grafana/1.1.12/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/grafana/1.1.11/migrations/migration_helpers/storage.py rename to trains/community/grafana/1.1.12/migrations/migration_helpers/storage.py diff --git a/trains/community/grafana/1.1.11/questions.yaml b/trains/community/grafana/1.1.12/questions.yaml similarity index 100% rename from trains/community/grafana/1.1.11/questions.yaml rename to trains/community/grafana/1.1.12/questions.yaml diff --git a/trains/community/grafana/1.1.11/templates/docker-compose.yaml b/trains/community/grafana/1.1.12/templates/docker-compose.yaml similarity index 100% rename from trains/community/grafana/1.1.11/templates/docker-compose.yaml rename to trains/community/grafana/1.1.12/templates/docker-compose.yaml diff --git a/trains/community/grafana/1.1.11/templates/library/base_v1_1_3/__init__.py b/trains/community/grafana/1.1.12/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/grafana/1.1.11/templates/library/base_v1_1_3/__init__.py rename to trains/community/grafana/1.1.12/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/grafana/1.1.11/templates/library/base_v1_1_3/environment.py b/trains/community/grafana/1.1.12/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/grafana/1.1.11/templates/library/base_v1_1_3/environment.py rename to trains/community/grafana/1.1.12/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/grafana/1.1.12/templates/library/base_v1_1_4/healthchecks.py b/trains/community/grafana/1.1.12/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/community/grafana/1.1.12/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/grafana/1.1.11/templates/library/base_v1_1_3/mariadb.py b/trains/community/grafana/1.1.12/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/grafana/1.1.11/templates/library/base_v1_1_3/mariadb.py rename to trains/community/grafana/1.1.12/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/grafana/1.1.11/templates/library/base_v1_1_3/metadata.py b/trains/community/grafana/1.1.12/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/grafana/1.1.11/templates/library/base_v1_1_3/metadata.py rename to trains/community/grafana/1.1.12/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/grafana/1.1.11/templates/library/base_v1_1_3/network.py b/trains/community/grafana/1.1.12/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/grafana/1.1.11/templates/library/base_v1_1_3/network.py rename to trains/community/grafana/1.1.12/templates/library/base_v1_1_4/network.py diff --git a/trains/community/grafana/1.1.12/templates/library/base_v1_1_4/permissions.py b/trains/community/grafana/1.1.12/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/community/grafana/1.1.12/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/community/grafana/1.1.11/templates/library/base_v1_1_3/ports.py b/trains/community/grafana/1.1.12/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/grafana/1.1.11/templates/library/base_v1_1_3/ports.py rename to trains/community/grafana/1.1.12/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/grafana/1.1.11/templates/library/base_v1_1_3/postgres.py b/trains/community/grafana/1.1.12/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/grafana/1.1.11/templates/library/base_v1_1_3/postgres.py rename to trains/community/grafana/1.1.12/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/grafana/1.1.11/templates/library/base_v1_1_3/redis.py b/trains/community/grafana/1.1.12/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/grafana/1.1.11/templates/library/base_v1_1_3/redis.py rename to trains/community/grafana/1.1.12/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/grafana/1.1.11/templates/library/base_v1_1_3/resources.py b/trains/community/grafana/1.1.12/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/grafana/1.1.11/templates/library/base_v1_1_3/resources.py rename to trains/community/grafana/1.1.12/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/grafana/1.1.11/templates/library/base_v1_1_3/security.py b/trains/community/grafana/1.1.12/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/grafana/1.1.11/templates/library/base_v1_1_3/security.py rename to trains/community/grafana/1.1.12/templates/library/base_v1_1_4/security.py diff --git a/trains/community/grafana/1.1.11/templates/library/base_v1_1_3/storage.py b/trains/community/grafana/1.1.12/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/grafana/1.1.11/templates/library/base_v1_1_3/storage.py rename to trains/community/grafana/1.1.12/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/grafana/1.1.11/templates/library/base_v1_1_3/utils.py b/trains/community/grafana/1.1.12/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/grafana/1.1.11/templates/library/base_v1_1_3/utils.py rename to trains/community/grafana/1.1.12/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/grafana/1.1.11/templates/test_values/basic-values.yaml b/trains/community/grafana/1.1.12/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/grafana/1.1.11/templates/test_values/basic-values.yaml rename to trains/community/grafana/1.1.12/templates/test_values/basic-values.yaml diff --git a/trains/community/grafana/1.1.11/templates/test_values/https-values.yaml b/trains/community/grafana/1.1.12/templates/test_values/https-values.yaml similarity index 100% rename from trains/community/grafana/1.1.11/templates/test_values/https-values.yaml rename to trains/community/grafana/1.1.12/templates/test_values/https-values.yaml diff --git a/trains/community/handbrake/2.0.10/templates/library/base_v1_1_3/healthchecks.py b/trains/community/handbrake/2.0.10/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/community/handbrake/2.0.10/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/handbrake/2.0.10/templates/library/base_v1_1_3/permissions.py b/trains/community/handbrake/2.0.10/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/community/handbrake/2.0.10/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/community/handbrake/2.0.10/README.md b/trains/community/handbrake/2.0.11/README.md similarity index 100% rename from trains/community/handbrake/2.0.10/README.md rename to trains/community/handbrake/2.0.11/README.md diff --git a/trains/community/handbrake/2.0.10/app.yaml b/trains/community/handbrake/2.0.11/app.yaml similarity index 92% rename from trains/community/handbrake/2.0.10/app.yaml rename to trains/community/handbrake/2.0.11/app.yaml index bb744bb970..cb50af49fe 100644 --- a/trains/community/handbrake/2.0.10/app.yaml +++ b/trains/community/handbrake/2.0.11/app.yaml @@ -28,8 +28,8 @@ keywords: - media - video - transcoder -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -47,4 +47,4 @@ sources: - https://hub.docker.com/r/jlesage/handbrake title: Handbrake train: community -version: 2.0.10 +version: 2.0.11 diff --git a/trains/community/handbrake/2.0.10/ix_values.yaml b/trains/community/handbrake/2.0.11/ix_values.yaml similarity index 100% rename from trains/community/handbrake/2.0.10/ix_values.yaml rename to trains/community/handbrake/2.0.11/ix_values.yaml diff --git a/trains/community/handbrake/2.0.10/migrations/migrate_from_kubernetes b/trains/community/handbrake/2.0.11/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/handbrake/2.0.10/migrations/migrate_from_kubernetes rename to trains/community/handbrake/2.0.11/migrations/migrate_from_kubernetes diff --git a/trains/community/handbrake/2.0.10/migrations/migration_helpers/__init__.py b/trains/community/handbrake/2.0.11/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/handbrake/2.0.10/migrations/migration_helpers/__init__.py rename to trains/community/handbrake/2.0.11/migrations/migration_helpers/__init__.py diff --git a/trains/community/handbrake/2.0.10/migrations/migration_helpers/cpu.py b/trains/community/handbrake/2.0.11/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/handbrake/2.0.10/migrations/migration_helpers/cpu.py rename to trains/community/handbrake/2.0.11/migrations/migration_helpers/cpu.py diff --git a/trains/community/handbrake/2.0.10/migrations/migration_helpers/dns_config.py b/trains/community/handbrake/2.0.11/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/handbrake/2.0.10/migrations/migration_helpers/dns_config.py rename to trains/community/handbrake/2.0.11/migrations/migration_helpers/dns_config.py diff --git a/trains/community/handbrake/2.0.10/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/handbrake/2.0.11/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/handbrake/2.0.10/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/handbrake/2.0.11/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/handbrake/2.0.10/migrations/migration_helpers/memory.py b/trains/community/handbrake/2.0.11/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/handbrake/2.0.10/migrations/migration_helpers/memory.py rename to trains/community/handbrake/2.0.11/migrations/migration_helpers/memory.py diff --git a/trains/community/handbrake/2.0.10/migrations/migration_helpers/resources.py b/trains/community/handbrake/2.0.11/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/handbrake/2.0.10/migrations/migration_helpers/resources.py rename to trains/community/handbrake/2.0.11/migrations/migration_helpers/resources.py diff --git a/trains/community/handbrake/2.0.10/migrations/migration_helpers/storage.py b/trains/community/handbrake/2.0.11/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/handbrake/2.0.10/migrations/migration_helpers/storage.py rename to trains/community/handbrake/2.0.11/migrations/migration_helpers/storage.py diff --git a/trains/community/handbrake/2.0.10/questions.yaml b/trains/community/handbrake/2.0.11/questions.yaml similarity index 100% rename from trains/community/handbrake/2.0.10/questions.yaml rename to trains/community/handbrake/2.0.11/questions.yaml diff --git a/trains/community/handbrake/2.0.10/templates/docker-compose.yaml b/trains/community/handbrake/2.0.11/templates/docker-compose.yaml similarity index 100% rename from trains/community/handbrake/2.0.10/templates/docker-compose.yaml rename to trains/community/handbrake/2.0.11/templates/docker-compose.yaml diff --git a/trains/community/handbrake/2.0.10/templates/library/base_v1_1_3/__init__.py b/trains/community/handbrake/2.0.11/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/handbrake/2.0.10/templates/library/base_v1_1_3/__init__.py rename to trains/community/handbrake/2.0.11/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/handbrake/2.0.10/templates/library/base_v1_1_3/environment.py b/trains/community/handbrake/2.0.11/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/handbrake/2.0.10/templates/library/base_v1_1_3/environment.py rename to trains/community/handbrake/2.0.11/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/handbrake/2.0.11/templates/library/base_v1_1_4/healthchecks.py b/trains/community/handbrake/2.0.11/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/community/handbrake/2.0.11/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/handbrake/2.0.10/templates/library/base_v1_1_3/mariadb.py b/trains/community/handbrake/2.0.11/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/handbrake/2.0.10/templates/library/base_v1_1_3/mariadb.py rename to trains/community/handbrake/2.0.11/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/handbrake/2.0.10/templates/library/base_v1_1_3/metadata.py b/trains/community/handbrake/2.0.11/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/handbrake/2.0.10/templates/library/base_v1_1_3/metadata.py rename to trains/community/handbrake/2.0.11/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/handbrake/2.0.10/templates/library/base_v1_1_3/network.py b/trains/community/handbrake/2.0.11/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/handbrake/2.0.10/templates/library/base_v1_1_3/network.py rename to trains/community/handbrake/2.0.11/templates/library/base_v1_1_4/network.py diff --git a/trains/community/handbrake/2.0.11/templates/library/base_v1_1_4/permissions.py b/trains/community/handbrake/2.0.11/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/community/handbrake/2.0.11/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/community/handbrake/2.0.10/templates/library/base_v1_1_3/ports.py b/trains/community/handbrake/2.0.11/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/handbrake/2.0.10/templates/library/base_v1_1_3/ports.py rename to trains/community/handbrake/2.0.11/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/handbrake/2.0.10/templates/library/base_v1_1_3/postgres.py b/trains/community/handbrake/2.0.11/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/handbrake/2.0.10/templates/library/base_v1_1_3/postgres.py rename to trains/community/handbrake/2.0.11/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/handbrake/2.0.10/templates/library/base_v1_1_3/redis.py b/trains/community/handbrake/2.0.11/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/handbrake/2.0.10/templates/library/base_v1_1_3/redis.py rename to trains/community/handbrake/2.0.11/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/handbrake/2.0.10/templates/library/base_v1_1_3/resources.py b/trains/community/handbrake/2.0.11/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/handbrake/2.0.10/templates/library/base_v1_1_3/resources.py rename to trains/community/handbrake/2.0.11/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/handbrake/2.0.10/templates/library/base_v1_1_3/security.py b/trains/community/handbrake/2.0.11/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/handbrake/2.0.10/templates/library/base_v1_1_3/security.py rename to trains/community/handbrake/2.0.11/templates/library/base_v1_1_4/security.py diff --git a/trains/community/handbrake/2.0.10/templates/library/base_v1_1_3/storage.py b/trains/community/handbrake/2.0.11/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/handbrake/2.0.10/templates/library/base_v1_1_3/storage.py rename to trains/community/handbrake/2.0.11/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/handbrake/2.0.10/templates/library/base_v1_1_3/utils.py b/trains/community/handbrake/2.0.11/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/handbrake/2.0.10/templates/library/base_v1_1_3/utils.py rename to trains/community/handbrake/2.0.11/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/handbrake/2.0.10/templates/test_values/basic-values.yaml b/trains/community/handbrake/2.0.11/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/handbrake/2.0.10/templates/test_values/basic-values.yaml rename to trains/community/handbrake/2.0.11/templates/test_values/basic-values.yaml diff --git a/trains/community/handbrake/2.0.10/templates/test_values/secure-values.yaml b/trains/community/handbrake/2.0.11/templates/test_values/secure-values.yaml similarity index 100% rename from trains/community/handbrake/2.0.10/templates/test_values/secure-values.yaml rename to trains/community/handbrake/2.0.11/templates/test_values/secure-values.yaml diff --git a/trains/community/homarr/1.0.18/templates/library/base_v1_1_3/healthchecks.py b/trains/community/homarr/1.0.18/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/community/homarr/1.0.18/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/homarr/1.0.18/templates/library/base_v1_1_3/permissions.py b/trains/community/homarr/1.0.18/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/community/homarr/1.0.18/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/community/homarr/1.0.18/README.md b/trains/community/homarr/1.0.19/README.md similarity index 100% rename from trains/community/homarr/1.0.18/README.md rename to trains/community/homarr/1.0.19/README.md diff --git a/trains/community/homarr/1.0.18/app.yaml b/trains/community/homarr/1.0.19/app.yaml similarity index 87% rename from trains/community/homarr/1.0.18/app.yaml rename to trains/community/homarr/1.0.19/app.yaml index d6d852e766..6469358b63 100644 --- a/trains/community/homarr/1.0.18/app.yaml +++ b/trains/community/homarr/1.0.19/app.yaml @@ -9,8 +9,8 @@ host_mounts: [] icon: https://media.sys.truenas.net/apps/homarr/icons/icon.svg keywords: - dashboard -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -31,4 +31,4 @@ sources: - https://github.com/ajnart/homarr title: Homarr train: community -version: 1.0.18 +version: 1.0.19 diff --git a/trains/community/homarr/1.0.18/ix_values.yaml b/trains/community/homarr/1.0.19/ix_values.yaml similarity index 100% rename from trains/community/homarr/1.0.18/ix_values.yaml rename to trains/community/homarr/1.0.19/ix_values.yaml diff --git a/trains/community/homarr/1.0.18/migrations/migrate_from_kubernetes b/trains/community/homarr/1.0.19/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/homarr/1.0.18/migrations/migrate_from_kubernetes rename to trains/community/homarr/1.0.19/migrations/migrate_from_kubernetes diff --git a/trains/community/homarr/1.0.18/migrations/migration_helpers/__init__.py b/trains/community/homarr/1.0.19/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/homarr/1.0.18/migrations/migration_helpers/__init__.py rename to trains/community/homarr/1.0.19/migrations/migration_helpers/__init__.py diff --git a/trains/community/homarr/1.0.18/migrations/migration_helpers/cpu.py b/trains/community/homarr/1.0.19/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/homarr/1.0.18/migrations/migration_helpers/cpu.py rename to trains/community/homarr/1.0.19/migrations/migration_helpers/cpu.py diff --git a/trains/community/homarr/1.0.18/migrations/migration_helpers/dns_config.py b/trains/community/homarr/1.0.19/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/homarr/1.0.18/migrations/migration_helpers/dns_config.py rename to trains/community/homarr/1.0.19/migrations/migration_helpers/dns_config.py diff --git a/trains/community/homarr/1.0.18/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/homarr/1.0.19/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/homarr/1.0.18/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/homarr/1.0.19/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/homarr/1.0.18/migrations/migration_helpers/memory.py b/trains/community/homarr/1.0.19/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/homarr/1.0.18/migrations/migration_helpers/memory.py rename to trains/community/homarr/1.0.19/migrations/migration_helpers/memory.py diff --git a/trains/community/homarr/1.0.18/migrations/migration_helpers/resources.py b/trains/community/homarr/1.0.19/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/homarr/1.0.18/migrations/migration_helpers/resources.py rename to trains/community/homarr/1.0.19/migrations/migration_helpers/resources.py diff --git a/trains/community/homarr/1.0.18/migrations/migration_helpers/storage.py b/trains/community/homarr/1.0.19/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/homarr/1.0.18/migrations/migration_helpers/storage.py rename to trains/community/homarr/1.0.19/migrations/migration_helpers/storage.py diff --git a/trains/community/homarr/1.0.18/questions.yaml b/trains/community/homarr/1.0.19/questions.yaml similarity index 100% rename from trains/community/homarr/1.0.18/questions.yaml rename to trains/community/homarr/1.0.19/questions.yaml diff --git a/trains/community/homarr/1.0.18/templates/docker-compose.yaml b/trains/community/homarr/1.0.19/templates/docker-compose.yaml similarity index 100% rename from trains/community/homarr/1.0.18/templates/docker-compose.yaml rename to trains/community/homarr/1.0.19/templates/docker-compose.yaml diff --git a/trains/community/homarr/1.0.18/templates/library/base_v1_1_3/__init__.py b/trains/community/homarr/1.0.19/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/homarr/1.0.18/templates/library/base_v1_1_3/__init__.py rename to trains/community/homarr/1.0.19/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/homarr/1.0.18/templates/library/base_v1_1_3/environment.py b/trains/community/homarr/1.0.19/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/homarr/1.0.18/templates/library/base_v1_1_3/environment.py rename to trains/community/homarr/1.0.19/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/homarr/1.0.19/templates/library/base_v1_1_4/healthchecks.py b/trains/community/homarr/1.0.19/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/community/homarr/1.0.19/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/homarr/1.0.18/templates/library/base_v1_1_3/mariadb.py b/trains/community/homarr/1.0.19/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/homarr/1.0.18/templates/library/base_v1_1_3/mariadb.py rename to trains/community/homarr/1.0.19/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/homarr/1.0.18/templates/library/base_v1_1_3/metadata.py b/trains/community/homarr/1.0.19/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/homarr/1.0.18/templates/library/base_v1_1_3/metadata.py rename to trains/community/homarr/1.0.19/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/homarr/1.0.18/templates/library/base_v1_1_3/network.py b/trains/community/homarr/1.0.19/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/homarr/1.0.18/templates/library/base_v1_1_3/network.py rename to trains/community/homarr/1.0.19/templates/library/base_v1_1_4/network.py diff --git a/trains/community/homarr/1.0.19/templates/library/base_v1_1_4/permissions.py b/trains/community/homarr/1.0.19/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/community/homarr/1.0.19/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/community/homarr/1.0.18/templates/library/base_v1_1_3/ports.py b/trains/community/homarr/1.0.19/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/homarr/1.0.18/templates/library/base_v1_1_3/ports.py rename to trains/community/homarr/1.0.19/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/homarr/1.0.18/templates/library/base_v1_1_3/postgres.py b/trains/community/homarr/1.0.19/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/homarr/1.0.18/templates/library/base_v1_1_3/postgres.py rename to trains/community/homarr/1.0.19/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/homarr/1.0.18/templates/library/base_v1_1_3/redis.py b/trains/community/homarr/1.0.19/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/homarr/1.0.18/templates/library/base_v1_1_3/redis.py rename to trains/community/homarr/1.0.19/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/homarr/1.0.18/templates/library/base_v1_1_3/resources.py b/trains/community/homarr/1.0.19/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/homarr/1.0.18/templates/library/base_v1_1_3/resources.py rename to trains/community/homarr/1.0.19/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/homarr/1.0.18/templates/library/base_v1_1_3/security.py b/trains/community/homarr/1.0.19/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/homarr/1.0.18/templates/library/base_v1_1_3/security.py rename to trains/community/homarr/1.0.19/templates/library/base_v1_1_4/security.py diff --git a/trains/community/homarr/1.0.18/templates/library/base_v1_1_3/storage.py b/trains/community/homarr/1.0.19/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/homarr/1.0.18/templates/library/base_v1_1_3/storage.py rename to trains/community/homarr/1.0.19/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/homarr/1.0.18/templates/library/base_v1_1_3/utils.py b/trains/community/homarr/1.0.19/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/homarr/1.0.18/templates/library/base_v1_1_3/utils.py rename to trains/community/homarr/1.0.19/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/homarr/1.0.18/templates/test_values/basic-values.yaml b/trains/community/homarr/1.0.19/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/homarr/1.0.18/templates/test_values/basic-values.yaml rename to trains/community/homarr/1.0.19/templates/test_values/basic-values.yaml diff --git a/trains/community/homarr/1.0.18/templates/test_values/extra-values.yaml b/trains/community/homarr/1.0.19/templates/test_values/extra-values.yaml similarity index 100% rename from trains/community/homarr/1.0.18/templates/test_values/extra-values.yaml rename to trains/community/homarr/1.0.19/templates/test_values/extra-values.yaml diff --git a/trains/community/homepage/1.0.21/templates/library/base_v1_1_3/healthchecks.py b/trains/community/homepage/1.0.21/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/community/homepage/1.0.21/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/homepage/1.0.21/templates/library/base_v1_1_3/permissions.py b/trains/community/homepage/1.0.21/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/community/homepage/1.0.21/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/community/homepage/1.0.21/README.md b/trains/community/homepage/1.0.22/README.md similarity index 100% rename from trains/community/homepage/1.0.21/README.md rename to trains/community/homepage/1.0.22/README.md diff --git a/trains/community/homepage/1.0.21/app.yaml b/trains/community/homepage/1.0.22/app.yaml similarity index 90% rename from trains/community/homepage/1.0.21/app.yaml rename to trains/community/homepage/1.0.22/app.yaml index 31c7e210f6..adde8e9804 100644 --- a/trains/community/homepage/1.0.21/app.yaml +++ b/trains/community/homepage/1.0.22/app.yaml @@ -8,8 +8,8 @@ host_mounts: [] icon: https://media.sys.truenas.net/apps/homepage/icons/icon.png keywords: - dashboard -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -33,4 +33,4 @@ sources: - https://github.com/benphelps/homepage title: Homepage train: community -version: 1.0.21 +version: 1.0.22 diff --git a/trains/community/homepage/1.0.21/ix_values.yaml b/trains/community/homepage/1.0.22/ix_values.yaml similarity index 100% rename from trains/community/homepage/1.0.21/ix_values.yaml rename to trains/community/homepage/1.0.22/ix_values.yaml diff --git a/trains/community/homepage/1.0.21/migrations/migrate_from_kubernetes b/trains/community/homepage/1.0.22/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/homepage/1.0.21/migrations/migrate_from_kubernetes rename to trains/community/homepage/1.0.22/migrations/migrate_from_kubernetes diff --git a/trains/community/homepage/1.0.21/migrations/migration_helpers/__init__.py b/trains/community/homepage/1.0.22/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/homepage/1.0.21/migrations/migration_helpers/__init__.py rename to trains/community/homepage/1.0.22/migrations/migration_helpers/__init__.py diff --git a/trains/community/homepage/1.0.21/migrations/migration_helpers/cpu.py b/trains/community/homepage/1.0.22/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/homepage/1.0.21/migrations/migration_helpers/cpu.py rename to trains/community/homepage/1.0.22/migrations/migration_helpers/cpu.py diff --git a/trains/community/homepage/1.0.21/migrations/migration_helpers/dns_config.py b/trains/community/homepage/1.0.22/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/homepage/1.0.21/migrations/migration_helpers/dns_config.py rename to trains/community/homepage/1.0.22/migrations/migration_helpers/dns_config.py diff --git a/trains/community/homepage/1.0.21/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/homepage/1.0.22/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/homepage/1.0.21/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/homepage/1.0.22/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/homepage/1.0.21/migrations/migration_helpers/memory.py b/trains/community/homepage/1.0.22/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/homepage/1.0.21/migrations/migration_helpers/memory.py rename to trains/community/homepage/1.0.22/migrations/migration_helpers/memory.py diff --git a/trains/community/homepage/1.0.21/migrations/migration_helpers/resources.py b/trains/community/homepage/1.0.22/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/homepage/1.0.21/migrations/migration_helpers/resources.py rename to trains/community/homepage/1.0.22/migrations/migration_helpers/resources.py diff --git a/trains/community/homepage/1.0.21/migrations/migration_helpers/storage.py b/trains/community/homepage/1.0.22/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/homepage/1.0.21/migrations/migration_helpers/storage.py rename to trains/community/homepage/1.0.22/migrations/migration_helpers/storage.py diff --git a/trains/community/homepage/1.0.21/questions.yaml b/trains/community/homepage/1.0.22/questions.yaml similarity index 100% rename from trains/community/homepage/1.0.21/questions.yaml rename to trains/community/homepage/1.0.22/questions.yaml diff --git a/trains/community/homepage/1.0.21/templates/docker-compose.yaml b/trains/community/homepage/1.0.22/templates/docker-compose.yaml similarity index 100% rename from trains/community/homepage/1.0.21/templates/docker-compose.yaml rename to trains/community/homepage/1.0.22/templates/docker-compose.yaml diff --git a/trains/community/homepage/1.0.21/templates/library/base_v1_1_3/__init__.py b/trains/community/homepage/1.0.22/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/homepage/1.0.21/templates/library/base_v1_1_3/__init__.py rename to trains/community/homepage/1.0.22/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/homepage/1.0.21/templates/library/base_v1_1_3/environment.py b/trains/community/homepage/1.0.22/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/homepage/1.0.21/templates/library/base_v1_1_3/environment.py rename to trains/community/homepage/1.0.22/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/homepage/1.0.22/templates/library/base_v1_1_4/healthchecks.py b/trains/community/homepage/1.0.22/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/community/homepage/1.0.22/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/homepage/1.0.21/templates/library/base_v1_1_3/mariadb.py b/trains/community/homepage/1.0.22/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/homepage/1.0.21/templates/library/base_v1_1_3/mariadb.py rename to trains/community/homepage/1.0.22/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/homepage/1.0.21/templates/library/base_v1_1_3/metadata.py b/trains/community/homepage/1.0.22/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/homepage/1.0.21/templates/library/base_v1_1_3/metadata.py rename to trains/community/homepage/1.0.22/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/homepage/1.0.21/templates/library/base_v1_1_3/network.py b/trains/community/homepage/1.0.22/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/homepage/1.0.21/templates/library/base_v1_1_3/network.py rename to trains/community/homepage/1.0.22/templates/library/base_v1_1_4/network.py diff --git a/trains/community/homepage/1.0.22/templates/library/base_v1_1_4/permissions.py b/trains/community/homepage/1.0.22/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/community/homepage/1.0.22/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/community/homepage/1.0.21/templates/library/base_v1_1_3/ports.py b/trains/community/homepage/1.0.22/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/homepage/1.0.21/templates/library/base_v1_1_3/ports.py rename to trains/community/homepage/1.0.22/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/homepage/1.0.21/templates/library/base_v1_1_3/postgres.py b/trains/community/homepage/1.0.22/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/homepage/1.0.21/templates/library/base_v1_1_3/postgres.py rename to trains/community/homepage/1.0.22/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/homepage/1.0.21/templates/library/base_v1_1_3/redis.py b/trains/community/homepage/1.0.22/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/homepage/1.0.21/templates/library/base_v1_1_3/redis.py rename to trains/community/homepage/1.0.22/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/homepage/1.0.21/templates/library/base_v1_1_3/resources.py b/trains/community/homepage/1.0.22/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/homepage/1.0.21/templates/library/base_v1_1_3/resources.py rename to trains/community/homepage/1.0.22/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/homepage/1.0.21/templates/library/base_v1_1_3/security.py b/trains/community/homepage/1.0.22/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/homepage/1.0.21/templates/library/base_v1_1_3/security.py rename to trains/community/homepage/1.0.22/templates/library/base_v1_1_4/security.py diff --git a/trains/community/homepage/1.0.21/templates/library/base_v1_1_3/storage.py b/trains/community/homepage/1.0.22/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/homepage/1.0.21/templates/library/base_v1_1_3/storage.py rename to trains/community/homepage/1.0.22/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/homepage/1.0.21/templates/library/base_v1_1_3/utils.py b/trains/community/homepage/1.0.22/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/homepage/1.0.21/templates/library/base_v1_1_3/utils.py rename to trains/community/homepage/1.0.22/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/homepage/1.0.21/templates/test_values/basic-values.yaml b/trains/community/homepage/1.0.22/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/homepage/1.0.21/templates/test_values/basic-values.yaml rename to trains/community/homepage/1.0.22/templates/test_values/basic-values.yaml diff --git a/trains/community/homer/2.0.9/README.md b/trains/community/homer/2.0.10/README.md similarity index 100% rename from trains/community/homer/2.0.9/README.md rename to trains/community/homer/2.0.10/README.md diff --git a/trains/community/homer/2.0.9/app.yaml b/trains/community/homer/2.0.10/app.yaml similarity index 86% rename from trains/community/homer/2.0.9/app.yaml rename to trains/community/homer/2.0.10/app.yaml index dcf36ff607..8f0f7dae82 100644 --- a/trains/community/homer/2.0.9/app.yaml +++ b/trains/community/homer/2.0.10/app.yaml @@ -7,8 +7,8 @@ description: Homer is a dead simple static HOMepage for your servER to keep your home: https://github.com/bastienwirtz/homer host_mounts: [] icon: https://media.sys.truenas.net/apps/homer/icons/icon.png -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -30,4 +30,4 @@ tags: - homepage title: Homer train: community -version: 2.0.9 +version: 2.0.10 diff --git a/trains/community/homer/2.0.9/ix_values.yaml b/trains/community/homer/2.0.10/ix_values.yaml similarity index 100% rename from trains/community/homer/2.0.9/ix_values.yaml rename to trains/community/homer/2.0.10/ix_values.yaml diff --git a/trains/community/homer/2.0.9/migrations/migrate_from_kubernetes b/trains/community/homer/2.0.10/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/homer/2.0.9/migrations/migrate_from_kubernetes rename to trains/community/homer/2.0.10/migrations/migrate_from_kubernetes diff --git a/trains/community/homer/2.0.9/migrations/migration_helpers/__init__.py b/trains/community/homer/2.0.10/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/homer/2.0.9/migrations/migration_helpers/__init__.py rename to trains/community/homer/2.0.10/migrations/migration_helpers/__init__.py diff --git a/trains/community/homer/2.0.9/migrations/migration_helpers/cpu.py b/trains/community/homer/2.0.10/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/homer/2.0.9/migrations/migration_helpers/cpu.py rename to trains/community/homer/2.0.10/migrations/migration_helpers/cpu.py diff --git a/trains/community/homer/2.0.9/migrations/migration_helpers/dns_config.py b/trains/community/homer/2.0.10/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/homer/2.0.9/migrations/migration_helpers/dns_config.py rename to trains/community/homer/2.0.10/migrations/migration_helpers/dns_config.py diff --git a/trains/community/homer/2.0.9/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/homer/2.0.10/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/homer/2.0.9/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/homer/2.0.10/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/homer/2.0.9/migrations/migration_helpers/memory.py b/trains/community/homer/2.0.10/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/homer/2.0.9/migrations/migration_helpers/memory.py rename to trains/community/homer/2.0.10/migrations/migration_helpers/memory.py diff --git a/trains/community/homer/2.0.9/migrations/migration_helpers/resources.py b/trains/community/homer/2.0.10/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/homer/2.0.9/migrations/migration_helpers/resources.py rename to trains/community/homer/2.0.10/migrations/migration_helpers/resources.py diff --git a/trains/community/homer/2.0.9/migrations/migration_helpers/storage.py b/trains/community/homer/2.0.10/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/homer/2.0.9/migrations/migration_helpers/storage.py rename to trains/community/homer/2.0.10/migrations/migration_helpers/storage.py diff --git a/trains/community/homer/2.0.9/questions.yaml b/trains/community/homer/2.0.10/questions.yaml similarity index 100% rename from trains/community/homer/2.0.9/questions.yaml rename to trains/community/homer/2.0.10/questions.yaml diff --git a/trains/community/homer/2.0.9/templates/docker-compose.yaml b/trains/community/homer/2.0.10/templates/docker-compose.yaml similarity index 100% rename from trains/community/homer/2.0.9/templates/docker-compose.yaml rename to trains/community/homer/2.0.10/templates/docker-compose.yaml diff --git a/trains/community/homer/2.0.9/templates/library/base_v1_1_3/__init__.py b/trains/community/homer/2.0.10/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/homer/2.0.9/templates/library/base_v1_1_3/__init__.py rename to trains/community/homer/2.0.10/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/homer/2.0.9/templates/library/base_v1_1_3/environment.py b/trains/community/homer/2.0.10/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/homer/2.0.9/templates/library/base_v1_1_3/environment.py rename to trains/community/homer/2.0.10/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/homer/2.0.10/templates/library/base_v1_1_4/healthchecks.py b/trains/community/homer/2.0.10/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/community/homer/2.0.10/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/homer/2.0.9/templates/library/base_v1_1_3/mariadb.py b/trains/community/homer/2.0.10/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/homer/2.0.9/templates/library/base_v1_1_3/mariadb.py rename to trains/community/homer/2.0.10/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/homer/2.0.9/templates/library/base_v1_1_3/metadata.py b/trains/community/homer/2.0.10/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/homer/2.0.9/templates/library/base_v1_1_3/metadata.py rename to trains/community/homer/2.0.10/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/homer/2.0.9/templates/library/base_v1_1_3/network.py b/trains/community/homer/2.0.10/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/homer/2.0.9/templates/library/base_v1_1_3/network.py rename to trains/community/homer/2.0.10/templates/library/base_v1_1_4/network.py diff --git a/trains/community/homer/2.0.10/templates/library/base_v1_1_4/permissions.py b/trains/community/homer/2.0.10/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/community/homer/2.0.10/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/community/homer/2.0.9/templates/library/base_v1_1_3/ports.py b/trains/community/homer/2.0.10/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/homer/2.0.9/templates/library/base_v1_1_3/ports.py rename to trains/community/homer/2.0.10/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/homer/2.0.9/templates/library/base_v1_1_3/postgres.py b/trains/community/homer/2.0.10/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/homer/2.0.9/templates/library/base_v1_1_3/postgres.py rename to trains/community/homer/2.0.10/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/homer/2.0.9/templates/library/base_v1_1_3/redis.py b/trains/community/homer/2.0.10/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/homer/2.0.9/templates/library/base_v1_1_3/redis.py rename to trains/community/homer/2.0.10/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/homer/2.0.9/templates/library/base_v1_1_3/resources.py b/trains/community/homer/2.0.10/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/homer/2.0.9/templates/library/base_v1_1_3/resources.py rename to trains/community/homer/2.0.10/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/homer/2.0.9/templates/library/base_v1_1_3/security.py b/trains/community/homer/2.0.10/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/homer/2.0.9/templates/library/base_v1_1_3/security.py rename to trains/community/homer/2.0.10/templates/library/base_v1_1_4/security.py diff --git a/trains/community/homer/2.0.9/templates/library/base_v1_1_3/storage.py b/trains/community/homer/2.0.10/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/homer/2.0.9/templates/library/base_v1_1_3/storage.py rename to trains/community/homer/2.0.10/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/homer/2.0.9/templates/library/base_v1_1_3/utils.py b/trains/community/homer/2.0.10/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/homer/2.0.9/templates/library/base_v1_1_3/utils.py rename to trains/community/homer/2.0.10/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/homer/2.0.9/templates/test_values/basic-values.yaml b/trains/community/homer/2.0.10/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/homer/2.0.9/templates/test_values/basic-values.yaml rename to trains/community/homer/2.0.10/templates/test_values/basic-values.yaml diff --git a/trains/community/homer/2.0.9/templates/test_values/no-assets-values.yaml b/trains/community/homer/2.0.10/templates/test_values/no-assets-values.yaml similarity index 100% rename from trains/community/homer/2.0.9/templates/test_values/no-assets-values.yaml rename to trains/community/homer/2.0.10/templates/test_values/no-assets-values.yaml diff --git a/trains/community/homer/2.0.9/templates/library/base_v1_1_3/healthchecks.py b/trains/community/homer/2.0.9/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/community/homer/2.0.9/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/homer/2.0.9/templates/library/base_v1_1_3/permissions.py b/trains/community/homer/2.0.9/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/community/homer/2.0.9/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/community/immich/1.6.18/templates/library/base_v1_1_3/healthchecks.py b/trains/community/immich/1.6.18/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/community/immich/1.6.18/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/immich/1.6.18/templates/library/base_v1_1_3/permissions.py b/trains/community/immich/1.6.18/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/community/immich/1.6.18/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/community/immich/1.6.18/README.md b/trains/community/immich/1.6.19/README.md similarity index 100% rename from trains/community/immich/1.6.18/README.md rename to trains/community/immich/1.6.19/README.md diff --git a/trains/community/immich/1.6.18/app.yaml b/trains/community/immich/1.6.19/app.yaml similarity index 90% rename from trains/community/immich/1.6.18/app.yaml rename to trains/community/immich/1.6.19/app.yaml index 14c6ac14ed..24c6bc2296 100644 --- a/trains/community/immich/1.6.18/app.yaml +++ b/trains/community/immich/1.6.19/app.yaml @@ -16,8 +16,8 @@ icon: https://media.sys.truenas.net/apps/immich/icons/icon.svg keywords: - photos - backup -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -45,4 +45,4 @@ sources: - https://github.com/immich-app/immich title: Immich train: community -version: 1.6.18 +version: 1.6.19 diff --git a/trains/community/immich/1.6.18/ix_values.yaml b/trains/community/immich/1.6.19/ix_values.yaml similarity index 100% rename from trains/community/immich/1.6.18/ix_values.yaml rename to trains/community/immich/1.6.19/ix_values.yaml diff --git a/trains/community/immich/1.6.18/migrations/migrate_from_kubernetes b/trains/community/immich/1.6.19/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/immich/1.6.18/migrations/migrate_from_kubernetes rename to trains/community/immich/1.6.19/migrations/migrate_from_kubernetes diff --git a/trains/community/immich/1.6.18/migrations/migration_helpers/__init__.py b/trains/community/immich/1.6.19/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/immich/1.6.18/migrations/migration_helpers/__init__.py rename to trains/community/immich/1.6.19/migrations/migration_helpers/__init__.py diff --git a/trains/community/immich/1.6.18/migrations/migration_helpers/cpu.py b/trains/community/immich/1.6.19/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/immich/1.6.18/migrations/migration_helpers/cpu.py rename to trains/community/immich/1.6.19/migrations/migration_helpers/cpu.py diff --git a/trains/community/immich/1.6.18/migrations/migration_helpers/dns_config.py b/trains/community/immich/1.6.19/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/immich/1.6.18/migrations/migration_helpers/dns_config.py rename to trains/community/immich/1.6.19/migrations/migration_helpers/dns_config.py diff --git a/trains/community/immich/1.6.18/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/immich/1.6.19/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/immich/1.6.18/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/immich/1.6.19/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/immich/1.6.18/migrations/migration_helpers/memory.py b/trains/community/immich/1.6.19/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/immich/1.6.18/migrations/migration_helpers/memory.py rename to trains/community/immich/1.6.19/migrations/migration_helpers/memory.py diff --git a/trains/community/immich/1.6.18/migrations/migration_helpers/resources.py b/trains/community/immich/1.6.19/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/immich/1.6.18/migrations/migration_helpers/resources.py rename to trains/community/immich/1.6.19/migrations/migration_helpers/resources.py diff --git a/trains/community/immich/1.6.18/migrations/migration_helpers/storage.py b/trains/community/immich/1.6.19/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/immich/1.6.18/migrations/migration_helpers/storage.py rename to trains/community/immich/1.6.19/migrations/migration_helpers/storage.py diff --git a/trains/community/immich/1.6.18/questions.yaml b/trains/community/immich/1.6.19/questions.yaml similarity index 100% rename from trains/community/immich/1.6.18/questions.yaml rename to trains/community/immich/1.6.19/questions.yaml diff --git a/trains/community/immich/1.6.18/templates/docker-compose.yaml b/trains/community/immich/1.6.19/templates/docker-compose.yaml similarity index 98% rename from trains/community/immich/1.6.18/templates/docker-compose.yaml rename to trains/community/immich/1.6.19/templates/docker-compose.yaml index 1fd39ed660..a07a201384 100644 --- a/trains/community/immich/1.6.18/templates/docker-compose.yaml +++ b/trains/community/immich/1.6.19/templates/docker-compose.yaml @@ -95,7 +95,7 @@ services: {% if values.network.dns_opts %} dns_opt: {{ ix_lib.base.network.dns_opts(values.network.dns_opts) | tojson }} {% endif %} - {% set test = ix_lib.base.healthchecks.http_test(port=values.network.web_port, path="/api/server/ping") %} + {% set test = "/usr/src/app/bin/immich-healthcheck" %} healthcheck: {{ ix_lib.base.healthchecks.check_health(test) | tojson }} {% set server_app_env = { "NODE_ENV": "production", @@ -168,7 +168,7 @@ services: {% if values.network.dns_opts %} dns_opt: {{ ix_lib.base.network.dns_opts(values.network.dns_opts) | tojson }} {% endif %} - {% set test = ix_lib.base.healthchecks.http_test(port=values.consts.ml_port, path="/ping") %} + {% set test = "python3 /usr/src/app/healthcheck.py" %} healthcheck: {{ ix_lib.base.healthchecks.check_health(test) | tojson }} {% set ml_app_env = { "NODE_ENV": "production", diff --git a/trains/community/immich/1.6.18/templates/library/base_v1_1_3/__init__.py b/trains/community/immich/1.6.19/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/immich/1.6.18/templates/library/base_v1_1_3/__init__.py rename to trains/community/immich/1.6.19/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/immich/1.6.18/templates/library/base_v1_1_3/environment.py b/trains/community/immich/1.6.19/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/immich/1.6.18/templates/library/base_v1_1_3/environment.py rename to trains/community/immich/1.6.19/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/immich/1.6.19/templates/library/base_v1_1_4/healthchecks.py b/trains/community/immich/1.6.19/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/community/immich/1.6.19/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/immich/1.6.18/templates/library/base_v1_1_3/mariadb.py b/trains/community/immich/1.6.19/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/immich/1.6.18/templates/library/base_v1_1_3/mariadb.py rename to trains/community/immich/1.6.19/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/immich/1.6.18/templates/library/base_v1_1_3/metadata.py b/trains/community/immich/1.6.19/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/immich/1.6.18/templates/library/base_v1_1_3/metadata.py rename to trains/community/immich/1.6.19/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/immich/1.6.18/templates/library/base_v1_1_3/network.py b/trains/community/immich/1.6.19/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/immich/1.6.18/templates/library/base_v1_1_3/network.py rename to trains/community/immich/1.6.19/templates/library/base_v1_1_4/network.py diff --git a/trains/community/immich/1.6.19/templates/library/base_v1_1_4/permissions.py b/trains/community/immich/1.6.19/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/community/immich/1.6.19/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/community/immich/1.6.18/templates/library/base_v1_1_3/ports.py b/trains/community/immich/1.6.19/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/immich/1.6.18/templates/library/base_v1_1_3/ports.py rename to trains/community/immich/1.6.19/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/immich/1.6.18/templates/library/base_v1_1_3/postgres.py b/trains/community/immich/1.6.19/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/immich/1.6.18/templates/library/base_v1_1_3/postgres.py rename to trains/community/immich/1.6.19/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/immich/1.6.18/templates/library/base_v1_1_3/redis.py b/trains/community/immich/1.6.19/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/immich/1.6.18/templates/library/base_v1_1_3/redis.py rename to trains/community/immich/1.6.19/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/immich/1.6.18/templates/library/base_v1_1_3/resources.py b/trains/community/immich/1.6.19/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/immich/1.6.18/templates/library/base_v1_1_3/resources.py rename to trains/community/immich/1.6.19/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/immich/1.6.18/templates/library/base_v1_1_3/security.py b/trains/community/immich/1.6.19/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/immich/1.6.18/templates/library/base_v1_1_3/security.py rename to trains/community/immich/1.6.19/templates/library/base_v1_1_4/security.py diff --git a/trains/community/immich/1.6.18/templates/library/base_v1_1_3/storage.py b/trains/community/immich/1.6.19/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/immich/1.6.18/templates/library/base_v1_1_3/storage.py rename to trains/community/immich/1.6.19/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/immich/1.6.18/templates/library/base_v1_1_3/utils.py b/trains/community/immich/1.6.19/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/immich/1.6.18/templates/library/base_v1_1_3/utils.py rename to trains/community/immich/1.6.19/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/immich/1.6.18/templates/test_values/basic-values.yaml b/trains/community/immich/1.6.19/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/immich/1.6.18/templates/test_values/basic-values.yaml rename to trains/community/immich/1.6.19/templates/test_values/basic-values.yaml diff --git a/trains/community/invidious/1.0.10/templates/library/base_v1_1_3/healthchecks.py b/trains/community/invidious/1.0.10/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/community/invidious/1.0.10/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/invidious/1.0.10/templates/library/base_v1_1_3/permissions.py b/trains/community/invidious/1.0.10/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/community/invidious/1.0.10/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/community/invidious/1.0.10/README.md b/trains/community/invidious/1.0.11/README.md similarity index 100% rename from trains/community/invidious/1.0.10/README.md rename to trains/community/invidious/1.0.11/README.md diff --git a/trains/community/invidious/1.0.10/app.yaml b/trains/community/invidious/1.0.11/app.yaml similarity index 90% rename from trains/community/invidious/1.0.10/app.yaml rename to trains/community/invidious/1.0.11/app.yaml index b337f0b7b1..0d9f2e3cbc 100644 --- a/trains/community/invidious/1.0.10/app.yaml +++ b/trains/community/invidious/1.0.11/app.yaml @@ -8,8 +8,8 @@ host_mounts: [] icon: https://media.sys.truenas.net/apps/invidious/icons/icon.svg keywords: - youtube -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -38,4 +38,4 @@ sources: - https://quay.io/repository/invidious title: Invidious train: community -version: 1.0.10 +version: 1.0.11 diff --git a/trains/community/invidious/1.0.10/ix_values.yaml b/trains/community/invidious/1.0.11/ix_values.yaml similarity index 100% rename from trains/community/invidious/1.0.10/ix_values.yaml rename to trains/community/invidious/1.0.11/ix_values.yaml diff --git a/trains/community/invidious/1.0.10/migrations/migrate_from_kubernetes b/trains/community/invidious/1.0.11/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/invidious/1.0.10/migrations/migrate_from_kubernetes rename to trains/community/invidious/1.0.11/migrations/migrate_from_kubernetes diff --git a/trains/community/invidious/1.0.10/migrations/migration_helpers/__init__.py b/trains/community/invidious/1.0.11/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/invidious/1.0.10/migrations/migration_helpers/__init__.py rename to trains/community/invidious/1.0.11/migrations/migration_helpers/__init__.py diff --git a/trains/community/invidious/1.0.10/migrations/migration_helpers/cpu.py b/trains/community/invidious/1.0.11/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/invidious/1.0.10/migrations/migration_helpers/cpu.py rename to trains/community/invidious/1.0.11/migrations/migration_helpers/cpu.py diff --git a/trains/community/invidious/1.0.10/migrations/migration_helpers/dns_config.py b/trains/community/invidious/1.0.11/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/invidious/1.0.10/migrations/migration_helpers/dns_config.py rename to trains/community/invidious/1.0.11/migrations/migration_helpers/dns_config.py diff --git a/trains/community/invidious/1.0.10/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/invidious/1.0.11/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/invidious/1.0.10/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/invidious/1.0.11/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/invidious/1.0.10/migrations/migration_helpers/memory.py b/trains/community/invidious/1.0.11/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/invidious/1.0.10/migrations/migration_helpers/memory.py rename to trains/community/invidious/1.0.11/migrations/migration_helpers/memory.py diff --git a/trains/community/invidious/1.0.10/migrations/migration_helpers/resources.py b/trains/community/invidious/1.0.11/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/invidious/1.0.10/migrations/migration_helpers/resources.py rename to trains/community/invidious/1.0.11/migrations/migration_helpers/resources.py diff --git a/trains/community/invidious/1.0.10/migrations/migration_helpers/storage.py b/trains/community/invidious/1.0.11/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/invidious/1.0.10/migrations/migration_helpers/storage.py rename to trains/community/invidious/1.0.11/migrations/migration_helpers/storage.py diff --git a/trains/community/invidious/1.0.10/questions.yaml b/trains/community/invidious/1.0.11/questions.yaml similarity index 100% rename from trains/community/invidious/1.0.10/questions.yaml rename to trains/community/invidious/1.0.11/questions.yaml diff --git a/trains/community/invidious/1.0.10/templates/docker-compose.yaml b/trains/community/invidious/1.0.11/templates/docker-compose.yaml similarity index 100% rename from trains/community/invidious/1.0.10/templates/docker-compose.yaml rename to trains/community/invidious/1.0.11/templates/docker-compose.yaml diff --git a/trains/community/invidious/1.0.10/templates/library/base_v1_1_3/__init__.py b/trains/community/invidious/1.0.11/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/invidious/1.0.10/templates/library/base_v1_1_3/__init__.py rename to trains/community/invidious/1.0.11/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/invidious/1.0.10/templates/library/base_v1_1_3/environment.py b/trains/community/invidious/1.0.11/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/invidious/1.0.10/templates/library/base_v1_1_3/environment.py rename to trains/community/invidious/1.0.11/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/invidious/1.0.11/templates/library/base_v1_1_4/healthchecks.py b/trains/community/invidious/1.0.11/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/community/invidious/1.0.11/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/invidious/1.0.10/templates/library/base_v1_1_3/mariadb.py b/trains/community/invidious/1.0.11/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/invidious/1.0.10/templates/library/base_v1_1_3/mariadb.py rename to trains/community/invidious/1.0.11/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/invidious/1.0.10/templates/library/base_v1_1_3/metadata.py b/trains/community/invidious/1.0.11/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/invidious/1.0.10/templates/library/base_v1_1_3/metadata.py rename to trains/community/invidious/1.0.11/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/invidious/1.0.10/templates/library/base_v1_1_3/network.py b/trains/community/invidious/1.0.11/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/invidious/1.0.10/templates/library/base_v1_1_3/network.py rename to trains/community/invidious/1.0.11/templates/library/base_v1_1_4/network.py diff --git a/trains/community/invidious/1.0.11/templates/library/base_v1_1_4/permissions.py b/trains/community/invidious/1.0.11/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/community/invidious/1.0.11/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/community/invidious/1.0.10/templates/library/base_v1_1_3/ports.py b/trains/community/invidious/1.0.11/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/invidious/1.0.10/templates/library/base_v1_1_3/ports.py rename to trains/community/invidious/1.0.11/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/invidious/1.0.10/templates/library/base_v1_1_3/postgres.py b/trains/community/invidious/1.0.11/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/invidious/1.0.10/templates/library/base_v1_1_3/postgres.py rename to trains/community/invidious/1.0.11/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/invidious/1.0.10/templates/library/base_v1_1_3/redis.py b/trains/community/invidious/1.0.11/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/invidious/1.0.10/templates/library/base_v1_1_3/redis.py rename to trains/community/invidious/1.0.11/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/invidious/1.0.10/templates/library/base_v1_1_3/resources.py b/trains/community/invidious/1.0.11/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/invidious/1.0.10/templates/library/base_v1_1_3/resources.py rename to trains/community/invidious/1.0.11/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/invidious/1.0.10/templates/library/base_v1_1_3/security.py b/trains/community/invidious/1.0.11/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/invidious/1.0.10/templates/library/base_v1_1_3/security.py rename to trains/community/invidious/1.0.11/templates/library/base_v1_1_4/security.py diff --git a/trains/community/invidious/1.0.10/templates/library/base_v1_1_3/storage.py b/trains/community/invidious/1.0.11/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/invidious/1.0.10/templates/library/base_v1_1_3/storage.py rename to trains/community/invidious/1.0.11/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/invidious/1.0.10/templates/library/base_v1_1_3/utils.py b/trains/community/invidious/1.0.11/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/invidious/1.0.10/templates/library/base_v1_1_3/utils.py rename to trains/community/invidious/1.0.11/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/invidious/1.0.10/templates/macros/config.sh b/trains/community/invidious/1.0.11/templates/macros/config.sh similarity index 100% rename from trains/community/invidious/1.0.10/templates/macros/config.sh rename to trains/community/invidious/1.0.11/templates/macros/config.sh diff --git a/trains/community/invidious/1.0.10/templates/test_values/basic-values.yaml b/trains/community/invidious/1.0.11/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/invidious/1.0.10/templates/test_values/basic-values.yaml rename to trains/community/invidious/1.0.11/templates/test_values/basic-values.yaml diff --git a/trains/community/invidious/1.0.10/templates/test_values/no-sig-values.yaml b/trains/community/invidious/1.0.11/templates/test_values/no-sig-values.yaml similarity index 100% rename from trains/community/invidious/1.0.10/templates/test_values/no-sig-values.yaml rename to trains/community/invidious/1.0.11/templates/test_values/no-sig-values.yaml diff --git a/trains/community/ipfs/1.0.18/templates/library/base_v1_1_3/healthchecks.py b/trains/community/ipfs/1.0.18/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/community/ipfs/1.0.18/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/ipfs/1.0.18/templates/library/base_v1_1_3/permissions.py b/trains/community/ipfs/1.0.18/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/community/ipfs/1.0.18/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/community/ipfs/1.0.18/README.md b/trains/community/ipfs/1.0.19/README.md similarity index 100% rename from trains/community/ipfs/1.0.18/README.md rename to trains/community/ipfs/1.0.19/README.md diff --git a/trains/community/ipfs/1.0.18/app.yaml b/trains/community/ipfs/1.0.19/app.yaml similarity index 86% rename from trains/community/ipfs/1.0.18/app.yaml rename to trains/community/ipfs/1.0.19/app.yaml index a1ac209cdc..d05581545b 100644 --- a/trains/community/ipfs/1.0.18/app.yaml +++ b/trains/community/ipfs/1.0.19/app.yaml @@ -12,8 +12,8 @@ keywords: - ipfs - file-sharing - kubo -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -33,4 +33,4 @@ sources: - https://ipfs.tech/ title: IPFS train: community -version: 1.0.18 +version: 1.0.19 diff --git a/trains/community/ipfs/1.0.18/ix_values.yaml b/trains/community/ipfs/1.0.19/ix_values.yaml similarity index 100% rename from trains/community/ipfs/1.0.18/ix_values.yaml rename to trains/community/ipfs/1.0.19/ix_values.yaml diff --git a/trains/community/ipfs/1.0.18/migrations/migrate_from_kubernetes b/trains/community/ipfs/1.0.19/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/ipfs/1.0.18/migrations/migrate_from_kubernetes rename to trains/community/ipfs/1.0.19/migrations/migrate_from_kubernetes diff --git a/trains/community/ipfs/1.0.18/migrations/migration_helpers/__init__.py b/trains/community/ipfs/1.0.19/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/ipfs/1.0.18/migrations/migration_helpers/__init__.py rename to trains/community/ipfs/1.0.19/migrations/migration_helpers/__init__.py diff --git a/trains/community/ipfs/1.0.18/migrations/migration_helpers/cpu.py b/trains/community/ipfs/1.0.19/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/ipfs/1.0.18/migrations/migration_helpers/cpu.py rename to trains/community/ipfs/1.0.19/migrations/migration_helpers/cpu.py diff --git a/trains/community/ipfs/1.0.18/migrations/migration_helpers/dns_config.py b/trains/community/ipfs/1.0.19/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/ipfs/1.0.18/migrations/migration_helpers/dns_config.py rename to trains/community/ipfs/1.0.19/migrations/migration_helpers/dns_config.py diff --git a/trains/community/ipfs/1.0.18/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/ipfs/1.0.19/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/ipfs/1.0.18/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/ipfs/1.0.19/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/ipfs/1.0.18/migrations/migration_helpers/memory.py b/trains/community/ipfs/1.0.19/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/ipfs/1.0.18/migrations/migration_helpers/memory.py rename to trains/community/ipfs/1.0.19/migrations/migration_helpers/memory.py diff --git a/trains/community/ipfs/1.0.18/migrations/migration_helpers/resources.py b/trains/community/ipfs/1.0.19/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/ipfs/1.0.18/migrations/migration_helpers/resources.py rename to trains/community/ipfs/1.0.19/migrations/migration_helpers/resources.py diff --git a/trains/community/ipfs/1.0.18/migrations/migration_helpers/storage.py b/trains/community/ipfs/1.0.19/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/ipfs/1.0.18/migrations/migration_helpers/storage.py rename to trains/community/ipfs/1.0.19/migrations/migration_helpers/storage.py diff --git a/trains/community/ipfs/1.0.18/questions.yaml b/trains/community/ipfs/1.0.19/questions.yaml similarity index 100% rename from trains/community/ipfs/1.0.18/questions.yaml rename to trains/community/ipfs/1.0.19/questions.yaml diff --git a/trains/community/ipfs/1.0.18/templates/docker-compose.yaml b/trains/community/ipfs/1.0.19/templates/docker-compose.yaml similarity index 100% rename from trains/community/ipfs/1.0.18/templates/docker-compose.yaml rename to trains/community/ipfs/1.0.19/templates/docker-compose.yaml diff --git a/trains/community/ipfs/1.0.18/templates/library/base_v1_1_3/__init__.py b/trains/community/ipfs/1.0.19/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/ipfs/1.0.18/templates/library/base_v1_1_3/__init__.py rename to trains/community/ipfs/1.0.19/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/ipfs/1.0.18/templates/library/base_v1_1_3/environment.py b/trains/community/ipfs/1.0.19/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/ipfs/1.0.18/templates/library/base_v1_1_3/environment.py rename to trains/community/ipfs/1.0.19/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/ipfs/1.0.19/templates/library/base_v1_1_4/healthchecks.py b/trains/community/ipfs/1.0.19/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/community/ipfs/1.0.19/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/ipfs/1.0.18/templates/library/base_v1_1_3/mariadb.py b/trains/community/ipfs/1.0.19/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/ipfs/1.0.18/templates/library/base_v1_1_3/mariadb.py rename to trains/community/ipfs/1.0.19/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/ipfs/1.0.18/templates/library/base_v1_1_3/metadata.py b/trains/community/ipfs/1.0.19/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/ipfs/1.0.18/templates/library/base_v1_1_3/metadata.py rename to trains/community/ipfs/1.0.19/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/ipfs/1.0.18/templates/library/base_v1_1_3/network.py b/trains/community/ipfs/1.0.19/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/ipfs/1.0.18/templates/library/base_v1_1_3/network.py rename to trains/community/ipfs/1.0.19/templates/library/base_v1_1_4/network.py diff --git a/trains/community/ipfs/1.0.19/templates/library/base_v1_1_4/permissions.py b/trains/community/ipfs/1.0.19/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/community/ipfs/1.0.19/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/community/ipfs/1.0.18/templates/library/base_v1_1_3/ports.py b/trains/community/ipfs/1.0.19/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/ipfs/1.0.18/templates/library/base_v1_1_3/ports.py rename to trains/community/ipfs/1.0.19/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/ipfs/1.0.18/templates/library/base_v1_1_3/postgres.py b/trains/community/ipfs/1.0.19/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/ipfs/1.0.18/templates/library/base_v1_1_3/postgres.py rename to trains/community/ipfs/1.0.19/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/ipfs/1.0.18/templates/library/base_v1_1_3/redis.py b/trains/community/ipfs/1.0.19/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/ipfs/1.0.18/templates/library/base_v1_1_3/redis.py rename to trains/community/ipfs/1.0.19/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/ipfs/1.0.18/templates/library/base_v1_1_3/resources.py b/trains/community/ipfs/1.0.19/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/ipfs/1.0.18/templates/library/base_v1_1_3/resources.py rename to trains/community/ipfs/1.0.19/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/ipfs/1.0.18/templates/library/base_v1_1_3/security.py b/trains/community/ipfs/1.0.19/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/ipfs/1.0.18/templates/library/base_v1_1_3/security.py rename to trains/community/ipfs/1.0.19/templates/library/base_v1_1_4/security.py diff --git a/trains/community/ipfs/1.0.18/templates/library/base_v1_1_3/storage.py b/trains/community/ipfs/1.0.19/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/ipfs/1.0.18/templates/library/base_v1_1_3/storage.py rename to trains/community/ipfs/1.0.19/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/ipfs/1.0.18/templates/library/base_v1_1_3/utils.py b/trains/community/ipfs/1.0.19/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/ipfs/1.0.18/templates/library/base_v1_1_3/utils.py rename to trains/community/ipfs/1.0.19/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/ipfs/1.0.18/templates/test_values/basic-values.yaml b/trains/community/ipfs/1.0.19/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/ipfs/1.0.18/templates/test_values/basic-values.yaml rename to trains/community/ipfs/1.0.19/templates/test_values/basic-values.yaml diff --git a/trains/community/jellyfin/1.0.24/templates/library/base_v1_1_3/healthchecks.py b/trains/community/jellyfin/1.0.24/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/community/jellyfin/1.0.24/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/jellyfin/1.0.24/templates/library/base_v1_1_3/permissions.py b/trains/community/jellyfin/1.0.24/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/community/jellyfin/1.0.24/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/community/jellyfin/1.0.24/README.md b/trains/community/jellyfin/1.0.25/README.md similarity index 100% rename from trains/community/jellyfin/1.0.24/README.md rename to trains/community/jellyfin/1.0.25/README.md diff --git a/trains/community/jellyfin/1.0.24/app.yaml b/trains/community/jellyfin/1.0.25/app.yaml similarity index 87% rename from trains/community/jellyfin/1.0.24/app.yaml rename to trains/community/jellyfin/1.0.25/app.yaml index f5df83b789..6a86ef9e03 100644 --- a/trains/community/jellyfin/1.0.24/app.yaml +++ b/trains/community/jellyfin/1.0.25/app.yaml @@ -14,8 +14,8 @@ keywords: - tv - media - streaming -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -35,4 +35,4 @@ sources: - https://jellyfin.org/ title: Jellyfin train: community -version: 1.0.24 +version: 1.0.25 diff --git a/trains/community/jellyfin/1.0.24/ix_values.yaml b/trains/community/jellyfin/1.0.25/ix_values.yaml similarity index 100% rename from trains/community/jellyfin/1.0.24/ix_values.yaml rename to trains/community/jellyfin/1.0.25/ix_values.yaml diff --git a/trains/community/jellyfin/1.0.24/migrations/migrate_from_kubernetes b/trains/community/jellyfin/1.0.25/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/jellyfin/1.0.24/migrations/migrate_from_kubernetes rename to trains/community/jellyfin/1.0.25/migrations/migrate_from_kubernetes diff --git a/trains/community/jellyfin/1.0.24/migrations/migration_helpers/__init__.py b/trains/community/jellyfin/1.0.25/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/jellyfin/1.0.24/migrations/migration_helpers/__init__.py rename to trains/community/jellyfin/1.0.25/migrations/migration_helpers/__init__.py diff --git a/trains/community/jellyfin/1.0.24/migrations/migration_helpers/cpu.py b/trains/community/jellyfin/1.0.25/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/jellyfin/1.0.24/migrations/migration_helpers/cpu.py rename to trains/community/jellyfin/1.0.25/migrations/migration_helpers/cpu.py diff --git a/trains/community/jellyfin/1.0.24/migrations/migration_helpers/dns_config.py b/trains/community/jellyfin/1.0.25/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/jellyfin/1.0.24/migrations/migration_helpers/dns_config.py rename to trains/community/jellyfin/1.0.25/migrations/migration_helpers/dns_config.py diff --git a/trains/community/jellyfin/1.0.24/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/jellyfin/1.0.25/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/jellyfin/1.0.24/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/jellyfin/1.0.25/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/jellyfin/1.0.24/migrations/migration_helpers/memory.py b/trains/community/jellyfin/1.0.25/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/jellyfin/1.0.24/migrations/migration_helpers/memory.py rename to trains/community/jellyfin/1.0.25/migrations/migration_helpers/memory.py diff --git a/trains/community/jellyfin/1.0.24/migrations/migration_helpers/resources.py b/trains/community/jellyfin/1.0.25/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/jellyfin/1.0.24/migrations/migration_helpers/resources.py rename to trains/community/jellyfin/1.0.25/migrations/migration_helpers/resources.py diff --git a/trains/community/jellyfin/1.0.24/migrations/migration_helpers/storage.py b/trains/community/jellyfin/1.0.25/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/jellyfin/1.0.24/migrations/migration_helpers/storage.py rename to trains/community/jellyfin/1.0.25/migrations/migration_helpers/storage.py diff --git a/trains/community/jellyfin/1.0.24/questions.yaml b/trains/community/jellyfin/1.0.25/questions.yaml similarity index 100% rename from trains/community/jellyfin/1.0.24/questions.yaml rename to trains/community/jellyfin/1.0.25/questions.yaml diff --git a/trains/community/jellyfin/1.0.24/templates/docker-compose.yaml b/trains/community/jellyfin/1.0.25/templates/docker-compose.yaml similarity index 100% rename from trains/community/jellyfin/1.0.24/templates/docker-compose.yaml rename to trains/community/jellyfin/1.0.25/templates/docker-compose.yaml diff --git a/trains/community/jellyfin/1.0.24/templates/library/base_v1_1_3/__init__.py b/trains/community/jellyfin/1.0.25/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/jellyfin/1.0.24/templates/library/base_v1_1_3/__init__.py rename to trains/community/jellyfin/1.0.25/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/jellyfin/1.0.24/templates/library/base_v1_1_3/environment.py b/trains/community/jellyfin/1.0.25/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/jellyfin/1.0.24/templates/library/base_v1_1_3/environment.py rename to trains/community/jellyfin/1.0.25/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/jellyfin/1.0.25/templates/library/base_v1_1_4/healthchecks.py b/trains/community/jellyfin/1.0.25/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/community/jellyfin/1.0.25/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/jellyfin/1.0.24/templates/library/base_v1_1_3/mariadb.py b/trains/community/jellyfin/1.0.25/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/jellyfin/1.0.24/templates/library/base_v1_1_3/mariadb.py rename to trains/community/jellyfin/1.0.25/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/jellyfin/1.0.24/templates/library/base_v1_1_3/metadata.py b/trains/community/jellyfin/1.0.25/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/jellyfin/1.0.24/templates/library/base_v1_1_3/metadata.py rename to trains/community/jellyfin/1.0.25/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/jellyfin/1.0.24/templates/library/base_v1_1_3/network.py b/trains/community/jellyfin/1.0.25/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/jellyfin/1.0.24/templates/library/base_v1_1_3/network.py rename to trains/community/jellyfin/1.0.25/templates/library/base_v1_1_4/network.py diff --git a/trains/community/jellyfin/1.0.25/templates/library/base_v1_1_4/permissions.py b/trains/community/jellyfin/1.0.25/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/community/jellyfin/1.0.25/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/community/jellyfin/1.0.24/templates/library/base_v1_1_3/ports.py b/trains/community/jellyfin/1.0.25/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/jellyfin/1.0.24/templates/library/base_v1_1_3/ports.py rename to trains/community/jellyfin/1.0.25/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/jellyfin/1.0.24/templates/library/base_v1_1_3/postgres.py b/trains/community/jellyfin/1.0.25/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/jellyfin/1.0.24/templates/library/base_v1_1_3/postgres.py rename to trains/community/jellyfin/1.0.25/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/jellyfin/1.0.24/templates/library/base_v1_1_3/redis.py b/trains/community/jellyfin/1.0.25/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/jellyfin/1.0.24/templates/library/base_v1_1_3/redis.py rename to trains/community/jellyfin/1.0.25/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/jellyfin/1.0.24/templates/library/base_v1_1_3/resources.py b/trains/community/jellyfin/1.0.25/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/jellyfin/1.0.24/templates/library/base_v1_1_3/resources.py rename to trains/community/jellyfin/1.0.25/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/jellyfin/1.0.24/templates/library/base_v1_1_3/security.py b/trains/community/jellyfin/1.0.25/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/jellyfin/1.0.24/templates/library/base_v1_1_3/security.py rename to trains/community/jellyfin/1.0.25/templates/library/base_v1_1_4/security.py diff --git a/trains/community/jellyfin/1.0.24/templates/library/base_v1_1_3/storage.py b/trains/community/jellyfin/1.0.25/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/jellyfin/1.0.24/templates/library/base_v1_1_3/storage.py rename to trains/community/jellyfin/1.0.25/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/jellyfin/1.0.24/templates/library/base_v1_1_3/utils.py b/trains/community/jellyfin/1.0.25/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/jellyfin/1.0.24/templates/library/base_v1_1_3/utils.py rename to trains/community/jellyfin/1.0.25/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/jellyfin/1.0.24/templates/test_values/basic-values.yaml b/trains/community/jellyfin/1.0.25/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/jellyfin/1.0.24/templates/test_values/basic-values.yaml rename to trains/community/jellyfin/1.0.25/templates/test_values/basic-values.yaml diff --git a/trains/community/jellyseerr/1.0.18/templates/library/base_v1_1_3/healthchecks.py b/trains/community/jellyseerr/1.0.18/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/community/jellyseerr/1.0.18/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/jellyseerr/1.0.18/templates/library/base_v1_1_3/permissions.py b/trains/community/jellyseerr/1.0.18/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/community/jellyseerr/1.0.18/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/community/jellyseerr/1.0.18/README.md b/trains/community/jellyseerr/1.0.19/README.md similarity index 100% rename from trains/community/jellyseerr/1.0.18/README.md rename to trains/community/jellyseerr/1.0.19/README.md diff --git a/trains/community/jellyseerr/1.0.18/app.yaml b/trains/community/jellyseerr/1.0.19/app.yaml similarity index 87% rename from trains/community/jellyseerr/1.0.18/app.yaml rename to trains/community/jellyseerr/1.0.19/app.yaml index 0072587ff4..cf47b1f917 100644 --- a/trains/community/jellyseerr/1.0.18/app.yaml +++ b/trains/community/jellyseerr/1.0.19/app.yaml @@ -9,8 +9,8 @@ host_mounts: [] icon: https://media.sys.truenas.net/apps/jellyseerr/icons/icon.svg keywords: - media -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -29,4 +29,4 @@ sources: - https://hub.docker.com/r/fallenbagel/jellyseerr title: Jellyseerr train: community -version: 1.0.18 +version: 1.0.19 diff --git a/trains/community/jellyseerr/1.0.18/ix_values.yaml b/trains/community/jellyseerr/1.0.19/ix_values.yaml similarity index 100% rename from trains/community/jellyseerr/1.0.18/ix_values.yaml rename to trains/community/jellyseerr/1.0.19/ix_values.yaml diff --git a/trains/community/jellyseerr/1.0.18/migrations/migrate_from_kubernetes b/trains/community/jellyseerr/1.0.19/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/jellyseerr/1.0.18/migrations/migrate_from_kubernetes rename to trains/community/jellyseerr/1.0.19/migrations/migrate_from_kubernetes diff --git a/trains/community/jellyseerr/1.0.18/migrations/migration_helpers/__init__.py b/trains/community/jellyseerr/1.0.19/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/jellyseerr/1.0.18/migrations/migration_helpers/__init__.py rename to trains/community/jellyseerr/1.0.19/migrations/migration_helpers/__init__.py diff --git a/trains/community/jellyseerr/1.0.18/migrations/migration_helpers/cpu.py b/trains/community/jellyseerr/1.0.19/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/jellyseerr/1.0.18/migrations/migration_helpers/cpu.py rename to trains/community/jellyseerr/1.0.19/migrations/migration_helpers/cpu.py diff --git a/trains/community/jellyseerr/1.0.18/migrations/migration_helpers/dns_config.py b/trains/community/jellyseerr/1.0.19/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/jellyseerr/1.0.18/migrations/migration_helpers/dns_config.py rename to trains/community/jellyseerr/1.0.19/migrations/migration_helpers/dns_config.py diff --git a/trains/community/jellyseerr/1.0.18/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/jellyseerr/1.0.19/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/jellyseerr/1.0.18/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/jellyseerr/1.0.19/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/jellyseerr/1.0.18/migrations/migration_helpers/memory.py b/trains/community/jellyseerr/1.0.19/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/jellyseerr/1.0.18/migrations/migration_helpers/memory.py rename to trains/community/jellyseerr/1.0.19/migrations/migration_helpers/memory.py diff --git a/trains/community/jellyseerr/1.0.18/migrations/migration_helpers/resources.py b/trains/community/jellyseerr/1.0.19/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/jellyseerr/1.0.18/migrations/migration_helpers/resources.py rename to trains/community/jellyseerr/1.0.19/migrations/migration_helpers/resources.py diff --git a/trains/community/jellyseerr/1.0.18/migrations/migration_helpers/storage.py b/trains/community/jellyseerr/1.0.19/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/jellyseerr/1.0.18/migrations/migration_helpers/storage.py rename to trains/community/jellyseerr/1.0.19/migrations/migration_helpers/storage.py diff --git a/trains/community/jellyseerr/1.0.18/questions.yaml b/trains/community/jellyseerr/1.0.19/questions.yaml similarity index 100% rename from trains/community/jellyseerr/1.0.18/questions.yaml rename to trains/community/jellyseerr/1.0.19/questions.yaml diff --git a/trains/community/jellyseerr/1.0.18/templates/docker-compose.yaml b/trains/community/jellyseerr/1.0.19/templates/docker-compose.yaml similarity index 100% rename from trains/community/jellyseerr/1.0.18/templates/docker-compose.yaml rename to trains/community/jellyseerr/1.0.19/templates/docker-compose.yaml diff --git a/trains/community/jellyseerr/1.0.18/templates/library/base_v1_1_3/__init__.py b/trains/community/jellyseerr/1.0.19/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/jellyseerr/1.0.18/templates/library/base_v1_1_3/__init__.py rename to trains/community/jellyseerr/1.0.19/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/jellyseerr/1.0.18/templates/library/base_v1_1_3/environment.py b/trains/community/jellyseerr/1.0.19/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/jellyseerr/1.0.18/templates/library/base_v1_1_3/environment.py rename to trains/community/jellyseerr/1.0.19/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/jellyseerr/1.0.19/templates/library/base_v1_1_4/healthchecks.py b/trains/community/jellyseerr/1.0.19/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/community/jellyseerr/1.0.19/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/jellyseerr/1.0.18/templates/library/base_v1_1_3/mariadb.py b/trains/community/jellyseerr/1.0.19/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/jellyseerr/1.0.18/templates/library/base_v1_1_3/mariadb.py rename to trains/community/jellyseerr/1.0.19/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/jellyseerr/1.0.18/templates/library/base_v1_1_3/metadata.py b/trains/community/jellyseerr/1.0.19/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/jellyseerr/1.0.18/templates/library/base_v1_1_3/metadata.py rename to trains/community/jellyseerr/1.0.19/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/jellyseerr/1.0.18/templates/library/base_v1_1_3/network.py b/trains/community/jellyseerr/1.0.19/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/jellyseerr/1.0.18/templates/library/base_v1_1_3/network.py rename to trains/community/jellyseerr/1.0.19/templates/library/base_v1_1_4/network.py diff --git a/trains/community/jellyseerr/1.0.19/templates/library/base_v1_1_4/permissions.py b/trains/community/jellyseerr/1.0.19/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/community/jellyseerr/1.0.19/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/community/jellyseerr/1.0.18/templates/library/base_v1_1_3/ports.py b/trains/community/jellyseerr/1.0.19/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/jellyseerr/1.0.18/templates/library/base_v1_1_3/ports.py rename to trains/community/jellyseerr/1.0.19/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/jellyseerr/1.0.18/templates/library/base_v1_1_3/postgres.py b/trains/community/jellyseerr/1.0.19/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/jellyseerr/1.0.18/templates/library/base_v1_1_3/postgres.py rename to trains/community/jellyseerr/1.0.19/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/jellyseerr/1.0.18/templates/library/base_v1_1_3/redis.py b/trains/community/jellyseerr/1.0.19/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/jellyseerr/1.0.18/templates/library/base_v1_1_3/redis.py rename to trains/community/jellyseerr/1.0.19/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/jellyseerr/1.0.18/templates/library/base_v1_1_3/resources.py b/trains/community/jellyseerr/1.0.19/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/jellyseerr/1.0.18/templates/library/base_v1_1_3/resources.py rename to trains/community/jellyseerr/1.0.19/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/jellyseerr/1.0.18/templates/library/base_v1_1_3/security.py b/trains/community/jellyseerr/1.0.19/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/jellyseerr/1.0.18/templates/library/base_v1_1_3/security.py rename to trains/community/jellyseerr/1.0.19/templates/library/base_v1_1_4/security.py diff --git a/trains/community/jellyseerr/1.0.18/templates/library/base_v1_1_3/storage.py b/trains/community/jellyseerr/1.0.19/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/jellyseerr/1.0.18/templates/library/base_v1_1_3/storage.py rename to trains/community/jellyseerr/1.0.19/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/jellyseerr/1.0.18/templates/library/base_v1_1_3/utils.py b/trains/community/jellyseerr/1.0.19/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/jellyseerr/1.0.18/templates/library/base_v1_1_3/utils.py rename to trains/community/jellyseerr/1.0.19/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/jellyseerr/1.0.18/templates/test_values/basic-values.yaml b/trains/community/jellyseerr/1.0.19/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/jellyseerr/1.0.18/templates/test_values/basic-values.yaml rename to trains/community/jellyseerr/1.0.19/templates/test_values/basic-values.yaml diff --git a/trains/community/jenkins/1.0.12/templates/library/base_v1_1_3/healthchecks.py b/trains/community/jenkins/1.0.12/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/community/jenkins/1.0.12/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/jenkins/1.0.12/templates/library/base_v1_1_3/permissions.py b/trains/community/jenkins/1.0.12/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/community/jenkins/1.0.12/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/community/jenkins/1.0.12/README.md b/trains/community/jenkins/1.0.13/README.md similarity index 100% rename from trains/community/jenkins/1.0.12/README.md rename to trains/community/jenkins/1.0.13/README.md diff --git a/trains/community/jenkins/1.0.12/app.yaml b/trains/community/jenkins/1.0.13/app.yaml similarity index 87% rename from trains/community/jenkins/1.0.12/app.yaml rename to trains/community/jenkins/1.0.13/app.yaml index b6160ec74d..8646058047 100644 --- a/trains/community/jenkins/1.0.12/app.yaml +++ b/trains/community/jenkins/1.0.13/app.yaml @@ -9,8 +9,8 @@ icon: https://media.sys.truenas.net/apps/jenkins/icons/icon.svg keywords: - automation - ci/cd -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -31,4 +31,4 @@ sources: - https://www.jenkins.io/ title: Jenkins train: community -version: 1.0.12 +version: 1.0.13 diff --git a/trains/community/jenkins/1.0.12/ix_values.yaml b/trains/community/jenkins/1.0.13/ix_values.yaml similarity index 100% rename from trains/community/jenkins/1.0.12/ix_values.yaml rename to trains/community/jenkins/1.0.13/ix_values.yaml diff --git a/trains/community/jenkins/1.0.12/migrations/migrate_from_kubernetes b/trains/community/jenkins/1.0.13/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/jenkins/1.0.12/migrations/migrate_from_kubernetes rename to trains/community/jenkins/1.0.13/migrations/migrate_from_kubernetes diff --git a/trains/community/jenkins/1.0.12/migrations/migration_helpers/__init__.py b/trains/community/jenkins/1.0.13/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/jenkins/1.0.12/migrations/migration_helpers/__init__.py rename to trains/community/jenkins/1.0.13/migrations/migration_helpers/__init__.py diff --git a/trains/community/jenkins/1.0.12/migrations/migration_helpers/cpu.py b/trains/community/jenkins/1.0.13/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/jenkins/1.0.12/migrations/migration_helpers/cpu.py rename to trains/community/jenkins/1.0.13/migrations/migration_helpers/cpu.py diff --git a/trains/community/jenkins/1.0.12/migrations/migration_helpers/dns_config.py b/trains/community/jenkins/1.0.13/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/jenkins/1.0.12/migrations/migration_helpers/dns_config.py rename to trains/community/jenkins/1.0.13/migrations/migration_helpers/dns_config.py diff --git a/trains/community/jenkins/1.0.12/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/jenkins/1.0.13/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/jenkins/1.0.12/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/jenkins/1.0.13/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/jenkins/1.0.12/migrations/migration_helpers/memory.py b/trains/community/jenkins/1.0.13/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/jenkins/1.0.12/migrations/migration_helpers/memory.py rename to trains/community/jenkins/1.0.13/migrations/migration_helpers/memory.py diff --git a/trains/community/jenkins/1.0.12/migrations/migration_helpers/resources.py b/trains/community/jenkins/1.0.13/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/jenkins/1.0.12/migrations/migration_helpers/resources.py rename to trains/community/jenkins/1.0.13/migrations/migration_helpers/resources.py diff --git a/trains/community/jenkins/1.0.12/migrations/migration_helpers/storage.py b/trains/community/jenkins/1.0.13/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/jenkins/1.0.12/migrations/migration_helpers/storage.py rename to trains/community/jenkins/1.0.13/migrations/migration_helpers/storage.py diff --git a/trains/community/jenkins/1.0.12/questions.yaml b/trains/community/jenkins/1.0.13/questions.yaml similarity index 100% rename from trains/community/jenkins/1.0.12/questions.yaml rename to trains/community/jenkins/1.0.13/questions.yaml diff --git a/trains/community/jenkins/1.0.12/templates/docker-compose.yaml b/trains/community/jenkins/1.0.13/templates/docker-compose.yaml similarity index 100% rename from trains/community/jenkins/1.0.12/templates/docker-compose.yaml rename to trains/community/jenkins/1.0.13/templates/docker-compose.yaml diff --git a/trains/community/jenkins/1.0.12/templates/library/base_v1_1_3/__init__.py b/trains/community/jenkins/1.0.13/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/jenkins/1.0.12/templates/library/base_v1_1_3/__init__.py rename to trains/community/jenkins/1.0.13/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/jenkins/1.0.12/templates/library/base_v1_1_3/environment.py b/trains/community/jenkins/1.0.13/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/jenkins/1.0.12/templates/library/base_v1_1_3/environment.py rename to trains/community/jenkins/1.0.13/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/jenkins/1.0.13/templates/library/base_v1_1_4/healthchecks.py b/trains/community/jenkins/1.0.13/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/community/jenkins/1.0.13/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/jenkins/1.0.12/templates/library/base_v1_1_3/mariadb.py b/trains/community/jenkins/1.0.13/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/jenkins/1.0.12/templates/library/base_v1_1_3/mariadb.py rename to trains/community/jenkins/1.0.13/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/jenkins/1.0.12/templates/library/base_v1_1_3/metadata.py b/trains/community/jenkins/1.0.13/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/jenkins/1.0.12/templates/library/base_v1_1_3/metadata.py rename to trains/community/jenkins/1.0.13/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/jenkins/1.0.12/templates/library/base_v1_1_3/network.py b/trains/community/jenkins/1.0.13/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/jenkins/1.0.12/templates/library/base_v1_1_3/network.py rename to trains/community/jenkins/1.0.13/templates/library/base_v1_1_4/network.py diff --git a/trains/community/jenkins/1.0.13/templates/library/base_v1_1_4/permissions.py b/trains/community/jenkins/1.0.13/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/community/jenkins/1.0.13/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/community/jenkins/1.0.12/templates/library/base_v1_1_3/ports.py b/trains/community/jenkins/1.0.13/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/jenkins/1.0.12/templates/library/base_v1_1_3/ports.py rename to trains/community/jenkins/1.0.13/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/jenkins/1.0.12/templates/library/base_v1_1_3/postgres.py b/trains/community/jenkins/1.0.13/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/jenkins/1.0.12/templates/library/base_v1_1_3/postgres.py rename to trains/community/jenkins/1.0.13/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/jenkins/1.0.12/templates/library/base_v1_1_3/redis.py b/trains/community/jenkins/1.0.13/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/jenkins/1.0.12/templates/library/base_v1_1_3/redis.py rename to trains/community/jenkins/1.0.13/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/jenkins/1.0.12/templates/library/base_v1_1_3/resources.py b/trains/community/jenkins/1.0.13/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/jenkins/1.0.12/templates/library/base_v1_1_3/resources.py rename to trains/community/jenkins/1.0.13/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/jenkins/1.0.12/templates/library/base_v1_1_3/security.py b/trains/community/jenkins/1.0.13/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/jenkins/1.0.12/templates/library/base_v1_1_3/security.py rename to trains/community/jenkins/1.0.13/templates/library/base_v1_1_4/security.py diff --git a/trains/community/jenkins/1.0.12/templates/library/base_v1_1_3/storage.py b/trains/community/jenkins/1.0.13/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/jenkins/1.0.12/templates/library/base_v1_1_3/storage.py rename to trains/community/jenkins/1.0.13/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/jenkins/1.0.12/templates/library/base_v1_1_3/utils.py b/trains/community/jenkins/1.0.13/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/jenkins/1.0.12/templates/library/base_v1_1_3/utils.py rename to trains/community/jenkins/1.0.13/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/jenkins/1.0.12/templates/test_values/basic-values.yaml b/trains/community/jenkins/1.0.13/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/jenkins/1.0.12/templates/test_values/basic-values.yaml rename to trains/community/jenkins/1.0.13/templates/test_values/basic-values.yaml diff --git a/trains/community/jenkins/1.0.12/templates/test_values/https-values.yaml b/trains/community/jenkins/1.0.13/templates/test_values/https-values.yaml similarity index 100% rename from trains/community/jenkins/1.0.12/templates/test_values/https-values.yaml rename to trains/community/jenkins/1.0.13/templates/test_values/https-values.yaml diff --git a/trains/community/joplin/1.1.10/templates/library/base_v1_1_3/healthchecks.py b/trains/community/joplin/1.1.10/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/community/joplin/1.1.10/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/joplin/1.1.10/templates/library/base_v1_1_3/permissions.py b/trains/community/joplin/1.1.10/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/community/joplin/1.1.10/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/community/joplin/1.1.10/README.md b/trains/community/joplin/1.1.11/README.md similarity index 100% rename from trains/community/joplin/1.1.10/README.md rename to trains/community/joplin/1.1.11/README.md diff --git a/trains/community/joplin/1.1.10/app.yaml b/trains/community/joplin/1.1.11/app.yaml similarity index 89% rename from trains/community/joplin/1.1.10/app.yaml rename to trains/community/joplin/1.1.11/app.yaml index 81e170dc1a..b5d5ec75a9 100644 --- a/trains/community/joplin/1.1.10/app.yaml +++ b/trains/community/joplin/1.1.11/app.yaml @@ -9,8 +9,8 @@ host_mounts: [] icon: https://media.sys.truenas.net/apps/joplin/icons/icon.png keywords: - notes -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -36,4 +36,4 @@ sources: - https://hub.docker.com/r/joplin/server/ title: Joplin train: community -version: 1.1.10 +version: 1.1.11 diff --git a/trains/community/joplin/1.1.10/ix_values.yaml b/trains/community/joplin/1.1.11/ix_values.yaml similarity index 100% rename from trains/community/joplin/1.1.10/ix_values.yaml rename to trains/community/joplin/1.1.11/ix_values.yaml diff --git a/trains/community/joplin/1.1.10/migrations/migrate_from_kubernetes b/trains/community/joplin/1.1.11/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/joplin/1.1.10/migrations/migrate_from_kubernetes rename to trains/community/joplin/1.1.11/migrations/migrate_from_kubernetes diff --git a/trains/community/joplin/1.1.10/migrations/migration_helpers/__init__.py b/trains/community/joplin/1.1.11/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/joplin/1.1.10/migrations/migration_helpers/__init__.py rename to trains/community/joplin/1.1.11/migrations/migration_helpers/__init__.py diff --git a/trains/community/joplin/1.1.10/migrations/migration_helpers/cpu.py b/trains/community/joplin/1.1.11/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/joplin/1.1.10/migrations/migration_helpers/cpu.py rename to trains/community/joplin/1.1.11/migrations/migration_helpers/cpu.py diff --git a/trains/community/joplin/1.1.10/migrations/migration_helpers/dns_config.py b/trains/community/joplin/1.1.11/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/joplin/1.1.10/migrations/migration_helpers/dns_config.py rename to trains/community/joplin/1.1.11/migrations/migration_helpers/dns_config.py diff --git a/trains/community/joplin/1.1.10/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/joplin/1.1.11/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/joplin/1.1.10/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/joplin/1.1.11/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/joplin/1.1.10/migrations/migration_helpers/memory.py b/trains/community/joplin/1.1.11/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/joplin/1.1.10/migrations/migration_helpers/memory.py rename to trains/community/joplin/1.1.11/migrations/migration_helpers/memory.py diff --git a/trains/community/joplin/1.1.10/migrations/migration_helpers/resources.py b/trains/community/joplin/1.1.11/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/joplin/1.1.10/migrations/migration_helpers/resources.py rename to trains/community/joplin/1.1.11/migrations/migration_helpers/resources.py diff --git a/trains/community/joplin/1.1.10/migrations/migration_helpers/storage.py b/trains/community/joplin/1.1.11/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/joplin/1.1.10/migrations/migration_helpers/storage.py rename to trains/community/joplin/1.1.11/migrations/migration_helpers/storage.py diff --git a/trains/community/joplin/1.1.10/questions.yaml b/trains/community/joplin/1.1.11/questions.yaml similarity index 100% rename from trains/community/joplin/1.1.10/questions.yaml rename to trains/community/joplin/1.1.11/questions.yaml diff --git a/trains/community/joplin/1.1.10/templates/docker-compose.yaml b/trains/community/joplin/1.1.11/templates/docker-compose.yaml similarity index 98% rename from trains/community/joplin/1.1.10/templates/docker-compose.yaml rename to trains/community/joplin/1.1.11/templates/docker-compose.yaml index ff39595846..a7c61afdd6 100644 --- a/trains/community/joplin/1.1.10/templates/docker-compose.yaml +++ b/trains/community/joplin/1.1.11/templates/docker-compose.yaml @@ -58,7 +58,7 @@ services: {% if values.network.dns_opts %} dns_opt: {{ ix_lib.base.network.dns_opts(values.network.dns_opts) | tojson }} {% endif %} - {% set test = ix_lib.base.healthchecks.http_test(port=values.network.web_port, path="/api/ping") %} + {% set test = ix_lib.base.healthchecks.tcp_test(port=values.network.web_port) %} healthcheck: {{ ix_lib.base.healthchecks.check_health(test) | tojson }} environment: {{ ix_lib.base.environment.envs(app={ "APP_PORT": values.network.web_port, diff --git a/trains/community/joplin/1.1.10/templates/library/base_v1_1_3/__init__.py b/trains/community/joplin/1.1.11/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/joplin/1.1.10/templates/library/base_v1_1_3/__init__.py rename to trains/community/joplin/1.1.11/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/joplin/1.1.10/templates/library/base_v1_1_3/environment.py b/trains/community/joplin/1.1.11/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/joplin/1.1.10/templates/library/base_v1_1_3/environment.py rename to trains/community/joplin/1.1.11/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/joplin/1.1.11/templates/library/base_v1_1_4/healthchecks.py b/trains/community/joplin/1.1.11/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/community/joplin/1.1.11/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/joplin/1.1.10/templates/library/base_v1_1_3/mariadb.py b/trains/community/joplin/1.1.11/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/joplin/1.1.10/templates/library/base_v1_1_3/mariadb.py rename to trains/community/joplin/1.1.11/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/joplin/1.1.10/templates/library/base_v1_1_3/metadata.py b/trains/community/joplin/1.1.11/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/joplin/1.1.10/templates/library/base_v1_1_3/metadata.py rename to trains/community/joplin/1.1.11/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/joplin/1.1.10/templates/library/base_v1_1_3/network.py b/trains/community/joplin/1.1.11/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/joplin/1.1.10/templates/library/base_v1_1_3/network.py rename to trains/community/joplin/1.1.11/templates/library/base_v1_1_4/network.py diff --git a/trains/community/joplin/1.1.11/templates/library/base_v1_1_4/permissions.py b/trains/community/joplin/1.1.11/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/community/joplin/1.1.11/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/community/joplin/1.1.10/templates/library/base_v1_1_3/ports.py b/trains/community/joplin/1.1.11/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/joplin/1.1.10/templates/library/base_v1_1_3/ports.py rename to trains/community/joplin/1.1.11/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/joplin/1.1.10/templates/library/base_v1_1_3/postgres.py b/trains/community/joplin/1.1.11/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/joplin/1.1.10/templates/library/base_v1_1_3/postgres.py rename to trains/community/joplin/1.1.11/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/joplin/1.1.10/templates/library/base_v1_1_3/redis.py b/trains/community/joplin/1.1.11/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/joplin/1.1.10/templates/library/base_v1_1_3/redis.py rename to trains/community/joplin/1.1.11/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/joplin/1.1.10/templates/library/base_v1_1_3/resources.py b/trains/community/joplin/1.1.11/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/joplin/1.1.10/templates/library/base_v1_1_3/resources.py rename to trains/community/joplin/1.1.11/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/joplin/1.1.10/templates/library/base_v1_1_3/security.py b/trains/community/joplin/1.1.11/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/joplin/1.1.10/templates/library/base_v1_1_3/security.py rename to trains/community/joplin/1.1.11/templates/library/base_v1_1_4/security.py diff --git a/trains/community/joplin/1.1.10/templates/library/base_v1_1_3/storage.py b/trains/community/joplin/1.1.11/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/joplin/1.1.10/templates/library/base_v1_1_3/storage.py rename to trains/community/joplin/1.1.11/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/joplin/1.1.10/templates/library/base_v1_1_3/utils.py b/trains/community/joplin/1.1.11/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/joplin/1.1.10/templates/library/base_v1_1_3/utils.py rename to trains/community/joplin/1.1.11/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/joplin/1.1.10/templates/test_values/basic-values.yaml b/trains/community/joplin/1.1.11/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/joplin/1.1.10/templates/test_values/basic-values.yaml rename to trains/community/joplin/1.1.11/templates/test_values/basic-values.yaml diff --git a/trains/community/kapowarr/1.0.18/templates/library/base_v1_1_3/healthchecks.py b/trains/community/kapowarr/1.0.18/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/community/kapowarr/1.0.18/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/kapowarr/1.0.18/templates/library/base_v1_1_3/permissions.py b/trains/community/kapowarr/1.0.18/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/community/kapowarr/1.0.18/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/community/kapowarr/1.0.18/README.md b/trains/community/kapowarr/1.0.19/README.md similarity index 100% rename from trains/community/kapowarr/1.0.18/README.md rename to trains/community/kapowarr/1.0.19/README.md diff --git a/trains/community/kapowarr/1.0.18/app.yaml b/trains/community/kapowarr/1.0.19/app.yaml similarity index 87% rename from trains/community/kapowarr/1.0.18/app.yaml rename to trains/community/kapowarr/1.0.19/app.yaml index fbdb0379c7..bbeb5c3bc4 100644 --- a/trains/community/kapowarr/1.0.18/app.yaml +++ b/trains/community/kapowarr/1.0.19/app.yaml @@ -10,8 +10,8 @@ icon: https://media.sys.truenas.net/apps/kapowarr/icons/icon.svg keywords: - comic - media -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -31,4 +31,4 @@ sources: - https://github.com/Casvt/Kapowarr title: Kapowarr train: community -version: 1.0.18 +version: 1.0.19 diff --git a/trains/community/kapowarr/1.0.18/ix_values.yaml b/trains/community/kapowarr/1.0.19/ix_values.yaml similarity index 100% rename from trains/community/kapowarr/1.0.18/ix_values.yaml rename to trains/community/kapowarr/1.0.19/ix_values.yaml diff --git a/trains/community/kapowarr/1.0.18/migrations/migrate_from_kubernetes b/trains/community/kapowarr/1.0.19/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/kapowarr/1.0.18/migrations/migrate_from_kubernetes rename to trains/community/kapowarr/1.0.19/migrations/migrate_from_kubernetes diff --git a/trains/community/kapowarr/1.0.18/migrations/migration_helpers/__init__.py b/trains/community/kapowarr/1.0.19/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/kapowarr/1.0.18/migrations/migration_helpers/__init__.py rename to trains/community/kapowarr/1.0.19/migrations/migration_helpers/__init__.py diff --git a/trains/community/kapowarr/1.0.18/migrations/migration_helpers/cpu.py b/trains/community/kapowarr/1.0.19/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/kapowarr/1.0.18/migrations/migration_helpers/cpu.py rename to trains/community/kapowarr/1.0.19/migrations/migration_helpers/cpu.py diff --git a/trains/community/kapowarr/1.0.18/migrations/migration_helpers/dns_config.py b/trains/community/kapowarr/1.0.19/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/kapowarr/1.0.18/migrations/migration_helpers/dns_config.py rename to trains/community/kapowarr/1.0.19/migrations/migration_helpers/dns_config.py diff --git a/trains/community/kapowarr/1.0.18/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/kapowarr/1.0.19/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/kapowarr/1.0.18/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/kapowarr/1.0.19/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/kapowarr/1.0.18/migrations/migration_helpers/memory.py b/trains/community/kapowarr/1.0.19/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/kapowarr/1.0.18/migrations/migration_helpers/memory.py rename to trains/community/kapowarr/1.0.19/migrations/migration_helpers/memory.py diff --git a/trains/community/kapowarr/1.0.18/migrations/migration_helpers/resources.py b/trains/community/kapowarr/1.0.19/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/kapowarr/1.0.18/migrations/migration_helpers/resources.py rename to trains/community/kapowarr/1.0.19/migrations/migration_helpers/resources.py diff --git a/trains/community/kapowarr/1.0.18/migrations/migration_helpers/storage.py b/trains/community/kapowarr/1.0.19/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/kapowarr/1.0.18/migrations/migration_helpers/storage.py rename to trains/community/kapowarr/1.0.19/migrations/migration_helpers/storage.py diff --git a/trains/community/kapowarr/1.0.18/questions.yaml b/trains/community/kapowarr/1.0.19/questions.yaml similarity index 100% rename from trains/community/kapowarr/1.0.18/questions.yaml rename to trains/community/kapowarr/1.0.19/questions.yaml diff --git a/trains/community/kapowarr/1.0.18/templates/docker-compose.yaml b/trains/community/kapowarr/1.0.19/templates/docker-compose.yaml similarity index 100% rename from trains/community/kapowarr/1.0.18/templates/docker-compose.yaml rename to trains/community/kapowarr/1.0.19/templates/docker-compose.yaml diff --git a/trains/community/kapowarr/1.0.18/templates/library/base_v1_1_3/__init__.py b/trains/community/kapowarr/1.0.19/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/kapowarr/1.0.18/templates/library/base_v1_1_3/__init__.py rename to trains/community/kapowarr/1.0.19/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/kapowarr/1.0.18/templates/library/base_v1_1_3/environment.py b/trains/community/kapowarr/1.0.19/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/kapowarr/1.0.18/templates/library/base_v1_1_3/environment.py rename to trains/community/kapowarr/1.0.19/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/kapowarr/1.0.19/templates/library/base_v1_1_4/healthchecks.py b/trains/community/kapowarr/1.0.19/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/community/kapowarr/1.0.19/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/kapowarr/1.0.18/templates/library/base_v1_1_3/mariadb.py b/trains/community/kapowarr/1.0.19/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/kapowarr/1.0.18/templates/library/base_v1_1_3/mariadb.py rename to trains/community/kapowarr/1.0.19/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/kapowarr/1.0.18/templates/library/base_v1_1_3/metadata.py b/trains/community/kapowarr/1.0.19/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/kapowarr/1.0.18/templates/library/base_v1_1_3/metadata.py rename to trains/community/kapowarr/1.0.19/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/kapowarr/1.0.18/templates/library/base_v1_1_3/network.py b/trains/community/kapowarr/1.0.19/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/kapowarr/1.0.18/templates/library/base_v1_1_3/network.py rename to trains/community/kapowarr/1.0.19/templates/library/base_v1_1_4/network.py diff --git a/trains/community/kapowarr/1.0.19/templates/library/base_v1_1_4/permissions.py b/trains/community/kapowarr/1.0.19/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/community/kapowarr/1.0.19/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/community/kapowarr/1.0.18/templates/library/base_v1_1_3/ports.py b/trains/community/kapowarr/1.0.19/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/kapowarr/1.0.18/templates/library/base_v1_1_3/ports.py rename to trains/community/kapowarr/1.0.19/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/kapowarr/1.0.18/templates/library/base_v1_1_3/postgres.py b/trains/community/kapowarr/1.0.19/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/kapowarr/1.0.18/templates/library/base_v1_1_3/postgres.py rename to trains/community/kapowarr/1.0.19/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/kapowarr/1.0.18/templates/library/base_v1_1_3/redis.py b/trains/community/kapowarr/1.0.19/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/kapowarr/1.0.18/templates/library/base_v1_1_3/redis.py rename to trains/community/kapowarr/1.0.19/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/kapowarr/1.0.18/templates/library/base_v1_1_3/resources.py b/trains/community/kapowarr/1.0.19/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/kapowarr/1.0.18/templates/library/base_v1_1_3/resources.py rename to trains/community/kapowarr/1.0.19/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/kapowarr/1.0.18/templates/library/base_v1_1_3/security.py b/trains/community/kapowarr/1.0.19/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/kapowarr/1.0.18/templates/library/base_v1_1_3/security.py rename to trains/community/kapowarr/1.0.19/templates/library/base_v1_1_4/security.py diff --git a/trains/community/kapowarr/1.0.18/templates/library/base_v1_1_3/storage.py b/trains/community/kapowarr/1.0.19/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/kapowarr/1.0.18/templates/library/base_v1_1_3/storage.py rename to trains/community/kapowarr/1.0.19/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/kapowarr/1.0.18/templates/library/base_v1_1_3/utils.py b/trains/community/kapowarr/1.0.19/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/kapowarr/1.0.18/templates/library/base_v1_1_3/utils.py rename to trains/community/kapowarr/1.0.19/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/kapowarr/1.0.18/templates/test_values/basic-values.yaml b/trains/community/kapowarr/1.0.19/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/kapowarr/1.0.18/templates/test_values/basic-values.yaml rename to trains/community/kapowarr/1.0.19/templates/test_values/basic-values.yaml diff --git a/trains/community/kavita/1.0.18/templates/library/base_v1_1_3/healthchecks.py b/trains/community/kavita/1.0.18/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/community/kavita/1.0.18/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/kavita/1.0.18/templates/library/base_v1_1_3/permissions.py b/trains/community/kavita/1.0.18/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/community/kavita/1.0.18/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/community/kavita/1.0.18/README.md b/trains/community/kavita/1.0.19/README.md similarity index 100% rename from trains/community/kavita/1.0.18/README.md rename to trains/community/kavita/1.0.19/README.md diff --git a/trains/community/kavita/1.0.18/app.yaml b/trains/community/kavita/1.0.19/app.yaml similarity index 92% rename from trains/community/kavita/1.0.18/app.yaml rename to trains/community/kavita/1.0.19/app.yaml index 896fd303de..74660b2d72 100644 --- a/trains/community/kavita/1.0.18/app.yaml +++ b/trains/community/kavita/1.0.19/app.yaml @@ -20,8 +20,8 @@ icon: https://media.sys.truenas.net/apps/kavita/icons/icon.png keywords: - ebook - manga -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -44,4 +44,4 @@ sources: - https://www.kavitareader.com title: Kavita train: community -version: 1.0.18 +version: 1.0.19 diff --git a/trains/community/kavita/1.0.18/ix_values.yaml b/trains/community/kavita/1.0.19/ix_values.yaml similarity index 100% rename from trains/community/kavita/1.0.18/ix_values.yaml rename to trains/community/kavita/1.0.19/ix_values.yaml diff --git a/trains/community/kavita/1.0.18/migrations/migrate_from_kubernetes b/trains/community/kavita/1.0.19/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/kavita/1.0.18/migrations/migrate_from_kubernetes rename to trains/community/kavita/1.0.19/migrations/migrate_from_kubernetes diff --git a/trains/community/kavita/1.0.18/migrations/migration_helpers/__init__.py b/trains/community/kavita/1.0.19/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/kavita/1.0.18/migrations/migration_helpers/__init__.py rename to trains/community/kavita/1.0.19/migrations/migration_helpers/__init__.py diff --git a/trains/community/kavita/1.0.18/migrations/migration_helpers/cpu.py b/trains/community/kavita/1.0.19/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/kavita/1.0.18/migrations/migration_helpers/cpu.py rename to trains/community/kavita/1.0.19/migrations/migration_helpers/cpu.py diff --git a/trains/community/kavita/1.0.18/migrations/migration_helpers/dns_config.py b/trains/community/kavita/1.0.19/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/kavita/1.0.18/migrations/migration_helpers/dns_config.py rename to trains/community/kavita/1.0.19/migrations/migration_helpers/dns_config.py diff --git a/trains/community/kavita/1.0.18/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/kavita/1.0.19/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/kavita/1.0.18/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/kavita/1.0.19/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/kavita/1.0.18/migrations/migration_helpers/memory.py b/trains/community/kavita/1.0.19/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/kavita/1.0.18/migrations/migration_helpers/memory.py rename to trains/community/kavita/1.0.19/migrations/migration_helpers/memory.py diff --git a/trains/community/kavita/1.0.18/migrations/migration_helpers/resources.py b/trains/community/kavita/1.0.19/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/kavita/1.0.18/migrations/migration_helpers/resources.py rename to trains/community/kavita/1.0.19/migrations/migration_helpers/resources.py diff --git a/trains/community/kavita/1.0.18/migrations/migration_helpers/storage.py b/trains/community/kavita/1.0.19/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/kavita/1.0.18/migrations/migration_helpers/storage.py rename to trains/community/kavita/1.0.19/migrations/migration_helpers/storage.py diff --git a/trains/community/kavita/1.0.18/questions.yaml b/trains/community/kavita/1.0.19/questions.yaml similarity index 100% rename from trains/community/kavita/1.0.18/questions.yaml rename to trains/community/kavita/1.0.19/questions.yaml diff --git a/trains/community/kavita/1.0.18/templates/docker-compose.yaml b/trains/community/kavita/1.0.19/templates/docker-compose.yaml similarity index 100% rename from trains/community/kavita/1.0.18/templates/docker-compose.yaml rename to trains/community/kavita/1.0.19/templates/docker-compose.yaml diff --git a/trains/community/kavita/1.0.18/templates/library/base_v1_1_3/__init__.py b/trains/community/kavita/1.0.19/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/kavita/1.0.18/templates/library/base_v1_1_3/__init__.py rename to trains/community/kavita/1.0.19/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/kavita/1.0.18/templates/library/base_v1_1_3/environment.py b/trains/community/kavita/1.0.19/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/kavita/1.0.18/templates/library/base_v1_1_3/environment.py rename to trains/community/kavita/1.0.19/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/kavita/1.0.19/templates/library/base_v1_1_4/healthchecks.py b/trains/community/kavita/1.0.19/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/community/kavita/1.0.19/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/kavita/1.0.18/templates/library/base_v1_1_3/mariadb.py b/trains/community/kavita/1.0.19/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/kavita/1.0.18/templates/library/base_v1_1_3/mariadb.py rename to trains/community/kavita/1.0.19/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/kavita/1.0.18/templates/library/base_v1_1_3/metadata.py b/trains/community/kavita/1.0.19/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/kavita/1.0.18/templates/library/base_v1_1_3/metadata.py rename to trains/community/kavita/1.0.19/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/kavita/1.0.18/templates/library/base_v1_1_3/network.py b/trains/community/kavita/1.0.19/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/kavita/1.0.18/templates/library/base_v1_1_3/network.py rename to trains/community/kavita/1.0.19/templates/library/base_v1_1_4/network.py diff --git a/trains/community/kavita/1.0.19/templates/library/base_v1_1_4/permissions.py b/trains/community/kavita/1.0.19/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/community/kavita/1.0.19/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/community/kavita/1.0.18/templates/library/base_v1_1_3/ports.py b/trains/community/kavita/1.0.19/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/kavita/1.0.18/templates/library/base_v1_1_3/ports.py rename to trains/community/kavita/1.0.19/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/kavita/1.0.18/templates/library/base_v1_1_3/postgres.py b/trains/community/kavita/1.0.19/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/kavita/1.0.18/templates/library/base_v1_1_3/postgres.py rename to trains/community/kavita/1.0.19/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/kavita/1.0.18/templates/library/base_v1_1_3/redis.py b/trains/community/kavita/1.0.19/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/kavita/1.0.18/templates/library/base_v1_1_3/redis.py rename to trains/community/kavita/1.0.19/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/kavita/1.0.18/templates/library/base_v1_1_3/resources.py b/trains/community/kavita/1.0.19/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/kavita/1.0.18/templates/library/base_v1_1_3/resources.py rename to trains/community/kavita/1.0.19/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/kavita/1.0.18/templates/library/base_v1_1_3/security.py b/trains/community/kavita/1.0.19/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/kavita/1.0.18/templates/library/base_v1_1_3/security.py rename to trains/community/kavita/1.0.19/templates/library/base_v1_1_4/security.py diff --git a/trains/community/kavita/1.0.18/templates/library/base_v1_1_3/storage.py b/trains/community/kavita/1.0.19/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/kavita/1.0.18/templates/library/base_v1_1_3/storage.py rename to trains/community/kavita/1.0.19/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/kavita/1.0.18/templates/library/base_v1_1_3/utils.py b/trains/community/kavita/1.0.19/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/kavita/1.0.18/templates/library/base_v1_1_3/utils.py rename to trains/community/kavita/1.0.19/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/kavita/1.0.18/templates/test_values/basic-values.yaml b/trains/community/kavita/1.0.19/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/kavita/1.0.18/templates/test_values/basic-values.yaml rename to trains/community/kavita/1.0.19/templates/test_values/basic-values.yaml diff --git a/trains/community/komga/1.1.13/templates/library/base_v1_1_3/healthchecks.py b/trains/community/komga/1.1.13/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/community/komga/1.1.13/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/komga/1.1.13/templates/library/base_v1_1_3/permissions.py b/trains/community/komga/1.1.13/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/community/komga/1.1.13/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/community/komga/1.1.13/README.md b/trains/community/komga/1.1.14/README.md similarity index 100% rename from trains/community/komga/1.1.13/README.md rename to trains/community/komga/1.1.14/README.md diff --git a/trains/community/komga/1.1.13/app.yaml b/trains/community/komga/1.1.14/app.yaml similarity index 86% rename from trains/community/komga/1.1.13/app.yaml rename to trains/community/komga/1.1.14/app.yaml index 403369718b..1972899fda 100644 --- a/trains/community/komga/1.1.13/app.yaml +++ b/trains/community/komga/1.1.14/app.yaml @@ -10,8 +10,8 @@ keywords: - media - comics - mangas -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -31,4 +31,4 @@ sources: - https://hub.docker.com/r/gotson/komga title: Komga train: community -version: 1.1.13 +version: 1.1.14 diff --git a/trains/community/komga/1.1.13/ix_values.yaml b/trains/community/komga/1.1.14/ix_values.yaml similarity index 100% rename from trains/community/komga/1.1.13/ix_values.yaml rename to trains/community/komga/1.1.14/ix_values.yaml diff --git a/trains/community/komga/1.1.13/migrations/migrate_from_kubernetes b/trains/community/komga/1.1.14/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/komga/1.1.13/migrations/migrate_from_kubernetes rename to trains/community/komga/1.1.14/migrations/migrate_from_kubernetes diff --git a/trains/community/komga/1.1.13/migrations/migration_helpers/__init__.py b/trains/community/komga/1.1.14/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/komga/1.1.13/migrations/migration_helpers/__init__.py rename to trains/community/komga/1.1.14/migrations/migration_helpers/__init__.py diff --git a/trains/community/komga/1.1.13/migrations/migration_helpers/cpu.py b/trains/community/komga/1.1.14/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/komga/1.1.13/migrations/migration_helpers/cpu.py rename to trains/community/komga/1.1.14/migrations/migration_helpers/cpu.py diff --git a/trains/community/komga/1.1.13/migrations/migration_helpers/dns_config.py b/trains/community/komga/1.1.14/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/komga/1.1.13/migrations/migration_helpers/dns_config.py rename to trains/community/komga/1.1.14/migrations/migration_helpers/dns_config.py diff --git a/trains/community/komga/1.1.13/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/komga/1.1.14/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/komga/1.1.13/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/komga/1.1.14/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/komga/1.1.13/migrations/migration_helpers/memory.py b/trains/community/komga/1.1.14/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/komga/1.1.13/migrations/migration_helpers/memory.py rename to trains/community/komga/1.1.14/migrations/migration_helpers/memory.py diff --git a/trains/community/komga/1.1.13/migrations/migration_helpers/resources.py b/trains/community/komga/1.1.14/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/komga/1.1.13/migrations/migration_helpers/resources.py rename to trains/community/komga/1.1.14/migrations/migration_helpers/resources.py diff --git a/trains/community/komga/1.1.13/migrations/migration_helpers/storage.py b/trains/community/komga/1.1.14/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/komga/1.1.13/migrations/migration_helpers/storage.py rename to trains/community/komga/1.1.14/migrations/migration_helpers/storage.py diff --git a/trains/community/komga/1.1.13/questions.yaml b/trains/community/komga/1.1.14/questions.yaml similarity index 100% rename from trains/community/komga/1.1.13/questions.yaml rename to trains/community/komga/1.1.14/questions.yaml diff --git a/trains/community/komga/1.1.13/templates/docker-compose.yaml b/trains/community/komga/1.1.14/templates/docker-compose.yaml similarity index 100% rename from trains/community/komga/1.1.13/templates/docker-compose.yaml rename to trains/community/komga/1.1.14/templates/docker-compose.yaml diff --git a/trains/community/komga/1.1.13/templates/library/base_v1_1_3/__init__.py b/trains/community/komga/1.1.14/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/komga/1.1.13/templates/library/base_v1_1_3/__init__.py rename to trains/community/komga/1.1.14/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/komga/1.1.13/templates/library/base_v1_1_3/environment.py b/trains/community/komga/1.1.14/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/komga/1.1.13/templates/library/base_v1_1_3/environment.py rename to trains/community/komga/1.1.14/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/komga/1.1.14/templates/library/base_v1_1_4/healthchecks.py b/trains/community/komga/1.1.14/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/community/komga/1.1.14/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/komga/1.1.13/templates/library/base_v1_1_3/mariadb.py b/trains/community/komga/1.1.14/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/komga/1.1.13/templates/library/base_v1_1_3/mariadb.py rename to trains/community/komga/1.1.14/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/komga/1.1.13/templates/library/base_v1_1_3/metadata.py b/trains/community/komga/1.1.14/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/komga/1.1.13/templates/library/base_v1_1_3/metadata.py rename to trains/community/komga/1.1.14/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/komga/1.1.13/templates/library/base_v1_1_3/network.py b/trains/community/komga/1.1.14/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/komga/1.1.13/templates/library/base_v1_1_3/network.py rename to trains/community/komga/1.1.14/templates/library/base_v1_1_4/network.py diff --git a/trains/community/komga/1.1.14/templates/library/base_v1_1_4/permissions.py b/trains/community/komga/1.1.14/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/community/komga/1.1.14/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/community/komga/1.1.13/templates/library/base_v1_1_3/ports.py b/trains/community/komga/1.1.14/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/komga/1.1.13/templates/library/base_v1_1_3/ports.py rename to trains/community/komga/1.1.14/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/komga/1.1.13/templates/library/base_v1_1_3/postgres.py b/trains/community/komga/1.1.14/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/komga/1.1.13/templates/library/base_v1_1_3/postgres.py rename to trains/community/komga/1.1.14/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/komga/1.1.13/templates/library/base_v1_1_3/redis.py b/trains/community/komga/1.1.14/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/komga/1.1.13/templates/library/base_v1_1_3/redis.py rename to trains/community/komga/1.1.14/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/komga/1.1.13/templates/library/base_v1_1_3/resources.py b/trains/community/komga/1.1.14/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/komga/1.1.13/templates/library/base_v1_1_3/resources.py rename to trains/community/komga/1.1.14/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/komga/1.1.13/templates/library/base_v1_1_3/security.py b/trains/community/komga/1.1.14/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/komga/1.1.13/templates/library/base_v1_1_3/security.py rename to trains/community/komga/1.1.14/templates/library/base_v1_1_4/security.py diff --git a/trains/community/komga/1.1.13/templates/library/base_v1_1_3/storage.py b/trains/community/komga/1.1.14/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/komga/1.1.13/templates/library/base_v1_1_3/storage.py rename to trains/community/komga/1.1.14/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/komga/1.1.13/templates/library/base_v1_1_3/utils.py b/trains/community/komga/1.1.14/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/komga/1.1.13/templates/library/base_v1_1_3/utils.py rename to trains/community/komga/1.1.14/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/komga/1.1.13/templates/test_values/basic-values.yaml b/trains/community/komga/1.1.14/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/komga/1.1.13/templates/test_values/basic-values.yaml rename to trains/community/komga/1.1.14/templates/test_values/basic-values.yaml diff --git a/trains/community/lidarr/1.1.11/templates/library/base_v1_1_3/healthchecks.py b/trains/community/lidarr/1.1.11/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/community/lidarr/1.1.11/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/lidarr/1.1.11/templates/library/base_v1_1_3/permissions.py b/trains/community/lidarr/1.1.11/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/community/lidarr/1.1.11/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/community/lidarr/1.1.11/README.md b/trains/community/lidarr/1.1.12/README.md similarity index 100% rename from trains/community/lidarr/1.1.11/README.md rename to trains/community/lidarr/1.1.12/README.md diff --git a/trains/community/lidarr/1.1.11/app.yaml b/trains/community/lidarr/1.1.12/app.yaml similarity index 88% rename from trains/community/lidarr/1.1.11/app.yaml rename to trains/community/lidarr/1.1.12/app.yaml index f28e079ee1..f424e00a71 100644 --- a/trains/community/lidarr/1.1.11/app.yaml +++ b/trains/community/lidarr/1.1.12/app.yaml @@ -9,8 +9,8 @@ icon: https://media.sys.truenas.net/apps/lidarr/icons/icon.png keywords: - media - music -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -31,4 +31,4 @@ sources: - https://github.com/Lidarr/Lidarr title: Lidarr train: community -version: 1.1.11 +version: 1.1.12 diff --git a/trains/community/lidarr/1.1.11/ix_values.yaml b/trains/community/lidarr/1.1.12/ix_values.yaml similarity index 100% rename from trains/community/lidarr/1.1.11/ix_values.yaml rename to trains/community/lidarr/1.1.12/ix_values.yaml diff --git a/trains/community/lidarr/1.1.11/migrations/migrate_from_kubernetes b/trains/community/lidarr/1.1.12/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/lidarr/1.1.11/migrations/migrate_from_kubernetes rename to trains/community/lidarr/1.1.12/migrations/migrate_from_kubernetes diff --git a/trains/community/lidarr/1.1.11/migrations/migration_helpers/__init__.py b/trains/community/lidarr/1.1.12/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/lidarr/1.1.11/migrations/migration_helpers/__init__.py rename to trains/community/lidarr/1.1.12/migrations/migration_helpers/__init__.py diff --git a/trains/community/lidarr/1.1.11/migrations/migration_helpers/cpu.py b/trains/community/lidarr/1.1.12/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/lidarr/1.1.11/migrations/migration_helpers/cpu.py rename to trains/community/lidarr/1.1.12/migrations/migration_helpers/cpu.py diff --git a/trains/community/lidarr/1.1.11/migrations/migration_helpers/dns_config.py b/trains/community/lidarr/1.1.12/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/lidarr/1.1.11/migrations/migration_helpers/dns_config.py rename to trains/community/lidarr/1.1.12/migrations/migration_helpers/dns_config.py diff --git a/trains/community/lidarr/1.1.11/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/lidarr/1.1.12/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/lidarr/1.1.11/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/lidarr/1.1.12/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/lidarr/1.1.11/migrations/migration_helpers/memory.py b/trains/community/lidarr/1.1.12/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/lidarr/1.1.11/migrations/migration_helpers/memory.py rename to trains/community/lidarr/1.1.12/migrations/migration_helpers/memory.py diff --git a/trains/community/lidarr/1.1.11/migrations/migration_helpers/resources.py b/trains/community/lidarr/1.1.12/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/lidarr/1.1.11/migrations/migration_helpers/resources.py rename to trains/community/lidarr/1.1.12/migrations/migration_helpers/resources.py diff --git a/trains/community/lidarr/1.1.11/migrations/migration_helpers/storage.py b/trains/community/lidarr/1.1.12/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/lidarr/1.1.11/migrations/migration_helpers/storage.py rename to trains/community/lidarr/1.1.12/migrations/migration_helpers/storage.py diff --git a/trains/community/lidarr/1.1.11/questions.yaml b/trains/community/lidarr/1.1.12/questions.yaml similarity index 100% rename from trains/community/lidarr/1.1.11/questions.yaml rename to trains/community/lidarr/1.1.12/questions.yaml diff --git a/trains/community/lidarr/1.1.11/templates/docker-compose.yaml b/trains/community/lidarr/1.1.12/templates/docker-compose.yaml similarity index 100% rename from trains/community/lidarr/1.1.11/templates/docker-compose.yaml rename to trains/community/lidarr/1.1.12/templates/docker-compose.yaml diff --git a/trains/community/lidarr/1.1.11/templates/library/base_v1_1_3/__init__.py b/trains/community/lidarr/1.1.12/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/lidarr/1.1.11/templates/library/base_v1_1_3/__init__.py rename to trains/community/lidarr/1.1.12/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/lidarr/1.1.11/templates/library/base_v1_1_3/environment.py b/trains/community/lidarr/1.1.12/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/lidarr/1.1.11/templates/library/base_v1_1_3/environment.py rename to trains/community/lidarr/1.1.12/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/lidarr/1.1.12/templates/library/base_v1_1_4/healthchecks.py b/trains/community/lidarr/1.1.12/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/community/lidarr/1.1.12/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/lidarr/1.1.11/templates/library/base_v1_1_3/mariadb.py b/trains/community/lidarr/1.1.12/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/lidarr/1.1.11/templates/library/base_v1_1_3/mariadb.py rename to trains/community/lidarr/1.1.12/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/lidarr/1.1.11/templates/library/base_v1_1_3/metadata.py b/trains/community/lidarr/1.1.12/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/lidarr/1.1.11/templates/library/base_v1_1_3/metadata.py rename to trains/community/lidarr/1.1.12/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/lidarr/1.1.11/templates/library/base_v1_1_3/network.py b/trains/community/lidarr/1.1.12/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/lidarr/1.1.11/templates/library/base_v1_1_3/network.py rename to trains/community/lidarr/1.1.12/templates/library/base_v1_1_4/network.py diff --git a/trains/community/lidarr/1.1.12/templates/library/base_v1_1_4/permissions.py b/trains/community/lidarr/1.1.12/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/community/lidarr/1.1.12/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/community/lidarr/1.1.11/templates/library/base_v1_1_3/ports.py b/trains/community/lidarr/1.1.12/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/lidarr/1.1.11/templates/library/base_v1_1_3/ports.py rename to trains/community/lidarr/1.1.12/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/lidarr/1.1.11/templates/library/base_v1_1_3/postgres.py b/trains/community/lidarr/1.1.12/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/lidarr/1.1.11/templates/library/base_v1_1_3/postgres.py rename to trains/community/lidarr/1.1.12/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/lidarr/1.1.11/templates/library/base_v1_1_3/redis.py b/trains/community/lidarr/1.1.12/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/lidarr/1.1.11/templates/library/base_v1_1_3/redis.py rename to trains/community/lidarr/1.1.12/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/lidarr/1.1.11/templates/library/base_v1_1_3/resources.py b/trains/community/lidarr/1.1.12/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/lidarr/1.1.11/templates/library/base_v1_1_3/resources.py rename to trains/community/lidarr/1.1.12/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/lidarr/1.1.11/templates/library/base_v1_1_3/security.py b/trains/community/lidarr/1.1.12/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/lidarr/1.1.11/templates/library/base_v1_1_3/security.py rename to trains/community/lidarr/1.1.12/templates/library/base_v1_1_4/security.py diff --git a/trains/community/lidarr/1.1.11/templates/library/base_v1_1_3/storage.py b/trains/community/lidarr/1.1.12/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/lidarr/1.1.11/templates/library/base_v1_1_3/storage.py rename to trains/community/lidarr/1.1.12/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/lidarr/1.1.11/templates/library/base_v1_1_3/utils.py b/trains/community/lidarr/1.1.12/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/lidarr/1.1.11/templates/library/base_v1_1_3/utils.py rename to trains/community/lidarr/1.1.12/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/lidarr/1.1.11/templates/test_values/basic-values.yaml b/trains/community/lidarr/1.1.12/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/lidarr/1.1.11/templates/test_values/basic-values.yaml rename to trains/community/lidarr/1.1.12/templates/test_values/basic-values.yaml diff --git a/trains/community/linkding/1.0.16/templates/library/base_v1_1_3/healthchecks.py b/trains/community/linkding/1.0.16/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/community/linkding/1.0.16/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/linkding/1.0.16/templates/library/base_v1_1_3/permissions.py b/trains/community/linkding/1.0.16/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/community/linkding/1.0.16/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/community/linkding/1.0.16/README.md b/trains/community/linkding/1.0.17/README.md similarity index 100% rename from trains/community/linkding/1.0.16/README.md rename to trains/community/linkding/1.0.17/README.md diff --git a/trains/community/linkding/1.0.16/app.yaml b/trains/community/linkding/1.0.17/app.yaml similarity index 87% rename from trains/community/linkding/1.0.16/app.yaml rename to trains/community/linkding/1.0.17/app.yaml index f0989dbe6c..e415d65cec 100644 --- a/trains/community/linkding/1.0.16/app.yaml +++ b/trains/community/linkding/1.0.17/app.yaml @@ -8,8 +8,8 @@ host_mounts: [] icon: https://media.sys.truenas.net/apps/linkding/icons/icon.svg keywords: - bookmark -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -33,4 +33,4 @@ sources: - https://hub.docker.com/r/sissbruecker/linkding/ title: Linkding train: community -version: 1.0.16 +version: 1.0.17 diff --git a/trains/community/linkding/1.0.16/ix_values.yaml b/trains/community/linkding/1.0.17/ix_values.yaml similarity index 100% rename from trains/community/linkding/1.0.16/ix_values.yaml rename to trains/community/linkding/1.0.17/ix_values.yaml diff --git a/trains/community/linkding/1.0.16/migrations/migrate_from_kubernetes b/trains/community/linkding/1.0.17/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/linkding/1.0.16/migrations/migrate_from_kubernetes rename to trains/community/linkding/1.0.17/migrations/migrate_from_kubernetes diff --git a/trains/community/linkding/1.0.16/migrations/migration_helpers/__init__.py b/trains/community/linkding/1.0.17/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/linkding/1.0.16/migrations/migration_helpers/__init__.py rename to trains/community/linkding/1.0.17/migrations/migration_helpers/__init__.py diff --git a/trains/community/linkding/1.0.16/migrations/migration_helpers/cpu.py b/trains/community/linkding/1.0.17/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/linkding/1.0.16/migrations/migration_helpers/cpu.py rename to trains/community/linkding/1.0.17/migrations/migration_helpers/cpu.py diff --git a/trains/community/linkding/1.0.16/migrations/migration_helpers/dns_config.py b/trains/community/linkding/1.0.17/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/linkding/1.0.16/migrations/migration_helpers/dns_config.py rename to trains/community/linkding/1.0.17/migrations/migration_helpers/dns_config.py diff --git a/trains/community/linkding/1.0.16/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/linkding/1.0.17/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/linkding/1.0.16/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/linkding/1.0.17/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/linkding/1.0.16/migrations/migration_helpers/memory.py b/trains/community/linkding/1.0.17/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/linkding/1.0.16/migrations/migration_helpers/memory.py rename to trains/community/linkding/1.0.17/migrations/migration_helpers/memory.py diff --git a/trains/community/linkding/1.0.16/migrations/migration_helpers/resources.py b/trains/community/linkding/1.0.17/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/linkding/1.0.16/migrations/migration_helpers/resources.py rename to trains/community/linkding/1.0.17/migrations/migration_helpers/resources.py diff --git a/trains/community/linkding/1.0.16/migrations/migration_helpers/storage.py b/trains/community/linkding/1.0.17/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/linkding/1.0.16/migrations/migration_helpers/storage.py rename to trains/community/linkding/1.0.17/migrations/migration_helpers/storage.py diff --git a/trains/community/linkding/1.0.16/questions.yaml b/trains/community/linkding/1.0.17/questions.yaml similarity index 100% rename from trains/community/linkding/1.0.16/questions.yaml rename to trains/community/linkding/1.0.17/questions.yaml diff --git a/trains/community/linkding/1.0.16/templates/docker-compose.yaml b/trains/community/linkding/1.0.17/templates/docker-compose.yaml similarity index 100% rename from trains/community/linkding/1.0.16/templates/docker-compose.yaml rename to trains/community/linkding/1.0.17/templates/docker-compose.yaml diff --git a/trains/community/linkding/1.0.16/templates/library/base_v1_1_3/__init__.py b/trains/community/linkding/1.0.17/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/linkding/1.0.16/templates/library/base_v1_1_3/__init__.py rename to trains/community/linkding/1.0.17/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/linkding/1.0.16/templates/library/base_v1_1_3/environment.py b/trains/community/linkding/1.0.17/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/linkding/1.0.16/templates/library/base_v1_1_3/environment.py rename to trains/community/linkding/1.0.17/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/linkding/1.0.17/templates/library/base_v1_1_4/healthchecks.py b/trains/community/linkding/1.0.17/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/community/linkding/1.0.17/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/linkding/1.0.16/templates/library/base_v1_1_3/mariadb.py b/trains/community/linkding/1.0.17/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/linkding/1.0.16/templates/library/base_v1_1_3/mariadb.py rename to trains/community/linkding/1.0.17/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/linkding/1.0.16/templates/library/base_v1_1_3/metadata.py b/trains/community/linkding/1.0.17/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/linkding/1.0.16/templates/library/base_v1_1_3/metadata.py rename to trains/community/linkding/1.0.17/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/linkding/1.0.16/templates/library/base_v1_1_3/network.py b/trains/community/linkding/1.0.17/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/linkding/1.0.16/templates/library/base_v1_1_3/network.py rename to trains/community/linkding/1.0.17/templates/library/base_v1_1_4/network.py diff --git a/trains/community/linkding/1.0.17/templates/library/base_v1_1_4/permissions.py b/trains/community/linkding/1.0.17/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/community/linkding/1.0.17/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/community/linkding/1.0.16/templates/library/base_v1_1_3/ports.py b/trains/community/linkding/1.0.17/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/linkding/1.0.16/templates/library/base_v1_1_3/ports.py rename to trains/community/linkding/1.0.17/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/linkding/1.0.16/templates/library/base_v1_1_3/postgres.py b/trains/community/linkding/1.0.17/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/linkding/1.0.16/templates/library/base_v1_1_3/postgres.py rename to trains/community/linkding/1.0.17/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/linkding/1.0.16/templates/library/base_v1_1_3/redis.py b/trains/community/linkding/1.0.17/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/linkding/1.0.16/templates/library/base_v1_1_3/redis.py rename to trains/community/linkding/1.0.17/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/linkding/1.0.16/templates/library/base_v1_1_3/resources.py b/trains/community/linkding/1.0.17/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/linkding/1.0.16/templates/library/base_v1_1_3/resources.py rename to trains/community/linkding/1.0.17/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/linkding/1.0.16/templates/library/base_v1_1_3/security.py b/trains/community/linkding/1.0.17/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/linkding/1.0.16/templates/library/base_v1_1_3/security.py rename to trains/community/linkding/1.0.17/templates/library/base_v1_1_4/security.py diff --git a/trains/community/linkding/1.0.16/templates/library/base_v1_1_3/storage.py b/trains/community/linkding/1.0.17/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/linkding/1.0.16/templates/library/base_v1_1_3/storage.py rename to trains/community/linkding/1.0.17/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/linkding/1.0.16/templates/library/base_v1_1_3/utils.py b/trains/community/linkding/1.0.17/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/linkding/1.0.16/templates/library/base_v1_1_3/utils.py rename to trains/community/linkding/1.0.17/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/linkding/1.0.16/templates/test_values/basic-values.yaml b/trains/community/linkding/1.0.17/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/linkding/1.0.16/templates/test_values/basic-values.yaml rename to trains/community/linkding/1.0.17/templates/test_values/basic-values.yaml diff --git a/trains/community/linkding/1.0.16/templates/test_values/plus-values.yaml b/trains/community/linkding/1.0.17/templates/test_values/plus-values.yaml similarity index 100% rename from trains/community/linkding/1.0.16/templates/test_values/plus-values.yaml rename to trains/community/linkding/1.0.17/templates/test_values/plus-values.yaml diff --git a/trains/community/listmonk/1.0.8/templates/library/base_v1_1_3/healthchecks.py b/trains/community/listmonk/1.0.8/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/community/listmonk/1.0.8/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/listmonk/1.0.8/templates/library/base_v1_1_3/permissions.py b/trains/community/listmonk/1.0.8/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/community/listmonk/1.0.8/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/community/listmonk/1.0.8/README.md b/trains/community/listmonk/1.0.9/README.md similarity index 100% rename from trains/community/listmonk/1.0.8/README.md rename to trains/community/listmonk/1.0.9/README.md diff --git a/trains/community/listmonk/1.0.8/app.yaml b/trains/community/listmonk/1.0.9/app.yaml similarity index 89% rename from trains/community/listmonk/1.0.8/app.yaml rename to trains/community/listmonk/1.0.9/app.yaml index 0ba7a70576..eae0446203 100644 --- a/trains/community/listmonk/1.0.8/app.yaml +++ b/trains/community/listmonk/1.0.9/app.yaml @@ -9,8 +9,8 @@ icon: https://media.sys.truenas.net/apps/listmonk/icons/icon.svg keywords: - mailing-list - newsletter -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -36,4 +36,4 @@ sources: - https://github.com/knadh/listmonk title: Listmonk train: community -version: 1.0.8 +version: 1.0.9 diff --git a/trains/community/listmonk/1.0.8/ix_values.yaml b/trains/community/listmonk/1.0.9/ix_values.yaml similarity index 100% rename from trains/community/listmonk/1.0.8/ix_values.yaml rename to trains/community/listmonk/1.0.9/ix_values.yaml diff --git a/trains/community/listmonk/1.0.8/migrations/migrate_from_kubernetes b/trains/community/listmonk/1.0.9/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/listmonk/1.0.8/migrations/migrate_from_kubernetes rename to trains/community/listmonk/1.0.9/migrations/migrate_from_kubernetes diff --git a/trains/community/listmonk/1.0.8/migrations/migration_helpers/__init__.py b/trains/community/listmonk/1.0.9/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/listmonk/1.0.8/migrations/migration_helpers/__init__.py rename to trains/community/listmonk/1.0.9/migrations/migration_helpers/__init__.py diff --git a/trains/community/listmonk/1.0.8/migrations/migration_helpers/cpu.py b/trains/community/listmonk/1.0.9/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/listmonk/1.0.8/migrations/migration_helpers/cpu.py rename to trains/community/listmonk/1.0.9/migrations/migration_helpers/cpu.py diff --git a/trains/community/listmonk/1.0.8/migrations/migration_helpers/dns_config.py b/trains/community/listmonk/1.0.9/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/listmonk/1.0.8/migrations/migration_helpers/dns_config.py rename to trains/community/listmonk/1.0.9/migrations/migration_helpers/dns_config.py diff --git a/trains/community/listmonk/1.0.8/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/listmonk/1.0.9/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/listmonk/1.0.8/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/listmonk/1.0.9/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/listmonk/1.0.8/migrations/migration_helpers/memory.py b/trains/community/listmonk/1.0.9/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/listmonk/1.0.8/migrations/migration_helpers/memory.py rename to trains/community/listmonk/1.0.9/migrations/migration_helpers/memory.py diff --git a/trains/community/listmonk/1.0.8/migrations/migration_helpers/resources.py b/trains/community/listmonk/1.0.9/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/listmonk/1.0.8/migrations/migration_helpers/resources.py rename to trains/community/listmonk/1.0.9/migrations/migration_helpers/resources.py diff --git a/trains/community/listmonk/1.0.8/migrations/migration_helpers/storage.py b/trains/community/listmonk/1.0.9/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/listmonk/1.0.8/migrations/migration_helpers/storage.py rename to trains/community/listmonk/1.0.9/migrations/migration_helpers/storage.py diff --git a/trains/community/listmonk/1.0.8/questions.yaml b/trains/community/listmonk/1.0.9/questions.yaml similarity index 100% rename from trains/community/listmonk/1.0.8/questions.yaml rename to trains/community/listmonk/1.0.9/questions.yaml diff --git a/trains/community/listmonk/1.0.8/templates/docker-compose.yaml b/trains/community/listmonk/1.0.9/templates/docker-compose.yaml similarity index 100% rename from trains/community/listmonk/1.0.8/templates/docker-compose.yaml rename to trains/community/listmonk/1.0.9/templates/docker-compose.yaml diff --git a/trains/community/listmonk/1.0.8/templates/library/base_v1_1_3/__init__.py b/trains/community/listmonk/1.0.9/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/listmonk/1.0.8/templates/library/base_v1_1_3/__init__.py rename to trains/community/listmonk/1.0.9/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/listmonk/1.0.8/templates/library/base_v1_1_3/environment.py b/trains/community/listmonk/1.0.9/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/listmonk/1.0.8/templates/library/base_v1_1_3/environment.py rename to trains/community/listmonk/1.0.9/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/listmonk/1.0.9/templates/library/base_v1_1_4/healthchecks.py b/trains/community/listmonk/1.0.9/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/community/listmonk/1.0.9/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/listmonk/1.0.8/templates/library/base_v1_1_3/mariadb.py b/trains/community/listmonk/1.0.9/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/listmonk/1.0.8/templates/library/base_v1_1_3/mariadb.py rename to trains/community/listmonk/1.0.9/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/listmonk/1.0.8/templates/library/base_v1_1_3/metadata.py b/trains/community/listmonk/1.0.9/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/listmonk/1.0.8/templates/library/base_v1_1_3/metadata.py rename to trains/community/listmonk/1.0.9/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/listmonk/1.0.8/templates/library/base_v1_1_3/network.py b/trains/community/listmonk/1.0.9/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/listmonk/1.0.8/templates/library/base_v1_1_3/network.py rename to trains/community/listmonk/1.0.9/templates/library/base_v1_1_4/network.py diff --git a/trains/community/listmonk/1.0.9/templates/library/base_v1_1_4/permissions.py b/trains/community/listmonk/1.0.9/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/community/listmonk/1.0.9/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/community/listmonk/1.0.8/templates/library/base_v1_1_3/ports.py b/trains/community/listmonk/1.0.9/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/listmonk/1.0.8/templates/library/base_v1_1_3/ports.py rename to trains/community/listmonk/1.0.9/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/listmonk/1.0.8/templates/library/base_v1_1_3/postgres.py b/trains/community/listmonk/1.0.9/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/listmonk/1.0.8/templates/library/base_v1_1_3/postgres.py rename to trains/community/listmonk/1.0.9/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/listmonk/1.0.8/templates/library/base_v1_1_3/redis.py b/trains/community/listmonk/1.0.9/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/listmonk/1.0.8/templates/library/base_v1_1_3/redis.py rename to trains/community/listmonk/1.0.9/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/listmonk/1.0.8/templates/library/base_v1_1_3/resources.py b/trains/community/listmonk/1.0.9/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/listmonk/1.0.8/templates/library/base_v1_1_3/resources.py rename to trains/community/listmonk/1.0.9/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/listmonk/1.0.8/templates/library/base_v1_1_3/security.py b/trains/community/listmonk/1.0.9/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/listmonk/1.0.8/templates/library/base_v1_1_3/security.py rename to trains/community/listmonk/1.0.9/templates/library/base_v1_1_4/security.py diff --git a/trains/community/listmonk/1.0.8/templates/library/base_v1_1_3/storage.py b/trains/community/listmonk/1.0.9/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/listmonk/1.0.8/templates/library/base_v1_1_3/storage.py rename to trains/community/listmonk/1.0.9/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/listmonk/1.0.8/templates/library/base_v1_1_3/utils.py b/trains/community/listmonk/1.0.9/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/listmonk/1.0.8/templates/library/base_v1_1_3/utils.py rename to trains/community/listmonk/1.0.9/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/listmonk/1.0.8/templates/test_values/basic-values.yaml b/trains/community/listmonk/1.0.9/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/listmonk/1.0.8/templates/test_values/basic-values.yaml rename to trains/community/listmonk/1.0.9/templates/test_values/basic-values.yaml diff --git a/trains/community/logseq/1.0.17/templates/library/base_v1_1_3/healthchecks.py b/trains/community/logseq/1.0.17/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/community/logseq/1.0.17/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/logseq/1.0.17/templates/library/base_v1_1_3/permissions.py b/trains/community/logseq/1.0.17/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/community/logseq/1.0.17/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/community/logseq/1.0.17/README.md b/trains/community/logseq/1.0.18/README.md similarity index 100% rename from trains/community/logseq/1.0.17/README.md rename to trains/community/logseq/1.0.18/README.md diff --git a/trains/community/logseq/1.0.17/app.yaml b/trains/community/logseq/1.0.18/app.yaml similarity index 84% rename from trains/community/logseq/1.0.17/app.yaml rename to trains/community/logseq/1.0.18/app.yaml index b45a31e864..2109854e47 100644 --- a/trains/community/logseq/1.0.17/app.yaml +++ b/trains/community/logseq/1.0.18/app.yaml @@ -10,8 +10,8 @@ icon: https://media.sys.truenas.net/apps/logseq/icons/icon.png keywords: - knowledge - management -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -28,4 +28,4 @@ sources: - https://github.com/logseq/logseq title: Logseq train: community -version: 1.0.17 +version: 1.0.18 diff --git a/trains/community/logseq/1.0.17/ix_values.yaml b/trains/community/logseq/1.0.18/ix_values.yaml similarity index 100% rename from trains/community/logseq/1.0.17/ix_values.yaml rename to trains/community/logseq/1.0.18/ix_values.yaml diff --git a/trains/community/logseq/1.0.17/migrations/migrate_from_kubernetes b/trains/community/logseq/1.0.18/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/logseq/1.0.17/migrations/migrate_from_kubernetes rename to trains/community/logseq/1.0.18/migrations/migrate_from_kubernetes diff --git a/trains/community/logseq/1.0.17/migrations/migration_helpers/__init__.py b/trains/community/logseq/1.0.18/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/logseq/1.0.17/migrations/migration_helpers/__init__.py rename to trains/community/logseq/1.0.18/migrations/migration_helpers/__init__.py diff --git a/trains/community/logseq/1.0.17/migrations/migration_helpers/cpu.py b/trains/community/logseq/1.0.18/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/logseq/1.0.17/migrations/migration_helpers/cpu.py rename to trains/community/logseq/1.0.18/migrations/migration_helpers/cpu.py diff --git a/trains/community/logseq/1.0.17/migrations/migration_helpers/dns_config.py b/trains/community/logseq/1.0.18/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/logseq/1.0.17/migrations/migration_helpers/dns_config.py rename to trains/community/logseq/1.0.18/migrations/migration_helpers/dns_config.py diff --git a/trains/community/logseq/1.0.17/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/logseq/1.0.18/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/logseq/1.0.17/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/logseq/1.0.18/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/logseq/1.0.17/migrations/migration_helpers/memory.py b/trains/community/logseq/1.0.18/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/logseq/1.0.17/migrations/migration_helpers/memory.py rename to trains/community/logseq/1.0.18/migrations/migration_helpers/memory.py diff --git a/trains/community/logseq/1.0.17/migrations/migration_helpers/resources.py b/trains/community/logseq/1.0.18/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/logseq/1.0.17/migrations/migration_helpers/resources.py rename to trains/community/logseq/1.0.18/migrations/migration_helpers/resources.py diff --git a/trains/community/logseq/1.0.17/migrations/migration_helpers/storage.py b/trains/community/logseq/1.0.18/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/logseq/1.0.17/migrations/migration_helpers/storage.py rename to trains/community/logseq/1.0.18/migrations/migration_helpers/storage.py diff --git a/trains/community/logseq/1.0.17/questions.yaml b/trains/community/logseq/1.0.18/questions.yaml similarity index 100% rename from trains/community/logseq/1.0.17/questions.yaml rename to trains/community/logseq/1.0.18/questions.yaml diff --git a/trains/community/logseq/1.0.17/templates/docker-compose.yaml b/trains/community/logseq/1.0.18/templates/docker-compose.yaml similarity index 100% rename from trains/community/logseq/1.0.17/templates/docker-compose.yaml rename to trains/community/logseq/1.0.18/templates/docker-compose.yaml diff --git a/trains/community/logseq/1.0.17/templates/library/base_v1_1_3/__init__.py b/trains/community/logseq/1.0.18/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/logseq/1.0.17/templates/library/base_v1_1_3/__init__.py rename to trains/community/logseq/1.0.18/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/logseq/1.0.17/templates/library/base_v1_1_3/environment.py b/trains/community/logseq/1.0.18/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/logseq/1.0.17/templates/library/base_v1_1_3/environment.py rename to trains/community/logseq/1.0.18/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/logseq/1.0.18/templates/library/base_v1_1_4/healthchecks.py b/trains/community/logseq/1.0.18/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/community/logseq/1.0.18/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/logseq/1.0.17/templates/library/base_v1_1_3/mariadb.py b/trains/community/logseq/1.0.18/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/logseq/1.0.17/templates/library/base_v1_1_3/mariadb.py rename to trains/community/logseq/1.0.18/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/logseq/1.0.17/templates/library/base_v1_1_3/metadata.py b/trains/community/logseq/1.0.18/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/logseq/1.0.17/templates/library/base_v1_1_3/metadata.py rename to trains/community/logseq/1.0.18/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/logseq/1.0.17/templates/library/base_v1_1_3/network.py b/trains/community/logseq/1.0.18/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/logseq/1.0.17/templates/library/base_v1_1_3/network.py rename to trains/community/logseq/1.0.18/templates/library/base_v1_1_4/network.py diff --git a/trains/community/logseq/1.0.18/templates/library/base_v1_1_4/permissions.py b/trains/community/logseq/1.0.18/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/community/logseq/1.0.18/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/community/logseq/1.0.17/templates/library/base_v1_1_3/ports.py b/trains/community/logseq/1.0.18/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/logseq/1.0.17/templates/library/base_v1_1_3/ports.py rename to trains/community/logseq/1.0.18/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/logseq/1.0.17/templates/library/base_v1_1_3/postgres.py b/trains/community/logseq/1.0.18/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/logseq/1.0.17/templates/library/base_v1_1_3/postgres.py rename to trains/community/logseq/1.0.18/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/logseq/1.0.17/templates/library/base_v1_1_3/redis.py b/trains/community/logseq/1.0.18/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/logseq/1.0.17/templates/library/base_v1_1_3/redis.py rename to trains/community/logseq/1.0.18/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/logseq/1.0.17/templates/library/base_v1_1_3/resources.py b/trains/community/logseq/1.0.18/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/logseq/1.0.17/templates/library/base_v1_1_3/resources.py rename to trains/community/logseq/1.0.18/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/logseq/1.0.17/templates/library/base_v1_1_3/security.py b/trains/community/logseq/1.0.18/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/logseq/1.0.17/templates/library/base_v1_1_3/security.py rename to trains/community/logseq/1.0.18/templates/library/base_v1_1_4/security.py diff --git a/trains/community/logseq/1.0.17/templates/library/base_v1_1_3/storage.py b/trains/community/logseq/1.0.18/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/logseq/1.0.17/templates/library/base_v1_1_3/storage.py rename to trains/community/logseq/1.0.18/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/logseq/1.0.17/templates/library/base_v1_1_3/utils.py b/trains/community/logseq/1.0.18/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/logseq/1.0.17/templates/library/base_v1_1_3/utils.py rename to trains/community/logseq/1.0.18/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/logseq/1.0.17/templates/test_values/basic-values.yaml b/trains/community/logseq/1.0.18/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/logseq/1.0.17/templates/test_values/basic-values.yaml rename to trains/community/logseq/1.0.18/templates/test_values/basic-values.yaml diff --git a/trains/community/logseq/1.0.17/templates/test_values/https-values.yaml b/trains/community/logseq/1.0.18/templates/test_values/https-values.yaml similarity index 100% rename from trains/community/logseq/1.0.17/templates/test_values/https-values.yaml rename to trains/community/logseq/1.0.18/templates/test_values/https-values.yaml diff --git a/trains/community/mealie/1.2.9/README.md b/trains/community/mealie/1.2.10/README.md similarity index 100% rename from trains/community/mealie/1.2.9/README.md rename to trains/community/mealie/1.2.10/README.md diff --git a/trains/community/mealie/1.2.9/app.yaml b/trains/community/mealie/1.2.10/app.yaml similarity index 86% rename from trains/community/mealie/1.2.9/app.yaml rename to trains/community/mealie/1.2.10/app.yaml index aadb2ca590..f7ee0cd243 100644 --- a/trains/community/mealie/1.2.9/app.yaml +++ b/trains/community/mealie/1.2.10/app.yaml @@ -9,8 +9,8 @@ icon: https://media.sys.truenas.net/apps/mealie/icons/icon.png keywords: - recipes - meal planner -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -33,4 +33,4 @@ sources: - https://docs.mealie.io/ title: Mealie train: community -version: 1.2.9 +version: 1.2.10 diff --git a/trains/community/mealie/1.2.9/ix_values.yaml b/trains/community/mealie/1.2.10/ix_values.yaml similarity index 100% rename from trains/community/mealie/1.2.9/ix_values.yaml rename to trains/community/mealie/1.2.10/ix_values.yaml diff --git a/trains/community/mealie/1.2.9/migrations/migrate_from_kubernetes b/trains/community/mealie/1.2.10/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/mealie/1.2.9/migrations/migrate_from_kubernetes rename to trains/community/mealie/1.2.10/migrations/migrate_from_kubernetes diff --git a/trains/community/mealie/1.2.9/migrations/migration_helpers/__init__.py b/trains/community/mealie/1.2.10/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/mealie/1.2.9/migrations/migration_helpers/__init__.py rename to trains/community/mealie/1.2.10/migrations/migration_helpers/__init__.py diff --git a/trains/community/mealie/1.2.9/migrations/migration_helpers/cpu.py b/trains/community/mealie/1.2.10/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/mealie/1.2.9/migrations/migration_helpers/cpu.py rename to trains/community/mealie/1.2.10/migrations/migration_helpers/cpu.py diff --git a/trains/community/mealie/1.2.9/migrations/migration_helpers/dns_config.py b/trains/community/mealie/1.2.10/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/mealie/1.2.9/migrations/migration_helpers/dns_config.py rename to trains/community/mealie/1.2.10/migrations/migration_helpers/dns_config.py diff --git a/trains/community/mealie/1.2.9/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/mealie/1.2.10/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/mealie/1.2.9/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/mealie/1.2.10/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/mealie/1.2.9/migrations/migration_helpers/memory.py b/trains/community/mealie/1.2.10/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/mealie/1.2.9/migrations/migration_helpers/memory.py rename to trains/community/mealie/1.2.10/migrations/migration_helpers/memory.py diff --git a/trains/community/mealie/1.2.9/migrations/migration_helpers/resources.py b/trains/community/mealie/1.2.10/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/mealie/1.2.9/migrations/migration_helpers/resources.py rename to trains/community/mealie/1.2.10/migrations/migration_helpers/resources.py diff --git a/trains/community/mealie/1.2.9/migrations/migration_helpers/storage.py b/trains/community/mealie/1.2.10/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/mealie/1.2.9/migrations/migration_helpers/storage.py rename to trains/community/mealie/1.2.10/migrations/migration_helpers/storage.py diff --git a/trains/community/mealie/1.2.9/questions.yaml b/trains/community/mealie/1.2.10/questions.yaml similarity index 100% rename from trains/community/mealie/1.2.9/questions.yaml rename to trains/community/mealie/1.2.10/questions.yaml diff --git a/trains/community/mealie/1.2.9/templates/docker-compose.yaml b/trains/community/mealie/1.2.10/templates/docker-compose.yaml similarity index 100% rename from trains/community/mealie/1.2.9/templates/docker-compose.yaml rename to trains/community/mealie/1.2.10/templates/docker-compose.yaml diff --git a/trains/community/mealie/1.2.9/templates/library/base_v1_1_3/__init__.py b/trains/community/mealie/1.2.10/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/mealie/1.2.9/templates/library/base_v1_1_3/__init__.py rename to trains/community/mealie/1.2.10/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/mealie/1.2.9/templates/library/base_v1_1_3/environment.py b/trains/community/mealie/1.2.10/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/mealie/1.2.9/templates/library/base_v1_1_3/environment.py rename to trains/community/mealie/1.2.10/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/mealie/1.2.10/templates/library/base_v1_1_4/healthchecks.py b/trains/community/mealie/1.2.10/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/community/mealie/1.2.10/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/mealie/1.2.9/templates/library/base_v1_1_3/mariadb.py b/trains/community/mealie/1.2.10/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/mealie/1.2.9/templates/library/base_v1_1_3/mariadb.py rename to trains/community/mealie/1.2.10/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/mealie/1.2.9/templates/library/base_v1_1_3/metadata.py b/trains/community/mealie/1.2.10/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/mealie/1.2.9/templates/library/base_v1_1_3/metadata.py rename to trains/community/mealie/1.2.10/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/mealie/1.2.9/templates/library/base_v1_1_3/network.py b/trains/community/mealie/1.2.10/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/mealie/1.2.9/templates/library/base_v1_1_3/network.py rename to trains/community/mealie/1.2.10/templates/library/base_v1_1_4/network.py diff --git a/trains/community/mealie/1.2.10/templates/library/base_v1_1_4/permissions.py b/trains/community/mealie/1.2.10/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/community/mealie/1.2.10/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/community/mealie/1.2.9/templates/library/base_v1_1_3/ports.py b/trains/community/mealie/1.2.10/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/mealie/1.2.9/templates/library/base_v1_1_3/ports.py rename to trains/community/mealie/1.2.10/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/mealie/1.2.9/templates/library/base_v1_1_3/postgres.py b/trains/community/mealie/1.2.10/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/mealie/1.2.9/templates/library/base_v1_1_3/postgres.py rename to trains/community/mealie/1.2.10/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/mealie/1.2.9/templates/library/base_v1_1_3/redis.py b/trains/community/mealie/1.2.10/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/mealie/1.2.9/templates/library/base_v1_1_3/redis.py rename to trains/community/mealie/1.2.10/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/mealie/1.2.9/templates/library/base_v1_1_3/resources.py b/trains/community/mealie/1.2.10/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/mealie/1.2.9/templates/library/base_v1_1_3/resources.py rename to trains/community/mealie/1.2.10/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/mealie/1.2.9/templates/library/base_v1_1_3/security.py b/trains/community/mealie/1.2.10/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/mealie/1.2.9/templates/library/base_v1_1_3/security.py rename to trains/community/mealie/1.2.10/templates/library/base_v1_1_4/security.py diff --git a/trains/community/mealie/1.2.9/templates/library/base_v1_1_3/storage.py b/trains/community/mealie/1.2.10/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/mealie/1.2.9/templates/library/base_v1_1_3/storage.py rename to trains/community/mealie/1.2.10/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/mealie/1.2.9/templates/library/base_v1_1_3/utils.py b/trains/community/mealie/1.2.10/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/mealie/1.2.9/templates/library/base_v1_1_3/utils.py rename to trains/community/mealie/1.2.10/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/mealie/1.2.9/templates/test_values/basic-values.yaml b/trains/community/mealie/1.2.10/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/mealie/1.2.9/templates/test_values/basic-values.yaml rename to trains/community/mealie/1.2.10/templates/test_values/basic-values.yaml diff --git a/trains/community/mealie/1.2.9/templates/library/base_v1_1_3/healthchecks.py b/trains/community/mealie/1.2.9/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/community/mealie/1.2.9/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/mealie/1.2.9/templates/library/base_v1_1_3/permissions.py b/trains/community/mealie/1.2.9/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/community/mealie/1.2.9/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/community/metube/1.1.16/templates/library/base_v1_1_3/healthchecks.py b/trains/community/metube/1.1.16/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/community/metube/1.1.16/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/metube/1.1.16/templates/library/base_v1_1_3/permissions.py b/trains/community/metube/1.1.16/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/community/metube/1.1.16/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/community/metube/1.1.16/README.md b/trains/community/metube/1.1.17/README.md similarity index 100% rename from trains/community/metube/1.1.16/README.md rename to trains/community/metube/1.1.17/README.md diff --git a/trains/community/metube/1.1.16/app.yaml b/trains/community/metube/1.1.17/app.yaml similarity index 86% rename from trains/community/metube/1.1.16/app.yaml rename to trains/community/metube/1.1.17/app.yaml index 91a2f3855d..d3f1e0fd49 100644 --- a/trains/community/metube/1.1.16/app.yaml +++ b/trains/community/metube/1.1.17/app.yaml @@ -10,8 +10,8 @@ icon: https://media.sys.truenas.net/apps/metube/icons/icon.svg keywords: - youtube-dl - yt-dlp -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -30,4 +30,4 @@ sources: - https://github.com/alexta69/metube title: MeTube train: community -version: 1.1.16 +version: 1.1.17 diff --git a/trains/community/metube/1.1.16/ix_values.yaml b/trains/community/metube/1.1.17/ix_values.yaml similarity index 100% rename from trains/community/metube/1.1.16/ix_values.yaml rename to trains/community/metube/1.1.17/ix_values.yaml diff --git a/trains/community/metube/1.1.16/migrations/migrate_from_kubernetes b/trains/community/metube/1.1.17/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/metube/1.1.16/migrations/migrate_from_kubernetes rename to trains/community/metube/1.1.17/migrations/migrate_from_kubernetes diff --git a/trains/community/metube/1.1.16/migrations/migration_helpers/__init__.py b/trains/community/metube/1.1.17/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/metube/1.1.16/migrations/migration_helpers/__init__.py rename to trains/community/metube/1.1.17/migrations/migration_helpers/__init__.py diff --git a/trains/community/metube/1.1.16/migrations/migration_helpers/cpu.py b/trains/community/metube/1.1.17/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/metube/1.1.16/migrations/migration_helpers/cpu.py rename to trains/community/metube/1.1.17/migrations/migration_helpers/cpu.py diff --git a/trains/community/metube/1.1.16/migrations/migration_helpers/dns_config.py b/trains/community/metube/1.1.17/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/metube/1.1.16/migrations/migration_helpers/dns_config.py rename to trains/community/metube/1.1.17/migrations/migration_helpers/dns_config.py diff --git a/trains/community/metube/1.1.16/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/metube/1.1.17/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/metube/1.1.16/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/metube/1.1.17/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/metube/1.1.16/migrations/migration_helpers/memory.py b/trains/community/metube/1.1.17/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/metube/1.1.16/migrations/migration_helpers/memory.py rename to trains/community/metube/1.1.17/migrations/migration_helpers/memory.py diff --git a/trains/community/metube/1.1.16/migrations/migration_helpers/resources.py b/trains/community/metube/1.1.17/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/metube/1.1.16/migrations/migration_helpers/resources.py rename to trains/community/metube/1.1.17/migrations/migration_helpers/resources.py diff --git a/trains/community/metube/1.1.16/migrations/migration_helpers/storage.py b/trains/community/metube/1.1.17/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/metube/1.1.16/migrations/migration_helpers/storage.py rename to trains/community/metube/1.1.17/migrations/migration_helpers/storage.py diff --git a/trains/community/metube/1.1.16/questions.yaml b/trains/community/metube/1.1.17/questions.yaml similarity index 100% rename from trains/community/metube/1.1.16/questions.yaml rename to trains/community/metube/1.1.17/questions.yaml diff --git a/trains/community/metube/1.1.16/templates/docker-compose.yaml b/trains/community/metube/1.1.17/templates/docker-compose.yaml similarity index 100% rename from trains/community/metube/1.1.16/templates/docker-compose.yaml rename to trains/community/metube/1.1.17/templates/docker-compose.yaml diff --git a/trains/community/metube/1.1.16/templates/library/base_v1_1_3/__init__.py b/trains/community/metube/1.1.17/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/metube/1.1.16/templates/library/base_v1_1_3/__init__.py rename to trains/community/metube/1.1.17/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/metube/1.1.16/templates/library/base_v1_1_3/environment.py b/trains/community/metube/1.1.17/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/metube/1.1.16/templates/library/base_v1_1_3/environment.py rename to trains/community/metube/1.1.17/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/metube/1.1.17/templates/library/base_v1_1_4/healthchecks.py b/trains/community/metube/1.1.17/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/community/metube/1.1.17/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/metube/1.1.16/templates/library/base_v1_1_3/mariadb.py b/trains/community/metube/1.1.17/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/metube/1.1.16/templates/library/base_v1_1_3/mariadb.py rename to trains/community/metube/1.1.17/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/metube/1.1.16/templates/library/base_v1_1_3/metadata.py b/trains/community/metube/1.1.17/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/metube/1.1.16/templates/library/base_v1_1_3/metadata.py rename to trains/community/metube/1.1.17/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/metube/1.1.16/templates/library/base_v1_1_3/network.py b/trains/community/metube/1.1.17/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/metube/1.1.16/templates/library/base_v1_1_3/network.py rename to trains/community/metube/1.1.17/templates/library/base_v1_1_4/network.py diff --git a/trains/community/metube/1.1.17/templates/library/base_v1_1_4/permissions.py b/trains/community/metube/1.1.17/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/community/metube/1.1.17/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/community/metube/1.1.16/templates/library/base_v1_1_3/ports.py b/trains/community/metube/1.1.17/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/metube/1.1.16/templates/library/base_v1_1_3/ports.py rename to trains/community/metube/1.1.17/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/metube/1.1.16/templates/library/base_v1_1_3/postgres.py b/trains/community/metube/1.1.17/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/metube/1.1.16/templates/library/base_v1_1_3/postgres.py rename to trains/community/metube/1.1.17/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/metube/1.1.16/templates/library/base_v1_1_3/redis.py b/trains/community/metube/1.1.17/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/metube/1.1.16/templates/library/base_v1_1_3/redis.py rename to trains/community/metube/1.1.17/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/metube/1.1.16/templates/library/base_v1_1_3/resources.py b/trains/community/metube/1.1.17/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/metube/1.1.16/templates/library/base_v1_1_3/resources.py rename to trains/community/metube/1.1.17/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/metube/1.1.16/templates/library/base_v1_1_3/security.py b/trains/community/metube/1.1.17/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/metube/1.1.16/templates/library/base_v1_1_3/security.py rename to trains/community/metube/1.1.17/templates/library/base_v1_1_4/security.py diff --git a/trains/community/metube/1.1.16/templates/library/base_v1_1_3/storage.py b/trains/community/metube/1.1.17/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/metube/1.1.16/templates/library/base_v1_1_3/storage.py rename to trains/community/metube/1.1.17/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/metube/1.1.16/templates/library/base_v1_1_3/utils.py b/trains/community/metube/1.1.17/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/metube/1.1.16/templates/library/base_v1_1_3/utils.py rename to trains/community/metube/1.1.17/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/metube/1.1.16/templates/test_values/basic-values.yaml b/trains/community/metube/1.1.17/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/metube/1.1.16/templates/test_values/basic-values.yaml rename to trains/community/metube/1.1.17/templates/test_values/basic-values.yaml diff --git a/trains/community/minecraft/1.11.17/templates/library/base_v1_1_3/healthchecks.py b/trains/community/minecraft/1.11.17/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/community/minecraft/1.11.17/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/minecraft/1.11.17/templates/library/base_v1_1_3/permissions.py b/trains/community/minecraft/1.11.17/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/community/minecraft/1.11.17/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/community/minecraft/1.11.17/README.md b/trains/community/minecraft/1.11.18/README.md similarity index 100% rename from trains/community/minecraft/1.11.17/README.md rename to trains/community/minecraft/1.11.18/README.md diff --git a/trains/community/minecraft/1.11.17/app.yaml b/trains/community/minecraft/1.11.18/app.yaml similarity index 89% rename from trains/community/minecraft/1.11.17/app.yaml rename to trains/community/minecraft/1.11.18/app.yaml index 25a0f8934d..6fd82af0be 100644 --- a/trains/community/minecraft/1.11.17/app.yaml +++ b/trains/community/minecraft/1.11.18/app.yaml @@ -19,8 +19,8 @@ icon: https://media.sys.truenas.net/apps/minecraft/icons/icon.svg keywords: - world - building -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -38,4 +38,4 @@ sources: - https://github.com/itzg/docker-minecraft-server title: Minecraft train: community -version: 1.11.17 +version: 1.11.18 diff --git a/trains/community/minecraft/1.11.17/ix_values.yaml b/trains/community/minecraft/1.11.18/ix_values.yaml similarity index 100% rename from trains/community/minecraft/1.11.17/ix_values.yaml rename to trains/community/minecraft/1.11.18/ix_values.yaml diff --git a/trains/community/minecraft/1.11.17/migrations/migrate_from_kubernetes b/trains/community/minecraft/1.11.18/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/minecraft/1.11.17/migrations/migrate_from_kubernetes rename to trains/community/minecraft/1.11.18/migrations/migrate_from_kubernetes diff --git a/trains/community/minecraft/1.11.17/migrations/migration_helpers/__init__.py b/trains/community/minecraft/1.11.18/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/minecraft/1.11.17/migrations/migration_helpers/__init__.py rename to trains/community/minecraft/1.11.18/migrations/migration_helpers/__init__.py diff --git a/trains/community/minecraft/1.11.17/migrations/migration_helpers/cpu.py b/trains/community/minecraft/1.11.18/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/minecraft/1.11.17/migrations/migration_helpers/cpu.py rename to trains/community/minecraft/1.11.18/migrations/migration_helpers/cpu.py diff --git a/trains/community/minecraft/1.11.17/migrations/migration_helpers/dns_config.py b/trains/community/minecraft/1.11.18/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/minecraft/1.11.17/migrations/migration_helpers/dns_config.py rename to trains/community/minecraft/1.11.18/migrations/migration_helpers/dns_config.py diff --git a/trains/community/minecraft/1.11.17/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/minecraft/1.11.18/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/minecraft/1.11.17/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/minecraft/1.11.18/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/minecraft/1.11.17/migrations/migration_helpers/memory.py b/trains/community/minecraft/1.11.18/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/minecraft/1.11.17/migrations/migration_helpers/memory.py rename to trains/community/minecraft/1.11.18/migrations/migration_helpers/memory.py diff --git a/trains/community/minecraft/1.11.17/migrations/migration_helpers/resources.py b/trains/community/minecraft/1.11.18/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/minecraft/1.11.17/migrations/migration_helpers/resources.py rename to trains/community/minecraft/1.11.18/migrations/migration_helpers/resources.py diff --git a/trains/community/minecraft/1.11.17/migrations/migration_helpers/storage.py b/trains/community/minecraft/1.11.18/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/minecraft/1.11.17/migrations/migration_helpers/storage.py rename to trains/community/minecraft/1.11.18/migrations/migration_helpers/storage.py diff --git a/trains/community/minecraft/1.11.17/questions.yaml b/trains/community/minecraft/1.11.18/questions.yaml similarity index 100% rename from trains/community/minecraft/1.11.17/questions.yaml rename to trains/community/minecraft/1.11.18/questions.yaml diff --git a/trains/community/minecraft/1.11.17/templates/docker-compose.yaml b/trains/community/minecraft/1.11.18/templates/docker-compose.yaml similarity index 100% rename from trains/community/minecraft/1.11.17/templates/docker-compose.yaml rename to trains/community/minecraft/1.11.18/templates/docker-compose.yaml diff --git a/trains/community/minecraft/1.11.17/templates/library/base_v1_1_3/__init__.py b/trains/community/minecraft/1.11.18/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/minecraft/1.11.17/templates/library/base_v1_1_3/__init__.py rename to trains/community/minecraft/1.11.18/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/minecraft/1.11.17/templates/library/base_v1_1_3/environment.py b/trains/community/minecraft/1.11.18/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/minecraft/1.11.17/templates/library/base_v1_1_3/environment.py rename to trains/community/minecraft/1.11.18/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/minecraft/1.11.18/templates/library/base_v1_1_4/healthchecks.py b/trains/community/minecraft/1.11.18/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/community/minecraft/1.11.18/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/minecraft/1.11.17/templates/library/base_v1_1_3/mariadb.py b/trains/community/minecraft/1.11.18/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/minecraft/1.11.17/templates/library/base_v1_1_3/mariadb.py rename to trains/community/minecraft/1.11.18/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/minecraft/1.11.17/templates/library/base_v1_1_3/metadata.py b/trains/community/minecraft/1.11.18/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/minecraft/1.11.17/templates/library/base_v1_1_3/metadata.py rename to trains/community/minecraft/1.11.18/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/minecraft/1.11.17/templates/library/base_v1_1_3/network.py b/trains/community/minecraft/1.11.18/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/minecraft/1.11.17/templates/library/base_v1_1_3/network.py rename to trains/community/minecraft/1.11.18/templates/library/base_v1_1_4/network.py diff --git a/trains/community/minecraft/1.11.18/templates/library/base_v1_1_4/permissions.py b/trains/community/minecraft/1.11.18/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/community/minecraft/1.11.18/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/community/minecraft/1.11.17/templates/library/base_v1_1_3/ports.py b/trains/community/minecraft/1.11.18/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/minecraft/1.11.17/templates/library/base_v1_1_3/ports.py rename to trains/community/minecraft/1.11.18/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/minecraft/1.11.17/templates/library/base_v1_1_3/postgres.py b/trains/community/minecraft/1.11.18/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/minecraft/1.11.17/templates/library/base_v1_1_3/postgres.py rename to trains/community/minecraft/1.11.18/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/minecraft/1.11.17/templates/library/base_v1_1_3/redis.py b/trains/community/minecraft/1.11.18/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/minecraft/1.11.17/templates/library/base_v1_1_3/redis.py rename to trains/community/minecraft/1.11.18/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/minecraft/1.11.17/templates/library/base_v1_1_3/resources.py b/trains/community/minecraft/1.11.18/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/minecraft/1.11.17/templates/library/base_v1_1_3/resources.py rename to trains/community/minecraft/1.11.18/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/minecraft/1.11.17/templates/library/base_v1_1_3/security.py b/trains/community/minecraft/1.11.18/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/minecraft/1.11.17/templates/library/base_v1_1_3/security.py rename to trains/community/minecraft/1.11.18/templates/library/base_v1_1_4/security.py diff --git a/trains/community/minecraft/1.11.17/templates/library/base_v1_1_3/storage.py b/trains/community/minecraft/1.11.18/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/minecraft/1.11.17/templates/library/base_v1_1_3/storage.py rename to trains/community/minecraft/1.11.18/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/minecraft/1.11.17/templates/library/base_v1_1_3/utils.py b/trains/community/minecraft/1.11.18/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/minecraft/1.11.17/templates/library/base_v1_1_3/utils.py rename to trains/community/minecraft/1.11.18/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/minecraft/1.11.17/templates/test_values/java11-j9-vanilla-values.yaml b/trains/community/minecraft/1.11.18/templates/test_values/java11-j9-vanilla-values.yaml similarity index 100% rename from trains/community/minecraft/1.11.17/templates/test_values/java11-j9-vanilla-values.yaml rename to trains/community/minecraft/1.11.18/templates/test_values/java11-j9-vanilla-values.yaml diff --git a/trains/community/minecraft/1.11.17/templates/test_values/java11-jdk-vanilla-values.yaml b/trains/community/minecraft/1.11.18/templates/test_values/java11-jdk-vanilla-values.yaml similarity index 100% rename from trains/community/minecraft/1.11.17/templates/test_values/java11-jdk-vanilla-values.yaml rename to trains/community/minecraft/1.11.18/templates/test_values/java11-jdk-vanilla-values.yaml diff --git a/trains/community/minecraft/1.11.17/templates/test_values/java11-vanilla-values.yaml b/trains/community/minecraft/1.11.18/templates/test_values/java11-vanilla-values.yaml similarity index 100% rename from trains/community/minecraft/1.11.17/templates/test_values/java11-vanilla-values.yaml rename to trains/community/minecraft/1.11.18/templates/test_values/java11-vanilla-values.yaml diff --git a/trains/community/minecraft/1.11.17/templates/test_values/java17-alpine-vanilla-values.yaml b/trains/community/minecraft/1.11.18/templates/test_values/java17-alpine-vanilla-values.yaml similarity index 100% rename from trains/community/minecraft/1.11.17/templates/test_values/java17-alpine-vanilla-values.yaml rename to trains/community/minecraft/1.11.18/templates/test_values/java17-alpine-vanilla-values.yaml diff --git a/trains/community/minecraft/1.11.17/templates/test_values/java17-gce-vanilla-values.yaml b/trains/community/minecraft/1.11.18/templates/test_values/java17-gce-vanilla-values.yaml similarity index 100% rename from trains/community/minecraft/1.11.17/templates/test_values/java17-gce-vanilla-values.yaml rename to trains/community/minecraft/1.11.18/templates/test_values/java17-gce-vanilla-values.yaml diff --git a/trains/community/minecraft/1.11.17/templates/test_values/java17-j9-vanilla-values.yaml b/trains/community/minecraft/1.11.18/templates/test_values/java17-j9-vanilla-values.yaml similarity index 100% rename from trains/community/minecraft/1.11.17/templates/test_values/java17-j9-vanilla-values.yaml rename to trains/community/minecraft/1.11.18/templates/test_values/java17-j9-vanilla-values.yaml diff --git a/trains/community/minecraft/1.11.17/templates/test_values/java17-jdk-vanilla-values.yaml b/trains/community/minecraft/1.11.18/templates/test_values/java17-jdk-vanilla-values.yaml similarity index 100% rename from trains/community/minecraft/1.11.17/templates/test_values/java17-jdk-vanilla-values.yaml rename to trains/community/minecraft/1.11.18/templates/test_values/java17-jdk-vanilla-values.yaml diff --git a/trains/community/minecraft/1.11.17/templates/test_values/java17-vanilla-values.yaml b/trains/community/minecraft/1.11.18/templates/test_values/java17-vanilla-values.yaml similarity index 100% rename from trains/community/minecraft/1.11.17/templates/test_values/java17-vanilla-values.yaml rename to trains/community/minecraft/1.11.18/templates/test_values/java17-vanilla-values.yaml diff --git a/trains/community/minecraft/1.11.17/templates/test_values/java19-vanilla-values.yaml b/trains/community/minecraft/1.11.18/templates/test_values/java19-vanilla-values.yaml similarity index 100% rename from trains/community/minecraft/1.11.17/templates/test_values/java19-vanilla-values.yaml rename to trains/community/minecraft/1.11.18/templates/test_values/java19-vanilla-values.yaml diff --git a/trains/community/minecraft/1.11.17/templates/test_values/java21-alpine-vanila-values.yaml b/trains/community/minecraft/1.11.18/templates/test_values/java21-alpine-vanila-values.yaml similarity index 100% rename from trains/community/minecraft/1.11.17/templates/test_values/java21-alpine-vanila-values.yaml rename to trains/community/minecraft/1.11.18/templates/test_values/java21-alpine-vanila-values.yaml diff --git a/trains/community/minecraft/1.11.17/templates/test_values/java21-graalvm-vanila-values.yaml b/trains/community/minecraft/1.11.18/templates/test_values/java21-graalvm-vanila-values.yaml similarity index 100% rename from trains/community/minecraft/1.11.17/templates/test_values/java21-graalvm-vanila-values.yaml rename to trains/community/minecraft/1.11.18/templates/test_values/java21-graalvm-vanila-values.yaml diff --git a/trains/community/minecraft/1.11.17/templates/test_values/java21-vanila-values.yaml b/trains/community/minecraft/1.11.18/templates/test_values/java21-vanila-values.yaml similarity index 100% rename from trains/community/minecraft/1.11.17/templates/test_values/java21-vanila-values.yaml rename to trains/community/minecraft/1.11.18/templates/test_values/java21-vanila-values.yaml diff --git a/trains/community/minecraft/1.11.17/templates/test_values/java8-gce-vanilla-values.yaml b/trains/community/minecraft/1.11.18/templates/test_values/java8-gce-vanilla-values.yaml similarity index 100% rename from trains/community/minecraft/1.11.17/templates/test_values/java8-gce-vanilla-values.yaml rename to trains/community/minecraft/1.11.18/templates/test_values/java8-gce-vanilla-values.yaml diff --git a/trains/community/minecraft/1.11.17/templates/test_values/java8-j9-vanilla-values.yaml b/trains/community/minecraft/1.11.18/templates/test_values/java8-j9-vanilla-values.yaml similarity index 100% rename from trains/community/minecraft/1.11.17/templates/test_values/java8-j9-vanilla-values.yaml rename to trains/community/minecraft/1.11.18/templates/test_values/java8-j9-vanilla-values.yaml diff --git a/trains/community/minecraft/1.11.17/templates/test_values/java8-jdk-vanilla-values.yaml b/trains/community/minecraft/1.11.18/templates/test_values/java8-jdk-vanilla-values.yaml similarity index 100% rename from trains/community/minecraft/1.11.17/templates/test_values/java8-jdk-vanilla-values.yaml rename to trains/community/minecraft/1.11.18/templates/test_values/java8-jdk-vanilla-values.yaml diff --git a/trains/community/minecraft/1.11.17/templates/test_values/java8-vanilla-values.yaml b/trains/community/minecraft/1.11.18/templates/test_values/java8-vanilla-values.yaml similarity index 100% rename from trains/community/minecraft/1.11.17/templates/test_values/java8-vanilla-values.yaml rename to trains/community/minecraft/1.11.18/templates/test_values/java8-vanilla-values.yaml diff --git a/trains/community/mineos/1.0.17/templates/library/base_v1_1_3/healthchecks.py b/trains/community/mineos/1.0.17/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/community/mineos/1.0.17/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/mineos/1.0.17/templates/library/base_v1_1_3/permissions.py b/trains/community/mineos/1.0.17/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/community/mineos/1.0.17/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/community/mineos/1.0.17/README.md b/trains/community/mineos/1.0.18/README.md similarity index 100% rename from trains/community/mineos/1.0.17/README.md rename to trains/community/mineos/1.0.18/README.md diff --git a/trains/community/mineos/1.0.17/app.yaml b/trains/community/mineos/1.0.18/app.yaml similarity index 91% rename from trains/community/mineos/1.0.17/app.yaml rename to trains/community/mineos/1.0.18/app.yaml index 634c5e910f..55f7151289 100644 --- a/trains/community/mineos/1.0.17/app.yaml +++ b/trains/community/mineos/1.0.18/app.yaml @@ -19,8 +19,8 @@ host_mounts: [] icon: https://media.sys.truenas.net/apps/mineos/icons/icon.png keywords: - minecraft -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -39,4 +39,4 @@ sources: - https://github.com/hexparrot/mineos-node title: MineOS train: community -version: 1.0.17 +version: 1.0.18 diff --git a/trains/community/mineos/1.0.17/ix_values.yaml b/trains/community/mineos/1.0.18/ix_values.yaml similarity index 100% rename from trains/community/mineos/1.0.17/ix_values.yaml rename to trains/community/mineos/1.0.18/ix_values.yaml diff --git a/trains/community/mineos/1.0.17/migrations/migrate_from_kubernetes b/trains/community/mineos/1.0.18/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/mineos/1.0.17/migrations/migrate_from_kubernetes rename to trains/community/mineos/1.0.18/migrations/migrate_from_kubernetes diff --git a/trains/community/mineos/1.0.17/migrations/migration_helpers/__init__.py b/trains/community/mineos/1.0.18/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/mineos/1.0.17/migrations/migration_helpers/__init__.py rename to trains/community/mineos/1.0.18/migrations/migration_helpers/__init__.py diff --git a/trains/community/mineos/1.0.17/migrations/migration_helpers/cpu.py b/trains/community/mineos/1.0.18/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/mineos/1.0.17/migrations/migration_helpers/cpu.py rename to trains/community/mineos/1.0.18/migrations/migration_helpers/cpu.py diff --git a/trains/community/mineos/1.0.17/migrations/migration_helpers/dns_config.py b/trains/community/mineos/1.0.18/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/mineos/1.0.17/migrations/migration_helpers/dns_config.py rename to trains/community/mineos/1.0.18/migrations/migration_helpers/dns_config.py diff --git a/trains/community/mineos/1.0.17/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/mineos/1.0.18/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/mineos/1.0.17/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/mineos/1.0.18/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/mineos/1.0.17/migrations/migration_helpers/memory.py b/trains/community/mineos/1.0.18/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/mineos/1.0.17/migrations/migration_helpers/memory.py rename to trains/community/mineos/1.0.18/migrations/migration_helpers/memory.py diff --git a/trains/community/mineos/1.0.17/migrations/migration_helpers/resources.py b/trains/community/mineos/1.0.18/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/mineos/1.0.17/migrations/migration_helpers/resources.py rename to trains/community/mineos/1.0.18/migrations/migration_helpers/resources.py diff --git a/trains/community/mineos/1.0.17/migrations/migration_helpers/storage.py b/trains/community/mineos/1.0.18/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/mineos/1.0.17/migrations/migration_helpers/storage.py rename to trains/community/mineos/1.0.18/migrations/migration_helpers/storage.py diff --git a/trains/community/mineos/1.0.17/questions.yaml b/trains/community/mineos/1.0.18/questions.yaml similarity index 100% rename from trains/community/mineos/1.0.17/questions.yaml rename to trains/community/mineos/1.0.18/questions.yaml diff --git a/trains/community/mineos/1.0.17/templates/docker-compose.yaml b/trains/community/mineos/1.0.18/templates/docker-compose.yaml similarity index 100% rename from trains/community/mineos/1.0.17/templates/docker-compose.yaml rename to trains/community/mineos/1.0.18/templates/docker-compose.yaml diff --git a/trains/community/mineos/1.0.17/templates/library/base_v1_1_3/__init__.py b/trains/community/mineos/1.0.18/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/mineos/1.0.17/templates/library/base_v1_1_3/__init__.py rename to trains/community/mineos/1.0.18/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/mineos/1.0.17/templates/library/base_v1_1_3/environment.py b/trains/community/mineos/1.0.18/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/mineos/1.0.17/templates/library/base_v1_1_3/environment.py rename to trains/community/mineos/1.0.18/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/mineos/1.0.18/templates/library/base_v1_1_4/healthchecks.py b/trains/community/mineos/1.0.18/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/community/mineos/1.0.18/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/mineos/1.0.17/templates/library/base_v1_1_3/mariadb.py b/trains/community/mineos/1.0.18/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/mineos/1.0.17/templates/library/base_v1_1_3/mariadb.py rename to trains/community/mineos/1.0.18/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/mineos/1.0.17/templates/library/base_v1_1_3/metadata.py b/trains/community/mineos/1.0.18/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/mineos/1.0.17/templates/library/base_v1_1_3/metadata.py rename to trains/community/mineos/1.0.18/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/mineos/1.0.17/templates/library/base_v1_1_3/network.py b/trains/community/mineos/1.0.18/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/mineos/1.0.17/templates/library/base_v1_1_3/network.py rename to trains/community/mineos/1.0.18/templates/library/base_v1_1_4/network.py diff --git a/trains/community/mineos/1.0.18/templates/library/base_v1_1_4/permissions.py b/trains/community/mineos/1.0.18/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/community/mineos/1.0.18/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/community/mineos/1.0.17/templates/library/base_v1_1_3/ports.py b/trains/community/mineos/1.0.18/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/mineos/1.0.17/templates/library/base_v1_1_3/ports.py rename to trains/community/mineos/1.0.18/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/mineos/1.0.17/templates/library/base_v1_1_3/postgres.py b/trains/community/mineos/1.0.18/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/mineos/1.0.17/templates/library/base_v1_1_3/postgres.py rename to trains/community/mineos/1.0.18/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/mineos/1.0.17/templates/library/base_v1_1_3/redis.py b/trains/community/mineos/1.0.18/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/mineos/1.0.17/templates/library/base_v1_1_3/redis.py rename to trains/community/mineos/1.0.18/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/mineos/1.0.17/templates/library/base_v1_1_3/resources.py b/trains/community/mineos/1.0.18/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/mineos/1.0.17/templates/library/base_v1_1_3/resources.py rename to trains/community/mineos/1.0.18/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/mineos/1.0.17/templates/library/base_v1_1_3/security.py b/trains/community/mineos/1.0.18/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/mineos/1.0.17/templates/library/base_v1_1_3/security.py rename to trains/community/mineos/1.0.18/templates/library/base_v1_1_4/security.py diff --git a/trains/community/mineos/1.0.17/templates/library/base_v1_1_3/storage.py b/trains/community/mineos/1.0.18/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/mineos/1.0.17/templates/library/base_v1_1_3/storage.py rename to trains/community/mineos/1.0.18/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/mineos/1.0.17/templates/library/base_v1_1_3/utils.py b/trains/community/mineos/1.0.18/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/mineos/1.0.17/templates/library/base_v1_1_3/utils.py rename to trains/community/mineos/1.0.18/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/mineos/1.0.17/templates/test_values/basic-values.yaml b/trains/community/mineos/1.0.18/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/mineos/1.0.17/templates/test_values/basic-values.yaml rename to trains/community/mineos/1.0.18/templates/test_values/basic-values.yaml diff --git a/trains/community/mineos/1.0.17/templates/test_values/https-values.yaml b/trains/community/mineos/1.0.18/templates/test_values/https-values.yaml similarity index 100% rename from trains/community/mineos/1.0.17/templates/test_values/https-values.yaml rename to trains/community/mineos/1.0.18/templates/test_values/https-values.yaml diff --git a/trains/community/mumble/1.1.9/README.md b/trains/community/mumble/1.1.10/README.md similarity index 100% rename from trains/community/mumble/1.1.9/README.md rename to trains/community/mumble/1.1.10/README.md diff --git a/trains/community/mumble/1.1.9/app.yaml b/trains/community/mumble/1.1.10/app.yaml similarity index 84% rename from trains/community/mumble/1.1.9/app.yaml rename to trains/community/mumble/1.1.10/app.yaml index 37fbb74d79..e5d1d2b758 100644 --- a/trains/community/mumble/1.1.9/app.yaml +++ b/trains/community/mumble/1.1.10/app.yaml @@ -8,8 +8,8 @@ host_mounts: [] icon: https://media.sys.truenas.net/apps/mumble/icons/icon.svg keywords: - voice -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -27,4 +27,4 @@ sources: - https://www.mumble.info/ title: Mumble train: community -version: 1.1.9 +version: 1.1.10 diff --git a/trains/community/mumble/1.1.9/ix_values.yaml b/trains/community/mumble/1.1.10/ix_values.yaml similarity index 100% rename from trains/community/mumble/1.1.9/ix_values.yaml rename to trains/community/mumble/1.1.10/ix_values.yaml diff --git a/trains/community/mumble/1.1.9/migrations/migrate_from_kubernetes b/trains/community/mumble/1.1.10/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/mumble/1.1.9/migrations/migrate_from_kubernetes rename to trains/community/mumble/1.1.10/migrations/migrate_from_kubernetes diff --git a/trains/community/mumble/1.1.9/migrations/migration_helpers/__init__.py b/trains/community/mumble/1.1.10/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/mumble/1.1.9/migrations/migration_helpers/__init__.py rename to trains/community/mumble/1.1.10/migrations/migration_helpers/__init__.py diff --git a/trains/community/mumble/1.1.9/migrations/migration_helpers/cpu.py b/trains/community/mumble/1.1.10/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/mumble/1.1.9/migrations/migration_helpers/cpu.py rename to trains/community/mumble/1.1.10/migrations/migration_helpers/cpu.py diff --git a/trains/community/mumble/1.1.9/migrations/migration_helpers/dns_config.py b/trains/community/mumble/1.1.10/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/mumble/1.1.9/migrations/migration_helpers/dns_config.py rename to trains/community/mumble/1.1.10/migrations/migration_helpers/dns_config.py diff --git a/trains/community/mumble/1.1.9/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/mumble/1.1.10/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/mumble/1.1.9/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/mumble/1.1.10/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/mumble/1.1.9/migrations/migration_helpers/memory.py b/trains/community/mumble/1.1.10/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/mumble/1.1.9/migrations/migration_helpers/memory.py rename to trains/community/mumble/1.1.10/migrations/migration_helpers/memory.py diff --git a/trains/community/mumble/1.1.9/migrations/migration_helpers/resources.py b/trains/community/mumble/1.1.10/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/mumble/1.1.9/migrations/migration_helpers/resources.py rename to trains/community/mumble/1.1.10/migrations/migration_helpers/resources.py diff --git a/trains/community/mumble/1.1.9/migrations/migration_helpers/storage.py b/trains/community/mumble/1.1.10/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/mumble/1.1.9/migrations/migration_helpers/storage.py rename to trains/community/mumble/1.1.10/migrations/migration_helpers/storage.py diff --git a/trains/community/mumble/1.1.9/questions.yaml b/trains/community/mumble/1.1.10/questions.yaml similarity index 100% rename from trains/community/mumble/1.1.9/questions.yaml rename to trains/community/mumble/1.1.10/questions.yaml diff --git a/trains/community/mumble/1.1.9/templates/docker-compose.yaml b/trains/community/mumble/1.1.10/templates/docker-compose.yaml similarity index 100% rename from trains/community/mumble/1.1.9/templates/docker-compose.yaml rename to trains/community/mumble/1.1.10/templates/docker-compose.yaml diff --git a/trains/community/mumble/1.1.9/templates/library/base_v1_1_3/__init__.py b/trains/community/mumble/1.1.10/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/mumble/1.1.9/templates/library/base_v1_1_3/__init__.py rename to trains/community/mumble/1.1.10/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/mumble/1.1.9/templates/library/base_v1_1_3/environment.py b/trains/community/mumble/1.1.10/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/mumble/1.1.9/templates/library/base_v1_1_3/environment.py rename to trains/community/mumble/1.1.10/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/mumble/1.1.10/templates/library/base_v1_1_4/healthchecks.py b/trains/community/mumble/1.1.10/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/community/mumble/1.1.10/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/mumble/1.1.9/templates/library/base_v1_1_3/mariadb.py b/trains/community/mumble/1.1.10/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/mumble/1.1.9/templates/library/base_v1_1_3/mariadb.py rename to trains/community/mumble/1.1.10/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/mumble/1.1.9/templates/library/base_v1_1_3/metadata.py b/trains/community/mumble/1.1.10/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/mumble/1.1.9/templates/library/base_v1_1_3/metadata.py rename to trains/community/mumble/1.1.10/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/mumble/1.1.9/templates/library/base_v1_1_3/network.py b/trains/community/mumble/1.1.10/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/mumble/1.1.9/templates/library/base_v1_1_3/network.py rename to trains/community/mumble/1.1.10/templates/library/base_v1_1_4/network.py diff --git a/trains/community/mumble/1.1.10/templates/library/base_v1_1_4/permissions.py b/trains/community/mumble/1.1.10/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/community/mumble/1.1.10/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/community/mumble/1.1.9/templates/library/base_v1_1_3/ports.py b/trains/community/mumble/1.1.10/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/mumble/1.1.9/templates/library/base_v1_1_3/ports.py rename to trains/community/mumble/1.1.10/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/mumble/1.1.9/templates/library/base_v1_1_3/postgres.py b/trains/community/mumble/1.1.10/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/mumble/1.1.9/templates/library/base_v1_1_3/postgres.py rename to trains/community/mumble/1.1.10/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/mumble/1.1.9/templates/library/base_v1_1_3/redis.py b/trains/community/mumble/1.1.10/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/mumble/1.1.9/templates/library/base_v1_1_3/redis.py rename to trains/community/mumble/1.1.10/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/mumble/1.1.9/templates/library/base_v1_1_3/resources.py b/trains/community/mumble/1.1.10/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/mumble/1.1.9/templates/library/base_v1_1_3/resources.py rename to trains/community/mumble/1.1.10/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/mumble/1.1.9/templates/library/base_v1_1_3/security.py b/trains/community/mumble/1.1.10/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/mumble/1.1.9/templates/library/base_v1_1_3/security.py rename to trains/community/mumble/1.1.10/templates/library/base_v1_1_4/security.py diff --git a/trains/community/mumble/1.1.9/templates/library/base_v1_1_3/storage.py b/trains/community/mumble/1.1.10/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/mumble/1.1.9/templates/library/base_v1_1_3/storage.py rename to trains/community/mumble/1.1.10/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/mumble/1.1.9/templates/library/base_v1_1_3/utils.py b/trains/community/mumble/1.1.10/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/mumble/1.1.9/templates/library/base_v1_1_3/utils.py rename to trains/community/mumble/1.1.10/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/mumble/1.1.9/templates/test_values/basic-values.yaml b/trains/community/mumble/1.1.10/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/mumble/1.1.9/templates/test_values/basic-values.yaml rename to trains/community/mumble/1.1.10/templates/test_values/basic-values.yaml diff --git a/trains/community/mumble/1.1.9/templates/test_values/https-values.yaml b/trains/community/mumble/1.1.10/templates/test_values/https-values.yaml similarity index 100% rename from trains/community/mumble/1.1.9/templates/test_values/https-values.yaml rename to trains/community/mumble/1.1.10/templates/test_values/https-values.yaml diff --git a/trains/community/mumble/1.1.9/templates/library/base_v1_1_3/healthchecks.py b/trains/community/mumble/1.1.9/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/community/mumble/1.1.9/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/mumble/1.1.9/templates/library/base_v1_1_3/permissions.py b/trains/community/mumble/1.1.9/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/community/mumble/1.1.9/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/community/n8n/1.3.22/templates/library/base_v1_1_3/healthchecks.py b/trains/community/n8n/1.3.22/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/community/n8n/1.3.22/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/n8n/1.3.22/templates/library/base_v1_1_3/permissions.py b/trains/community/n8n/1.3.22/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/community/n8n/1.3.22/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/community/n8n/1.3.22/README.md b/trains/community/n8n/1.3.23/README.md similarity index 100% rename from trains/community/n8n/1.3.22/README.md rename to trains/community/n8n/1.3.23/README.md diff --git a/trains/community/n8n/1.3.22/app.yaml b/trains/community/n8n/1.3.23/app.yaml similarity index 90% rename from trains/community/n8n/1.3.22/app.yaml rename to trains/community/n8n/1.3.23/app.yaml index 52b139ce86..7f220747a4 100644 --- a/trains/community/n8n/1.3.22/app.yaml +++ b/trains/community/n8n/1.3.23/app.yaml @@ -9,8 +9,8 @@ icon: https://media.sys.truenas.net/apps/n8n/icons/icon.png keywords: - workflows - automation -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -42,4 +42,4 @@ sources: - https://hub.docker.com/r/n8nio/n8n title: n8n train: community -version: 1.3.22 +version: 1.3.23 diff --git a/trains/community/n8n/1.3.22/ix_values.yaml b/trains/community/n8n/1.3.23/ix_values.yaml similarity index 100% rename from trains/community/n8n/1.3.22/ix_values.yaml rename to trains/community/n8n/1.3.23/ix_values.yaml diff --git a/trains/community/n8n/1.3.22/migrations/migrate_from_kubernetes b/trains/community/n8n/1.3.23/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/n8n/1.3.22/migrations/migrate_from_kubernetes rename to trains/community/n8n/1.3.23/migrations/migrate_from_kubernetes diff --git a/trains/community/n8n/1.3.22/migrations/migration_helpers/__init__.py b/trains/community/n8n/1.3.23/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/n8n/1.3.22/migrations/migration_helpers/__init__.py rename to trains/community/n8n/1.3.23/migrations/migration_helpers/__init__.py diff --git a/trains/community/n8n/1.3.22/migrations/migration_helpers/cpu.py b/trains/community/n8n/1.3.23/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/n8n/1.3.22/migrations/migration_helpers/cpu.py rename to trains/community/n8n/1.3.23/migrations/migration_helpers/cpu.py diff --git a/trains/community/n8n/1.3.22/migrations/migration_helpers/dns_config.py b/trains/community/n8n/1.3.23/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/n8n/1.3.22/migrations/migration_helpers/dns_config.py rename to trains/community/n8n/1.3.23/migrations/migration_helpers/dns_config.py diff --git a/trains/community/n8n/1.3.22/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/n8n/1.3.23/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/n8n/1.3.22/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/n8n/1.3.23/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/n8n/1.3.22/migrations/migration_helpers/memory.py b/trains/community/n8n/1.3.23/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/n8n/1.3.22/migrations/migration_helpers/memory.py rename to trains/community/n8n/1.3.23/migrations/migration_helpers/memory.py diff --git a/trains/community/n8n/1.3.22/migrations/migration_helpers/resources.py b/trains/community/n8n/1.3.23/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/n8n/1.3.22/migrations/migration_helpers/resources.py rename to trains/community/n8n/1.3.23/migrations/migration_helpers/resources.py diff --git a/trains/community/n8n/1.3.22/migrations/migration_helpers/storage.py b/trains/community/n8n/1.3.23/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/n8n/1.3.22/migrations/migration_helpers/storage.py rename to trains/community/n8n/1.3.23/migrations/migration_helpers/storage.py diff --git a/trains/community/n8n/1.3.22/questions.yaml b/trains/community/n8n/1.3.23/questions.yaml similarity index 100% rename from trains/community/n8n/1.3.22/questions.yaml rename to trains/community/n8n/1.3.23/questions.yaml diff --git a/trains/community/n8n/1.3.22/templates/docker-compose.yaml b/trains/community/n8n/1.3.23/templates/docker-compose.yaml similarity index 100% rename from trains/community/n8n/1.3.22/templates/docker-compose.yaml rename to trains/community/n8n/1.3.23/templates/docker-compose.yaml diff --git a/trains/community/n8n/1.3.22/templates/library/base_v1_1_3/__init__.py b/trains/community/n8n/1.3.23/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/n8n/1.3.22/templates/library/base_v1_1_3/__init__.py rename to trains/community/n8n/1.3.23/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/n8n/1.3.22/templates/library/base_v1_1_3/environment.py b/trains/community/n8n/1.3.23/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/n8n/1.3.22/templates/library/base_v1_1_3/environment.py rename to trains/community/n8n/1.3.23/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/n8n/1.3.23/templates/library/base_v1_1_4/healthchecks.py b/trains/community/n8n/1.3.23/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/community/n8n/1.3.23/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/n8n/1.3.22/templates/library/base_v1_1_3/mariadb.py b/trains/community/n8n/1.3.23/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/n8n/1.3.22/templates/library/base_v1_1_3/mariadb.py rename to trains/community/n8n/1.3.23/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/n8n/1.3.22/templates/library/base_v1_1_3/metadata.py b/trains/community/n8n/1.3.23/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/n8n/1.3.22/templates/library/base_v1_1_3/metadata.py rename to trains/community/n8n/1.3.23/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/n8n/1.3.22/templates/library/base_v1_1_3/network.py b/trains/community/n8n/1.3.23/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/n8n/1.3.22/templates/library/base_v1_1_3/network.py rename to trains/community/n8n/1.3.23/templates/library/base_v1_1_4/network.py diff --git a/trains/community/n8n/1.3.23/templates/library/base_v1_1_4/permissions.py b/trains/community/n8n/1.3.23/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/community/n8n/1.3.23/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/community/n8n/1.3.22/templates/library/base_v1_1_3/ports.py b/trains/community/n8n/1.3.23/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/n8n/1.3.22/templates/library/base_v1_1_3/ports.py rename to trains/community/n8n/1.3.23/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/n8n/1.3.22/templates/library/base_v1_1_3/postgres.py b/trains/community/n8n/1.3.23/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/n8n/1.3.22/templates/library/base_v1_1_3/postgres.py rename to trains/community/n8n/1.3.23/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/n8n/1.3.22/templates/library/base_v1_1_3/redis.py b/trains/community/n8n/1.3.23/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/n8n/1.3.22/templates/library/base_v1_1_3/redis.py rename to trains/community/n8n/1.3.23/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/n8n/1.3.22/templates/library/base_v1_1_3/resources.py b/trains/community/n8n/1.3.23/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/n8n/1.3.22/templates/library/base_v1_1_3/resources.py rename to trains/community/n8n/1.3.23/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/n8n/1.3.22/templates/library/base_v1_1_3/security.py b/trains/community/n8n/1.3.23/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/n8n/1.3.22/templates/library/base_v1_1_3/security.py rename to trains/community/n8n/1.3.23/templates/library/base_v1_1_4/security.py diff --git a/trains/community/n8n/1.3.22/templates/library/base_v1_1_3/storage.py b/trains/community/n8n/1.3.23/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/n8n/1.3.22/templates/library/base_v1_1_3/storage.py rename to trains/community/n8n/1.3.23/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/n8n/1.3.22/templates/library/base_v1_1_3/utils.py b/trains/community/n8n/1.3.23/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/n8n/1.3.22/templates/library/base_v1_1_3/utils.py rename to trains/community/n8n/1.3.23/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/n8n/1.3.22/templates/test_values/basic-values.yaml b/trains/community/n8n/1.3.23/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/n8n/1.3.22/templates/test_values/basic-values.yaml rename to trains/community/n8n/1.3.23/templates/test_values/basic-values.yaml diff --git a/trains/community/n8n/1.3.22/templates/test_values/https-values.yaml b/trains/community/n8n/1.3.23/templates/test_values/https-values.yaml similarity index 100% rename from trains/community/n8n/1.3.22/templates/test_values/https-values.yaml rename to trains/community/n8n/1.3.23/templates/test_values/https-values.yaml diff --git a/trains/community/navidrome/1.0.23/templates/library/base_v1_1_3/healthchecks.py b/trains/community/navidrome/1.0.23/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/community/navidrome/1.0.23/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/navidrome/1.0.23/templates/library/base_v1_1_3/permissions.py b/trains/community/navidrome/1.0.23/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/community/navidrome/1.0.23/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/community/navidrome/1.0.23/README.md b/trains/community/navidrome/1.0.24/README.md similarity index 100% rename from trains/community/navidrome/1.0.23/README.md rename to trains/community/navidrome/1.0.24/README.md diff --git a/trains/community/navidrome/1.0.23/app.yaml b/trains/community/navidrome/1.0.24/app.yaml similarity index 87% rename from trains/community/navidrome/1.0.23/app.yaml rename to trains/community/navidrome/1.0.24/app.yaml index a483fdac79..d392cfe844 100644 --- a/trains/community/navidrome/1.0.23/app.yaml +++ b/trains/community/navidrome/1.0.24/app.yaml @@ -11,8 +11,8 @@ icon: https://media.sys.truenas.net/apps/navidrome/icons/icon.png keywords: - media - music -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -32,4 +32,4 @@ sources: - https://github.com/navidrome/navidrome/ title: Navidrome train: community -version: 1.0.23 +version: 1.0.24 diff --git a/trains/community/navidrome/1.0.23/ix_values.yaml b/trains/community/navidrome/1.0.24/ix_values.yaml similarity index 100% rename from trains/community/navidrome/1.0.23/ix_values.yaml rename to trains/community/navidrome/1.0.24/ix_values.yaml diff --git a/trains/community/navidrome/1.0.23/migrations/migrate_from_kubernetes b/trains/community/navidrome/1.0.24/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/navidrome/1.0.23/migrations/migrate_from_kubernetes rename to trains/community/navidrome/1.0.24/migrations/migrate_from_kubernetes diff --git a/trains/community/navidrome/1.0.23/migrations/migration_helpers/__init__.py b/trains/community/navidrome/1.0.24/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/navidrome/1.0.23/migrations/migration_helpers/__init__.py rename to trains/community/navidrome/1.0.24/migrations/migration_helpers/__init__.py diff --git a/trains/community/navidrome/1.0.23/migrations/migration_helpers/cpu.py b/trains/community/navidrome/1.0.24/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/navidrome/1.0.23/migrations/migration_helpers/cpu.py rename to trains/community/navidrome/1.0.24/migrations/migration_helpers/cpu.py diff --git a/trains/community/navidrome/1.0.23/migrations/migration_helpers/dns_config.py b/trains/community/navidrome/1.0.24/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/navidrome/1.0.23/migrations/migration_helpers/dns_config.py rename to trains/community/navidrome/1.0.24/migrations/migration_helpers/dns_config.py diff --git a/trains/community/navidrome/1.0.23/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/navidrome/1.0.24/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/navidrome/1.0.23/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/navidrome/1.0.24/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/navidrome/1.0.23/migrations/migration_helpers/memory.py b/trains/community/navidrome/1.0.24/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/navidrome/1.0.23/migrations/migration_helpers/memory.py rename to trains/community/navidrome/1.0.24/migrations/migration_helpers/memory.py diff --git a/trains/community/navidrome/1.0.23/migrations/migration_helpers/resources.py b/trains/community/navidrome/1.0.24/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/navidrome/1.0.23/migrations/migration_helpers/resources.py rename to trains/community/navidrome/1.0.24/migrations/migration_helpers/resources.py diff --git a/trains/community/navidrome/1.0.23/migrations/migration_helpers/storage.py b/trains/community/navidrome/1.0.24/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/navidrome/1.0.23/migrations/migration_helpers/storage.py rename to trains/community/navidrome/1.0.24/migrations/migration_helpers/storage.py diff --git a/trains/community/navidrome/1.0.23/questions.yaml b/trains/community/navidrome/1.0.24/questions.yaml similarity index 100% rename from trains/community/navidrome/1.0.23/questions.yaml rename to trains/community/navidrome/1.0.24/questions.yaml diff --git a/trains/community/navidrome/1.0.23/templates/docker-compose.yaml b/trains/community/navidrome/1.0.24/templates/docker-compose.yaml similarity index 100% rename from trains/community/navidrome/1.0.23/templates/docker-compose.yaml rename to trains/community/navidrome/1.0.24/templates/docker-compose.yaml diff --git a/trains/community/navidrome/1.0.23/templates/library/base_v1_1_3/__init__.py b/trains/community/navidrome/1.0.24/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/navidrome/1.0.23/templates/library/base_v1_1_3/__init__.py rename to trains/community/navidrome/1.0.24/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/navidrome/1.0.23/templates/library/base_v1_1_3/environment.py b/trains/community/navidrome/1.0.24/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/navidrome/1.0.23/templates/library/base_v1_1_3/environment.py rename to trains/community/navidrome/1.0.24/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/navidrome/1.0.24/templates/library/base_v1_1_4/healthchecks.py b/trains/community/navidrome/1.0.24/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/community/navidrome/1.0.24/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/navidrome/1.0.23/templates/library/base_v1_1_3/mariadb.py b/trains/community/navidrome/1.0.24/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/navidrome/1.0.23/templates/library/base_v1_1_3/mariadb.py rename to trains/community/navidrome/1.0.24/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/navidrome/1.0.23/templates/library/base_v1_1_3/metadata.py b/trains/community/navidrome/1.0.24/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/navidrome/1.0.23/templates/library/base_v1_1_3/metadata.py rename to trains/community/navidrome/1.0.24/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/navidrome/1.0.23/templates/library/base_v1_1_3/network.py b/trains/community/navidrome/1.0.24/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/navidrome/1.0.23/templates/library/base_v1_1_3/network.py rename to trains/community/navidrome/1.0.24/templates/library/base_v1_1_4/network.py diff --git a/trains/community/navidrome/1.0.24/templates/library/base_v1_1_4/permissions.py b/trains/community/navidrome/1.0.24/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/community/navidrome/1.0.24/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/community/navidrome/1.0.23/templates/library/base_v1_1_3/ports.py b/trains/community/navidrome/1.0.24/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/navidrome/1.0.23/templates/library/base_v1_1_3/ports.py rename to trains/community/navidrome/1.0.24/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/navidrome/1.0.23/templates/library/base_v1_1_3/postgres.py b/trains/community/navidrome/1.0.24/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/navidrome/1.0.23/templates/library/base_v1_1_3/postgres.py rename to trains/community/navidrome/1.0.24/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/navidrome/1.0.23/templates/library/base_v1_1_3/redis.py b/trains/community/navidrome/1.0.24/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/navidrome/1.0.23/templates/library/base_v1_1_3/redis.py rename to trains/community/navidrome/1.0.24/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/navidrome/1.0.23/templates/library/base_v1_1_3/resources.py b/trains/community/navidrome/1.0.24/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/navidrome/1.0.23/templates/library/base_v1_1_3/resources.py rename to trains/community/navidrome/1.0.24/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/navidrome/1.0.23/templates/library/base_v1_1_3/security.py b/trains/community/navidrome/1.0.24/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/navidrome/1.0.23/templates/library/base_v1_1_3/security.py rename to trains/community/navidrome/1.0.24/templates/library/base_v1_1_4/security.py diff --git a/trains/community/navidrome/1.0.23/templates/library/base_v1_1_3/storage.py b/trains/community/navidrome/1.0.24/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/navidrome/1.0.23/templates/library/base_v1_1_3/storage.py rename to trains/community/navidrome/1.0.24/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/navidrome/1.0.23/templates/library/base_v1_1_3/utils.py b/trains/community/navidrome/1.0.24/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/navidrome/1.0.23/templates/library/base_v1_1_3/utils.py rename to trains/community/navidrome/1.0.24/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/navidrome/1.0.23/templates/test_values/basic-values.yaml b/trains/community/navidrome/1.0.24/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/navidrome/1.0.23/templates/test_values/basic-values.yaml rename to trains/community/navidrome/1.0.24/templates/test_values/basic-values.yaml diff --git a/trains/community/netbootxyz/1.0.18/templates/library/base_v1_1_3/healthchecks.py b/trains/community/netbootxyz/1.0.18/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/community/netbootxyz/1.0.18/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/netbootxyz/1.0.18/templates/library/base_v1_1_3/permissions.py b/trains/community/netbootxyz/1.0.18/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/community/netbootxyz/1.0.18/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/community/netbootxyz/1.0.18/README.md b/trains/community/netbootxyz/1.0.19/README.md similarity index 100% rename from trains/community/netbootxyz/1.0.18/README.md rename to trains/community/netbootxyz/1.0.19/README.md diff --git a/trains/community/netbootxyz/1.0.18/app.yaml b/trains/community/netbootxyz/1.0.19/app.yaml similarity index 92% rename from trains/community/netbootxyz/1.0.18/app.yaml rename to trains/community/netbootxyz/1.0.19/app.yaml index 5613eaa384..0b5a998977 100644 --- a/trains/community/netbootxyz/1.0.18/app.yaml +++ b/trains/community/netbootxyz/1.0.19/app.yaml @@ -30,8 +30,8 @@ keywords: - netboot - netbootxyz - netboot.xyz -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -50,4 +50,4 @@ sources: - https://netboot.xyz title: Netboot.xyz train: community -version: 1.0.18 +version: 1.0.19 diff --git a/trains/community/netbootxyz/1.0.18/ix_values.yaml b/trains/community/netbootxyz/1.0.19/ix_values.yaml similarity index 100% rename from trains/community/netbootxyz/1.0.18/ix_values.yaml rename to trains/community/netbootxyz/1.0.19/ix_values.yaml diff --git a/trains/community/netbootxyz/1.0.18/migrations/migrate_from_kubernetes b/trains/community/netbootxyz/1.0.19/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/netbootxyz/1.0.18/migrations/migrate_from_kubernetes rename to trains/community/netbootxyz/1.0.19/migrations/migrate_from_kubernetes diff --git a/trains/community/netbootxyz/1.0.18/migrations/migration_helpers/__init__.py b/trains/community/netbootxyz/1.0.19/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/netbootxyz/1.0.18/migrations/migration_helpers/__init__.py rename to trains/community/netbootxyz/1.0.19/migrations/migration_helpers/__init__.py diff --git a/trains/community/netbootxyz/1.0.18/migrations/migration_helpers/cpu.py b/trains/community/netbootxyz/1.0.19/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/netbootxyz/1.0.18/migrations/migration_helpers/cpu.py rename to trains/community/netbootxyz/1.0.19/migrations/migration_helpers/cpu.py diff --git a/trains/community/netbootxyz/1.0.18/migrations/migration_helpers/dns_config.py b/trains/community/netbootxyz/1.0.19/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/netbootxyz/1.0.18/migrations/migration_helpers/dns_config.py rename to trains/community/netbootxyz/1.0.19/migrations/migration_helpers/dns_config.py diff --git a/trains/community/netbootxyz/1.0.18/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/netbootxyz/1.0.19/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/netbootxyz/1.0.18/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/netbootxyz/1.0.19/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/netbootxyz/1.0.18/migrations/migration_helpers/memory.py b/trains/community/netbootxyz/1.0.19/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/netbootxyz/1.0.18/migrations/migration_helpers/memory.py rename to trains/community/netbootxyz/1.0.19/migrations/migration_helpers/memory.py diff --git a/trains/community/netbootxyz/1.0.18/migrations/migration_helpers/resources.py b/trains/community/netbootxyz/1.0.19/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/netbootxyz/1.0.18/migrations/migration_helpers/resources.py rename to trains/community/netbootxyz/1.0.19/migrations/migration_helpers/resources.py diff --git a/trains/community/netbootxyz/1.0.18/migrations/migration_helpers/storage.py b/trains/community/netbootxyz/1.0.19/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/netbootxyz/1.0.18/migrations/migration_helpers/storage.py rename to trains/community/netbootxyz/1.0.19/migrations/migration_helpers/storage.py diff --git a/trains/community/netbootxyz/1.0.18/questions.yaml b/trains/community/netbootxyz/1.0.19/questions.yaml similarity index 100% rename from trains/community/netbootxyz/1.0.18/questions.yaml rename to trains/community/netbootxyz/1.0.19/questions.yaml diff --git a/trains/community/netbootxyz/1.0.18/templates/docker-compose.yaml b/trains/community/netbootxyz/1.0.19/templates/docker-compose.yaml similarity index 100% rename from trains/community/netbootxyz/1.0.18/templates/docker-compose.yaml rename to trains/community/netbootxyz/1.0.19/templates/docker-compose.yaml diff --git a/trains/community/netbootxyz/1.0.18/templates/library/base_v1_1_3/__init__.py b/trains/community/netbootxyz/1.0.19/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/netbootxyz/1.0.18/templates/library/base_v1_1_3/__init__.py rename to trains/community/netbootxyz/1.0.19/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/netbootxyz/1.0.18/templates/library/base_v1_1_3/environment.py b/trains/community/netbootxyz/1.0.19/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/netbootxyz/1.0.18/templates/library/base_v1_1_3/environment.py rename to trains/community/netbootxyz/1.0.19/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/netbootxyz/1.0.19/templates/library/base_v1_1_4/healthchecks.py b/trains/community/netbootxyz/1.0.19/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/community/netbootxyz/1.0.19/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/netbootxyz/1.0.18/templates/library/base_v1_1_3/mariadb.py b/trains/community/netbootxyz/1.0.19/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/netbootxyz/1.0.18/templates/library/base_v1_1_3/mariadb.py rename to trains/community/netbootxyz/1.0.19/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/netbootxyz/1.0.18/templates/library/base_v1_1_3/metadata.py b/trains/community/netbootxyz/1.0.19/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/netbootxyz/1.0.18/templates/library/base_v1_1_3/metadata.py rename to trains/community/netbootxyz/1.0.19/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/netbootxyz/1.0.18/templates/library/base_v1_1_3/network.py b/trains/community/netbootxyz/1.0.19/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/netbootxyz/1.0.18/templates/library/base_v1_1_3/network.py rename to trains/community/netbootxyz/1.0.19/templates/library/base_v1_1_4/network.py diff --git a/trains/community/netbootxyz/1.0.19/templates/library/base_v1_1_4/permissions.py b/trains/community/netbootxyz/1.0.19/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/community/netbootxyz/1.0.19/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/community/netbootxyz/1.0.18/templates/library/base_v1_1_3/ports.py b/trains/community/netbootxyz/1.0.19/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/netbootxyz/1.0.18/templates/library/base_v1_1_3/ports.py rename to trains/community/netbootxyz/1.0.19/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/netbootxyz/1.0.18/templates/library/base_v1_1_3/postgres.py b/trains/community/netbootxyz/1.0.19/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/netbootxyz/1.0.18/templates/library/base_v1_1_3/postgres.py rename to trains/community/netbootxyz/1.0.19/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/netbootxyz/1.0.18/templates/library/base_v1_1_3/redis.py b/trains/community/netbootxyz/1.0.19/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/netbootxyz/1.0.18/templates/library/base_v1_1_3/redis.py rename to trains/community/netbootxyz/1.0.19/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/netbootxyz/1.0.18/templates/library/base_v1_1_3/resources.py b/trains/community/netbootxyz/1.0.19/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/netbootxyz/1.0.18/templates/library/base_v1_1_3/resources.py rename to trains/community/netbootxyz/1.0.19/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/netbootxyz/1.0.18/templates/library/base_v1_1_3/security.py b/trains/community/netbootxyz/1.0.19/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/netbootxyz/1.0.18/templates/library/base_v1_1_3/security.py rename to trains/community/netbootxyz/1.0.19/templates/library/base_v1_1_4/security.py diff --git a/trains/community/netbootxyz/1.0.18/templates/library/base_v1_1_3/storage.py b/trains/community/netbootxyz/1.0.19/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/netbootxyz/1.0.18/templates/library/base_v1_1_3/storage.py rename to trains/community/netbootxyz/1.0.19/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/netbootxyz/1.0.18/templates/library/base_v1_1_3/utils.py b/trains/community/netbootxyz/1.0.19/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/netbootxyz/1.0.18/templates/library/base_v1_1_3/utils.py rename to trains/community/netbootxyz/1.0.19/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/netbootxyz/1.0.18/templates/test_values/basic-values.yaml b/trains/community/netbootxyz/1.0.19/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/netbootxyz/1.0.18/templates/test_values/basic-values.yaml rename to trains/community/netbootxyz/1.0.19/templates/test_values/basic-values.yaml diff --git a/trains/community/nginx-proxy-manager/1.0.19/templates/library/base_v1_1_3/healthchecks.py b/trains/community/nginx-proxy-manager/1.0.19/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/community/nginx-proxy-manager/1.0.19/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/nginx-proxy-manager/1.0.19/templates/library/base_v1_1_3/permissions.py b/trains/community/nginx-proxy-manager/1.0.19/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/community/nginx-proxy-manager/1.0.19/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/community/nginx-proxy-manager/1.0.19/README.md b/trains/community/nginx-proxy-manager/1.0.20/README.md similarity index 100% rename from trains/community/nginx-proxy-manager/1.0.19/README.md rename to trains/community/nginx-proxy-manager/1.0.20/README.md diff --git a/trains/community/nginx-proxy-manager/1.0.19/app.yaml b/trains/community/nginx-proxy-manager/1.0.20/app.yaml similarity index 92% rename from trains/community/nginx-proxy-manager/1.0.19/app.yaml rename to trains/community/nginx-proxy-manager/1.0.20/app.yaml index 1a49bff700..5d13748073 100644 --- a/trains/community/nginx-proxy-manager/1.0.19/app.yaml +++ b/trains/community/nginx-proxy-manager/1.0.20/app.yaml @@ -22,8 +22,8 @@ keywords: - reverse - nginx - proxy -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -44,4 +44,4 @@ sources: - https://hub.docker.com/r/jc21/nginx-proxy-manager title: Nginx Proxy Manager train: community -version: 1.0.19 +version: 1.0.20 diff --git a/trains/community/nginx-proxy-manager/1.0.19/ix_values.yaml b/trains/community/nginx-proxy-manager/1.0.20/ix_values.yaml similarity index 100% rename from trains/community/nginx-proxy-manager/1.0.19/ix_values.yaml rename to trains/community/nginx-proxy-manager/1.0.20/ix_values.yaml diff --git a/trains/community/nginx-proxy-manager/1.0.19/migrations/migrate_from_kubernetes b/trains/community/nginx-proxy-manager/1.0.20/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/nginx-proxy-manager/1.0.19/migrations/migrate_from_kubernetes rename to trains/community/nginx-proxy-manager/1.0.20/migrations/migrate_from_kubernetes diff --git a/trains/community/nginx-proxy-manager/1.0.19/migrations/migration_helpers/__init__.py b/trains/community/nginx-proxy-manager/1.0.20/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/nginx-proxy-manager/1.0.19/migrations/migration_helpers/__init__.py rename to trains/community/nginx-proxy-manager/1.0.20/migrations/migration_helpers/__init__.py diff --git a/trains/community/nginx-proxy-manager/1.0.19/migrations/migration_helpers/cpu.py b/trains/community/nginx-proxy-manager/1.0.20/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/nginx-proxy-manager/1.0.19/migrations/migration_helpers/cpu.py rename to trains/community/nginx-proxy-manager/1.0.20/migrations/migration_helpers/cpu.py diff --git a/trains/community/nginx-proxy-manager/1.0.19/migrations/migration_helpers/dns_config.py b/trains/community/nginx-proxy-manager/1.0.20/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/nginx-proxy-manager/1.0.19/migrations/migration_helpers/dns_config.py rename to trains/community/nginx-proxy-manager/1.0.20/migrations/migration_helpers/dns_config.py diff --git a/trains/community/nginx-proxy-manager/1.0.19/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/nginx-proxy-manager/1.0.20/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/nginx-proxy-manager/1.0.19/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/nginx-proxy-manager/1.0.20/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/nginx-proxy-manager/1.0.19/migrations/migration_helpers/memory.py b/trains/community/nginx-proxy-manager/1.0.20/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/nginx-proxy-manager/1.0.19/migrations/migration_helpers/memory.py rename to trains/community/nginx-proxy-manager/1.0.20/migrations/migration_helpers/memory.py diff --git a/trains/community/nginx-proxy-manager/1.0.19/migrations/migration_helpers/resources.py b/trains/community/nginx-proxy-manager/1.0.20/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/nginx-proxy-manager/1.0.19/migrations/migration_helpers/resources.py rename to trains/community/nginx-proxy-manager/1.0.20/migrations/migration_helpers/resources.py diff --git a/trains/community/nginx-proxy-manager/1.0.19/migrations/migration_helpers/storage.py b/trains/community/nginx-proxy-manager/1.0.20/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/nginx-proxy-manager/1.0.19/migrations/migration_helpers/storage.py rename to trains/community/nginx-proxy-manager/1.0.20/migrations/migration_helpers/storage.py diff --git a/trains/community/nginx-proxy-manager/1.0.19/questions.yaml b/trains/community/nginx-proxy-manager/1.0.20/questions.yaml similarity index 100% rename from trains/community/nginx-proxy-manager/1.0.19/questions.yaml rename to trains/community/nginx-proxy-manager/1.0.20/questions.yaml diff --git a/trains/community/nginx-proxy-manager/1.0.19/templates/docker-compose.yaml b/trains/community/nginx-proxy-manager/1.0.20/templates/docker-compose.yaml similarity index 100% rename from trains/community/nginx-proxy-manager/1.0.19/templates/docker-compose.yaml rename to trains/community/nginx-proxy-manager/1.0.20/templates/docker-compose.yaml diff --git a/trains/community/nginx-proxy-manager/1.0.19/templates/library/base_v1_1_3/__init__.py b/trains/community/nginx-proxy-manager/1.0.20/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/nginx-proxy-manager/1.0.19/templates/library/base_v1_1_3/__init__.py rename to trains/community/nginx-proxy-manager/1.0.20/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/nginx-proxy-manager/1.0.19/templates/library/base_v1_1_3/environment.py b/trains/community/nginx-proxy-manager/1.0.20/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/nginx-proxy-manager/1.0.19/templates/library/base_v1_1_3/environment.py rename to trains/community/nginx-proxy-manager/1.0.20/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/nginx-proxy-manager/1.0.20/templates/library/base_v1_1_4/healthchecks.py b/trains/community/nginx-proxy-manager/1.0.20/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/community/nginx-proxy-manager/1.0.20/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/nginx-proxy-manager/1.0.19/templates/library/base_v1_1_3/mariadb.py b/trains/community/nginx-proxy-manager/1.0.20/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/nginx-proxy-manager/1.0.19/templates/library/base_v1_1_3/mariadb.py rename to trains/community/nginx-proxy-manager/1.0.20/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/nginx-proxy-manager/1.0.19/templates/library/base_v1_1_3/metadata.py b/trains/community/nginx-proxy-manager/1.0.20/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/nginx-proxy-manager/1.0.19/templates/library/base_v1_1_3/metadata.py rename to trains/community/nginx-proxy-manager/1.0.20/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/nginx-proxy-manager/1.0.19/templates/library/base_v1_1_3/network.py b/trains/community/nginx-proxy-manager/1.0.20/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/nginx-proxy-manager/1.0.19/templates/library/base_v1_1_3/network.py rename to trains/community/nginx-proxy-manager/1.0.20/templates/library/base_v1_1_4/network.py diff --git a/trains/community/nginx-proxy-manager/1.0.20/templates/library/base_v1_1_4/permissions.py b/trains/community/nginx-proxy-manager/1.0.20/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/community/nginx-proxy-manager/1.0.20/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/community/nginx-proxy-manager/1.0.19/templates/library/base_v1_1_3/ports.py b/trains/community/nginx-proxy-manager/1.0.20/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/nginx-proxy-manager/1.0.19/templates/library/base_v1_1_3/ports.py rename to trains/community/nginx-proxy-manager/1.0.20/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/nginx-proxy-manager/1.0.19/templates/library/base_v1_1_3/postgres.py b/trains/community/nginx-proxy-manager/1.0.20/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/nginx-proxy-manager/1.0.19/templates/library/base_v1_1_3/postgres.py rename to trains/community/nginx-proxy-manager/1.0.20/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/nginx-proxy-manager/1.0.19/templates/library/base_v1_1_3/redis.py b/trains/community/nginx-proxy-manager/1.0.20/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/nginx-proxy-manager/1.0.19/templates/library/base_v1_1_3/redis.py rename to trains/community/nginx-proxy-manager/1.0.20/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/nginx-proxy-manager/1.0.19/templates/library/base_v1_1_3/resources.py b/trains/community/nginx-proxy-manager/1.0.20/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/nginx-proxy-manager/1.0.19/templates/library/base_v1_1_3/resources.py rename to trains/community/nginx-proxy-manager/1.0.20/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/nginx-proxy-manager/1.0.19/templates/library/base_v1_1_3/security.py b/trains/community/nginx-proxy-manager/1.0.20/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/nginx-proxy-manager/1.0.19/templates/library/base_v1_1_3/security.py rename to trains/community/nginx-proxy-manager/1.0.20/templates/library/base_v1_1_4/security.py diff --git a/trains/community/nginx-proxy-manager/1.0.19/templates/library/base_v1_1_3/storage.py b/trains/community/nginx-proxy-manager/1.0.20/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/nginx-proxy-manager/1.0.19/templates/library/base_v1_1_3/storage.py rename to trains/community/nginx-proxy-manager/1.0.20/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/nginx-proxy-manager/1.0.19/templates/library/base_v1_1_3/utils.py b/trains/community/nginx-proxy-manager/1.0.20/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/nginx-proxy-manager/1.0.19/templates/library/base_v1_1_3/utils.py rename to trains/community/nginx-proxy-manager/1.0.20/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/nginx-proxy-manager/1.0.19/templates/test_values/basic-values.yaml b/trains/community/nginx-proxy-manager/1.0.20/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/nginx-proxy-manager/1.0.19/templates/test_values/basic-values.yaml rename to trains/community/nginx-proxy-manager/1.0.20/templates/test_values/basic-values.yaml diff --git a/trains/community/node-red/1.0.32/templates/library/base_v1_1_3/healthchecks.py b/trains/community/node-red/1.0.32/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/community/node-red/1.0.32/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/node-red/1.0.32/templates/library/base_v1_1_3/permissions.py b/trains/community/node-red/1.0.32/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/community/node-red/1.0.32/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/community/node-red/1.0.32/README.md b/trains/community/node-red/1.0.33/README.md similarity index 100% rename from trains/community/node-red/1.0.32/README.md rename to trains/community/node-red/1.0.33/README.md diff --git a/trains/community/node-red/1.0.32/app.yaml b/trains/community/node-red/1.0.33/app.yaml similarity index 86% rename from trains/community/node-red/1.0.32/app.yaml rename to trains/community/node-red/1.0.33/app.yaml index 18a47a7705..ccc684f257 100644 --- a/trains/community/node-red/1.0.32/app.yaml +++ b/trains/community/node-red/1.0.33/app.yaml @@ -9,8 +9,8 @@ host_mounts: [] icon: https://media.sys.truenas.net/apps/node-red/icons/icon.png keywords: - automation -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -29,4 +29,4 @@ sources: - https://github.com/node-red/node-red-docker title: Node-RED train: community -version: 1.0.32 +version: 1.0.33 diff --git a/trains/community/node-red/1.0.32/ix_values.yaml b/trains/community/node-red/1.0.33/ix_values.yaml similarity index 100% rename from trains/community/node-red/1.0.32/ix_values.yaml rename to trains/community/node-red/1.0.33/ix_values.yaml diff --git a/trains/community/node-red/1.0.32/migrations/migrate_from_kubernetes b/trains/community/node-red/1.0.33/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/node-red/1.0.32/migrations/migrate_from_kubernetes rename to trains/community/node-red/1.0.33/migrations/migrate_from_kubernetes diff --git a/trains/community/node-red/1.0.32/migrations/migration_helpers/__init__.py b/trains/community/node-red/1.0.33/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/node-red/1.0.32/migrations/migration_helpers/__init__.py rename to trains/community/node-red/1.0.33/migrations/migration_helpers/__init__.py diff --git a/trains/community/node-red/1.0.32/migrations/migration_helpers/cpu.py b/trains/community/node-red/1.0.33/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/node-red/1.0.32/migrations/migration_helpers/cpu.py rename to trains/community/node-red/1.0.33/migrations/migration_helpers/cpu.py diff --git a/trains/community/node-red/1.0.32/migrations/migration_helpers/dns_config.py b/trains/community/node-red/1.0.33/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/node-red/1.0.32/migrations/migration_helpers/dns_config.py rename to trains/community/node-red/1.0.33/migrations/migration_helpers/dns_config.py diff --git a/trains/community/node-red/1.0.32/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/node-red/1.0.33/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/node-red/1.0.32/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/node-red/1.0.33/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/node-red/1.0.32/migrations/migration_helpers/memory.py b/trains/community/node-red/1.0.33/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/node-red/1.0.32/migrations/migration_helpers/memory.py rename to trains/community/node-red/1.0.33/migrations/migration_helpers/memory.py diff --git a/trains/community/node-red/1.0.32/migrations/migration_helpers/resources.py b/trains/community/node-red/1.0.33/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/node-red/1.0.32/migrations/migration_helpers/resources.py rename to trains/community/node-red/1.0.33/migrations/migration_helpers/resources.py diff --git a/trains/community/node-red/1.0.32/migrations/migration_helpers/storage.py b/trains/community/node-red/1.0.33/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/node-red/1.0.32/migrations/migration_helpers/storage.py rename to trains/community/node-red/1.0.33/migrations/migration_helpers/storage.py diff --git a/trains/community/node-red/1.0.32/questions.yaml b/trains/community/node-red/1.0.33/questions.yaml similarity index 100% rename from trains/community/node-red/1.0.32/questions.yaml rename to trains/community/node-red/1.0.33/questions.yaml diff --git a/trains/community/node-red/1.0.32/templates/docker-compose.yaml b/trains/community/node-red/1.0.33/templates/docker-compose.yaml similarity index 100% rename from trains/community/node-red/1.0.32/templates/docker-compose.yaml rename to trains/community/node-red/1.0.33/templates/docker-compose.yaml diff --git a/trains/community/node-red/1.0.32/templates/library/base_v1_1_3/__init__.py b/trains/community/node-red/1.0.33/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/node-red/1.0.32/templates/library/base_v1_1_3/__init__.py rename to trains/community/node-red/1.0.33/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/node-red/1.0.32/templates/library/base_v1_1_3/environment.py b/trains/community/node-red/1.0.33/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/node-red/1.0.32/templates/library/base_v1_1_3/environment.py rename to trains/community/node-red/1.0.33/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/node-red/1.0.33/templates/library/base_v1_1_4/healthchecks.py b/trains/community/node-red/1.0.33/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/community/node-red/1.0.33/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/node-red/1.0.32/templates/library/base_v1_1_3/mariadb.py b/trains/community/node-red/1.0.33/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/node-red/1.0.32/templates/library/base_v1_1_3/mariadb.py rename to trains/community/node-red/1.0.33/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/node-red/1.0.32/templates/library/base_v1_1_3/metadata.py b/trains/community/node-red/1.0.33/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/node-red/1.0.32/templates/library/base_v1_1_3/metadata.py rename to trains/community/node-red/1.0.33/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/node-red/1.0.32/templates/library/base_v1_1_3/network.py b/trains/community/node-red/1.0.33/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/node-red/1.0.32/templates/library/base_v1_1_3/network.py rename to trains/community/node-red/1.0.33/templates/library/base_v1_1_4/network.py diff --git a/trains/community/node-red/1.0.33/templates/library/base_v1_1_4/permissions.py b/trains/community/node-red/1.0.33/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/community/node-red/1.0.33/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/community/node-red/1.0.32/templates/library/base_v1_1_3/ports.py b/trains/community/node-red/1.0.33/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/node-red/1.0.32/templates/library/base_v1_1_3/ports.py rename to trains/community/node-red/1.0.33/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/node-red/1.0.32/templates/library/base_v1_1_3/postgres.py b/trains/community/node-red/1.0.33/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/node-red/1.0.32/templates/library/base_v1_1_3/postgres.py rename to trains/community/node-red/1.0.33/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/node-red/1.0.32/templates/library/base_v1_1_3/redis.py b/trains/community/node-red/1.0.33/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/node-red/1.0.32/templates/library/base_v1_1_3/redis.py rename to trains/community/node-red/1.0.33/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/node-red/1.0.32/templates/library/base_v1_1_3/resources.py b/trains/community/node-red/1.0.33/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/node-red/1.0.32/templates/library/base_v1_1_3/resources.py rename to trains/community/node-red/1.0.33/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/node-red/1.0.32/templates/library/base_v1_1_3/security.py b/trains/community/node-red/1.0.33/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/node-red/1.0.32/templates/library/base_v1_1_3/security.py rename to trains/community/node-red/1.0.33/templates/library/base_v1_1_4/security.py diff --git a/trains/community/node-red/1.0.32/templates/library/base_v1_1_3/storage.py b/trains/community/node-red/1.0.33/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/node-red/1.0.32/templates/library/base_v1_1_3/storage.py rename to trains/community/node-red/1.0.33/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/node-red/1.0.32/templates/library/base_v1_1_3/utils.py b/trains/community/node-red/1.0.33/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/node-red/1.0.32/templates/library/base_v1_1_3/utils.py rename to trains/community/node-red/1.0.33/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/node-red/1.0.32/templates/test_values/node14-minimal-values.yaml b/trains/community/node-red/1.0.33/templates/test_values/node14-minimal-values.yaml similarity index 100% rename from trains/community/node-red/1.0.32/templates/test_values/node14-minimal-values.yaml rename to trains/community/node-red/1.0.33/templates/test_values/node14-minimal-values.yaml diff --git a/trains/community/node-red/1.0.32/templates/test_values/node14-values.yaml b/trains/community/node-red/1.0.33/templates/test_values/node14-values.yaml similarity index 100% rename from trains/community/node-red/1.0.32/templates/test_values/node14-values.yaml rename to trains/community/node-red/1.0.33/templates/test_values/node14-values.yaml diff --git a/trains/community/node-red/1.0.32/templates/test_values/node16-minimal-values.yaml b/trains/community/node-red/1.0.33/templates/test_values/node16-minimal-values.yaml similarity index 100% rename from trains/community/node-red/1.0.32/templates/test_values/node16-minimal-values.yaml rename to trains/community/node-red/1.0.33/templates/test_values/node16-minimal-values.yaml diff --git a/trains/community/node-red/1.0.32/templates/test_values/node16-values.yaml b/trains/community/node-red/1.0.33/templates/test_values/node16-values.yaml similarity index 100% rename from trains/community/node-red/1.0.32/templates/test_values/node16-values.yaml rename to trains/community/node-red/1.0.33/templates/test_values/node16-values.yaml diff --git a/trains/community/node-red/1.0.32/templates/test_values/node18-minimal-values.yaml b/trains/community/node-red/1.0.33/templates/test_values/node18-minimal-values.yaml similarity index 100% rename from trains/community/node-red/1.0.32/templates/test_values/node18-minimal-values.yaml rename to trains/community/node-red/1.0.33/templates/test_values/node18-minimal-values.yaml diff --git a/trains/community/node-red/1.0.32/templates/test_values/node18-values.yaml b/trains/community/node-red/1.0.33/templates/test_values/node18-values.yaml similarity index 100% rename from trains/community/node-red/1.0.32/templates/test_values/node18-values.yaml rename to trains/community/node-red/1.0.33/templates/test_values/node18-values.yaml diff --git a/trains/community/odoo/1.0.3/templates/library/base_v1_1_3/healthchecks.py b/trains/community/odoo/1.0.3/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/community/odoo/1.0.3/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/odoo/1.0.3/templates/library/base_v1_1_3/permissions.py b/trains/community/odoo/1.0.3/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/community/odoo/1.0.3/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/community/odoo/1.0.3/README.md b/trains/community/odoo/1.0.4/README.md similarity index 100% rename from trains/community/odoo/1.0.3/README.md rename to trains/community/odoo/1.0.4/README.md diff --git a/trains/community/odoo/1.0.3/app.yaml b/trains/community/odoo/1.0.4/app.yaml similarity index 86% rename from trains/community/odoo/1.0.3/app.yaml rename to trains/community/odoo/1.0.4/app.yaml index 805901ae74..463d682ee1 100644 --- a/trains/community/odoo/1.0.3/app.yaml +++ b/trains/community/odoo/1.0.4/app.yaml @@ -9,8 +9,8 @@ icon: https://media.sys.truenas.net/apps/odoo/icons/icon.png keywords: - erp - odoo -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -30,4 +30,4 @@ sources: - https://github.com/odoo/odoo title: Odoo train: community -version: 1.0.3 +version: 1.0.4 diff --git a/trains/community/odoo/1.0.3/ix_values.yaml b/trains/community/odoo/1.0.4/ix_values.yaml similarity index 100% rename from trains/community/odoo/1.0.3/ix_values.yaml rename to trains/community/odoo/1.0.4/ix_values.yaml diff --git a/trains/community/odoo/1.0.3/migrations/migrate_from_kubernetes b/trains/community/odoo/1.0.4/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/odoo/1.0.3/migrations/migrate_from_kubernetes rename to trains/community/odoo/1.0.4/migrations/migrate_from_kubernetes diff --git a/trains/community/odoo/1.0.3/migrations/migration_helpers/__init__.py b/trains/community/odoo/1.0.4/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/odoo/1.0.3/migrations/migration_helpers/__init__.py rename to trains/community/odoo/1.0.4/migrations/migration_helpers/__init__.py diff --git a/trains/community/odoo/1.0.3/migrations/migration_helpers/cpu.py b/trains/community/odoo/1.0.4/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/odoo/1.0.3/migrations/migration_helpers/cpu.py rename to trains/community/odoo/1.0.4/migrations/migration_helpers/cpu.py diff --git a/trains/community/odoo/1.0.3/migrations/migration_helpers/dns_config.py b/trains/community/odoo/1.0.4/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/odoo/1.0.3/migrations/migration_helpers/dns_config.py rename to trains/community/odoo/1.0.4/migrations/migration_helpers/dns_config.py diff --git a/trains/community/odoo/1.0.3/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/odoo/1.0.4/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/odoo/1.0.3/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/odoo/1.0.4/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/odoo/1.0.3/migrations/migration_helpers/memory.py b/trains/community/odoo/1.0.4/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/odoo/1.0.3/migrations/migration_helpers/memory.py rename to trains/community/odoo/1.0.4/migrations/migration_helpers/memory.py diff --git a/trains/community/odoo/1.0.3/migrations/migration_helpers/resources.py b/trains/community/odoo/1.0.4/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/odoo/1.0.3/migrations/migration_helpers/resources.py rename to trains/community/odoo/1.0.4/migrations/migration_helpers/resources.py diff --git a/trains/community/odoo/1.0.3/migrations/migration_helpers/storage.py b/trains/community/odoo/1.0.4/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/odoo/1.0.3/migrations/migration_helpers/storage.py rename to trains/community/odoo/1.0.4/migrations/migration_helpers/storage.py diff --git a/trains/community/odoo/1.0.3/questions.yaml b/trains/community/odoo/1.0.4/questions.yaml similarity index 100% rename from trains/community/odoo/1.0.3/questions.yaml rename to trains/community/odoo/1.0.4/questions.yaml diff --git a/trains/community/odoo/1.0.3/templates/docker-compose.yaml b/trains/community/odoo/1.0.4/templates/docker-compose.yaml similarity index 100% rename from trains/community/odoo/1.0.3/templates/docker-compose.yaml rename to trains/community/odoo/1.0.4/templates/docker-compose.yaml diff --git a/trains/community/odoo/1.0.3/templates/library/base_v1_1_3/__init__.py b/trains/community/odoo/1.0.4/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/odoo/1.0.3/templates/library/base_v1_1_3/__init__.py rename to trains/community/odoo/1.0.4/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/odoo/1.0.3/templates/library/base_v1_1_3/environment.py b/trains/community/odoo/1.0.4/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/odoo/1.0.3/templates/library/base_v1_1_3/environment.py rename to trains/community/odoo/1.0.4/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/odoo/1.0.4/templates/library/base_v1_1_4/healthchecks.py b/trains/community/odoo/1.0.4/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/community/odoo/1.0.4/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/odoo/1.0.3/templates/library/base_v1_1_3/mariadb.py b/trains/community/odoo/1.0.4/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/odoo/1.0.3/templates/library/base_v1_1_3/mariadb.py rename to trains/community/odoo/1.0.4/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/odoo/1.0.3/templates/library/base_v1_1_3/metadata.py b/trains/community/odoo/1.0.4/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/odoo/1.0.3/templates/library/base_v1_1_3/metadata.py rename to trains/community/odoo/1.0.4/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/odoo/1.0.3/templates/library/base_v1_1_3/network.py b/trains/community/odoo/1.0.4/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/odoo/1.0.3/templates/library/base_v1_1_3/network.py rename to trains/community/odoo/1.0.4/templates/library/base_v1_1_4/network.py diff --git a/trains/community/odoo/1.0.4/templates/library/base_v1_1_4/permissions.py b/trains/community/odoo/1.0.4/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/community/odoo/1.0.4/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/community/odoo/1.0.3/templates/library/base_v1_1_3/ports.py b/trains/community/odoo/1.0.4/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/odoo/1.0.3/templates/library/base_v1_1_3/ports.py rename to trains/community/odoo/1.0.4/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/odoo/1.0.3/templates/library/base_v1_1_3/postgres.py b/trains/community/odoo/1.0.4/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/odoo/1.0.3/templates/library/base_v1_1_3/postgres.py rename to trains/community/odoo/1.0.4/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/odoo/1.0.3/templates/library/base_v1_1_3/redis.py b/trains/community/odoo/1.0.4/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/odoo/1.0.3/templates/library/base_v1_1_3/redis.py rename to trains/community/odoo/1.0.4/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/odoo/1.0.3/templates/library/base_v1_1_3/resources.py b/trains/community/odoo/1.0.4/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/odoo/1.0.3/templates/library/base_v1_1_3/resources.py rename to trains/community/odoo/1.0.4/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/odoo/1.0.3/templates/library/base_v1_1_3/security.py b/trains/community/odoo/1.0.4/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/odoo/1.0.3/templates/library/base_v1_1_3/security.py rename to trains/community/odoo/1.0.4/templates/library/base_v1_1_4/security.py diff --git a/trains/community/odoo/1.0.3/templates/library/base_v1_1_3/storage.py b/trains/community/odoo/1.0.4/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/odoo/1.0.3/templates/library/base_v1_1_3/storage.py rename to trains/community/odoo/1.0.4/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/odoo/1.0.3/templates/library/base_v1_1_3/utils.py b/trains/community/odoo/1.0.4/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/odoo/1.0.3/templates/library/base_v1_1_3/utils.py rename to trains/community/odoo/1.0.4/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/odoo/1.0.3/templates/macros/odoo.conf b/trains/community/odoo/1.0.4/templates/macros/odoo.conf similarity index 100% rename from trains/community/odoo/1.0.3/templates/macros/odoo.conf rename to trains/community/odoo/1.0.4/templates/macros/odoo.conf diff --git a/trains/community/odoo/1.0.3/templates/test_values/basic-values.yaml b/trains/community/odoo/1.0.4/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/odoo/1.0.3/templates/test_values/basic-values.yaml rename to trains/community/odoo/1.0.4/templates/test_values/basic-values.yaml diff --git a/trains/community/odoo/1.0.3/templates/test_values/extra-values.yaml b/trains/community/odoo/1.0.4/templates/test_values/extra-values.yaml similarity index 100% rename from trains/community/odoo/1.0.3/templates/test_values/extra-values.yaml rename to trains/community/odoo/1.0.4/templates/test_values/extra-values.yaml diff --git a/trains/community/omada-controller/1.1.9/README.md b/trains/community/omada-controller/1.1.10/README.md similarity index 100% rename from trains/community/omada-controller/1.1.9/README.md rename to trains/community/omada-controller/1.1.10/README.md diff --git a/trains/community/omada-controller/1.1.9/app.yaml b/trains/community/omada-controller/1.1.10/app.yaml similarity index 91% rename from trains/community/omada-controller/1.1.9/app.yaml rename to trains/community/omada-controller/1.1.10/app.yaml index 5143a1671e..e3da5e442c 100644 --- a/trains/community/omada-controller/1.1.9/app.yaml +++ b/trains/community/omada-controller/1.1.10/app.yaml @@ -23,8 +23,8 @@ keywords: - controller - omada - tp-link -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -42,4 +42,4 @@ sources: - https://hub.docker.com/r/mbentley/omada-controller title: Bazarr train: community -version: 1.1.9 +version: 1.1.10 diff --git a/trains/community/omada-controller/1.1.9/ix_values.yaml b/trains/community/omada-controller/1.1.10/ix_values.yaml similarity index 100% rename from trains/community/omada-controller/1.1.9/ix_values.yaml rename to trains/community/omada-controller/1.1.10/ix_values.yaml diff --git a/trains/community/omada-controller/1.1.9/migrations/migrate_from_kubernetes b/trains/community/omada-controller/1.1.10/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/omada-controller/1.1.9/migrations/migrate_from_kubernetes rename to trains/community/omada-controller/1.1.10/migrations/migrate_from_kubernetes diff --git a/trains/community/omada-controller/1.1.9/migrations/migration_helpers/__init__.py b/trains/community/omada-controller/1.1.10/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/omada-controller/1.1.9/migrations/migration_helpers/__init__.py rename to trains/community/omada-controller/1.1.10/migrations/migration_helpers/__init__.py diff --git a/trains/community/omada-controller/1.1.9/migrations/migration_helpers/cpu.py b/trains/community/omada-controller/1.1.10/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/omada-controller/1.1.9/migrations/migration_helpers/cpu.py rename to trains/community/omada-controller/1.1.10/migrations/migration_helpers/cpu.py diff --git a/trains/community/omada-controller/1.1.9/migrations/migration_helpers/dns_config.py b/trains/community/omada-controller/1.1.10/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/omada-controller/1.1.9/migrations/migration_helpers/dns_config.py rename to trains/community/omada-controller/1.1.10/migrations/migration_helpers/dns_config.py diff --git a/trains/community/omada-controller/1.1.9/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/omada-controller/1.1.10/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/omada-controller/1.1.9/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/omada-controller/1.1.10/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/omada-controller/1.1.9/migrations/migration_helpers/memory.py b/trains/community/omada-controller/1.1.10/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/omada-controller/1.1.9/migrations/migration_helpers/memory.py rename to trains/community/omada-controller/1.1.10/migrations/migration_helpers/memory.py diff --git a/trains/community/omada-controller/1.1.9/migrations/migration_helpers/resources.py b/trains/community/omada-controller/1.1.10/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/omada-controller/1.1.9/migrations/migration_helpers/resources.py rename to trains/community/omada-controller/1.1.10/migrations/migration_helpers/resources.py diff --git a/trains/community/omada-controller/1.1.9/migrations/migration_helpers/storage.py b/trains/community/omada-controller/1.1.10/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/omada-controller/1.1.9/migrations/migration_helpers/storage.py rename to trains/community/omada-controller/1.1.10/migrations/migration_helpers/storage.py diff --git a/trains/community/omada-controller/1.1.9/questions.yaml b/trains/community/omada-controller/1.1.10/questions.yaml similarity index 100% rename from trains/community/omada-controller/1.1.9/questions.yaml rename to trains/community/omada-controller/1.1.10/questions.yaml diff --git a/trains/community/omada-controller/1.1.9/templates/docker-compose.yaml b/trains/community/omada-controller/1.1.10/templates/docker-compose.yaml similarity index 100% rename from trains/community/omada-controller/1.1.9/templates/docker-compose.yaml rename to trains/community/omada-controller/1.1.10/templates/docker-compose.yaml diff --git a/trains/community/omada-controller/1.1.9/templates/library/base_v1_1_3/__init__.py b/trains/community/omada-controller/1.1.10/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/omada-controller/1.1.9/templates/library/base_v1_1_3/__init__.py rename to trains/community/omada-controller/1.1.10/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/omada-controller/1.1.9/templates/library/base_v1_1_3/environment.py b/trains/community/omada-controller/1.1.10/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/omada-controller/1.1.9/templates/library/base_v1_1_3/environment.py rename to trains/community/omada-controller/1.1.10/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/omada-controller/1.1.10/templates/library/base_v1_1_4/healthchecks.py b/trains/community/omada-controller/1.1.10/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/community/omada-controller/1.1.10/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/omada-controller/1.1.9/templates/library/base_v1_1_3/mariadb.py b/trains/community/omada-controller/1.1.10/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/omada-controller/1.1.9/templates/library/base_v1_1_3/mariadb.py rename to trains/community/omada-controller/1.1.10/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/omada-controller/1.1.9/templates/library/base_v1_1_3/metadata.py b/trains/community/omada-controller/1.1.10/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/omada-controller/1.1.9/templates/library/base_v1_1_3/metadata.py rename to trains/community/omada-controller/1.1.10/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/omada-controller/1.1.9/templates/library/base_v1_1_3/network.py b/trains/community/omada-controller/1.1.10/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/omada-controller/1.1.9/templates/library/base_v1_1_3/network.py rename to trains/community/omada-controller/1.1.10/templates/library/base_v1_1_4/network.py diff --git a/trains/community/omada-controller/1.1.10/templates/library/base_v1_1_4/permissions.py b/trains/community/omada-controller/1.1.10/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/community/omada-controller/1.1.10/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/community/omada-controller/1.1.9/templates/library/base_v1_1_3/ports.py b/trains/community/omada-controller/1.1.10/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/omada-controller/1.1.9/templates/library/base_v1_1_3/ports.py rename to trains/community/omada-controller/1.1.10/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/omada-controller/1.1.9/templates/library/base_v1_1_3/postgres.py b/trains/community/omada-controller/1.1.10/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/omada-controller/1.1.9/templates/library/base_v1_1_3/postgres.py rename to trains/community/omada-controller/1.1.10/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/omada-controller/1.1.9/templates/library/base_v1_1_3/redis.py b/trains/community/omada-controller/1.1.10/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/omada-controller/1.1.9/templates/library/base_v1_1_3/redis.py rename to trains/community/omada-controller/1.1.10/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/omada-controller/1.1.9/templates/library/base_v1_1_3/resources.py b/trains/community/omada-controller/1.1.10/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/omada-controller/1.1.9/templates/library/base_v1_1_3/resources.py rename to trains/community/omada-controller/1.1.10/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/omada-controller/1.1.9/templates/library/base_v1_1_3/security.py b/trains/community/omada-controller/1.1.10/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/omada-controller/1.1.9/templates/library/base_v1_1_3/security.py rename to trains/community/omada-controller/1.1.10/templates/library/base_v1_1_4/security.py diff --git a/trains/community/omada-controller/1.1.9/templates/library/base_v1_1_3/storage.py b/trains/community/omada-controller/1.1.10/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/omada-controller/1.1.9/templates/library/base_v1_1_3/storage.py rename to trains/community/omada-controller/1.1.10/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/omada-controller/1.1.9/templates/library/base_v1_1_3/utils.py b/trains/community/omada-controller/1.1.10/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/omada-controller/1.1.9/templates/library/base_v1_1_3/utils.py rename to trains/community/omada-controller/1.1.10/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/omada-controller/1.1.9/templates/test_values/basic-values.yaml b/trains/community/omada-controller/1.1.10/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/omada-controller/1.1.9/templates/test_values/basic-values.yaml rename to trains/community/omada-controller/1.1.10/templates/test_values/basic-values.yaml diff --git a/trains/community/omada-controller/1.1.9/templates/test_values/https-values.yaml b/trains/community/omada-controller/1.1.10/templates/test_values/https-values.yaml similarity index 100% rename from trains/community/omada-controller/1.1.9/templates/test_values/https-values.yaml rename to trains/community/omada-controller/1.1.10/templates/test_values/https-values.yaml diff --git a/trains/community/omada-controller/1.1.9/templates/library/base_v1_1_3/healthchecks.py b/trains/community/omada-controller/1.1.9/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/community/omada-controller/1.1.9/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/omada-controller/1.1.9/templates/library/base_v1_1_3/permissions.py b/trains/community/omada-controller/1.1.9/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/community/omada-controller/1.1.9/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/community/organizr/1.0.17/templates/library/base_v1_1_3/healthchecks.py b/trains/community/organizr/1.0.17/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/community/organizr/1.0.17/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/organizr/1.0.17/templates/library/base_v1_1_3/permissions.py b/trains/community/organizr/1.0.17/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/community/organizr/1.0.17/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/community/organizr/1.0.17/README.md b/trains/community/organizr/1.0.18/README.md similarity index 100% rename from trains/community/organizr/1.0.17/README.md rename to trains/community/organizr/1.0.18/README.md diff --git a/trains/community/organizr/1.0.17/app.yaml b/trains/community/organizr/1.0.18/app.yaml similarity index 91% rename from trains/community/organizr/1.0.17/app.yaml rename to trains/community/organizr/1.0.18/app.yaml index fb1ee0dbbf..37534684c7 100644 --- a/trains/community/organizr/1.0.17/app.yaml +++ b/trains/community/organizr/1.0.18/app.yaml @@ -19,8 +19,8 @@ icon: https://media.sys.truenas.net/apps/organizr/icons/icon.png keywords: - dashboard - organizr -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -40,4 +40,4 @@ sources: - https://github.com/causefx/Organizr title: Organizr train: community -version: 1.0.17 +version: 1.0.18 diff --git a/trains/community/organizr/1.0.17/ix_values.yaml b/trains/community/organizr/1.0.18/ix_values.yaml similarity index 100% rename from trains/community/organizr/1.0.17/ix_values.yaml rename to trains/community/organizr/1.0.18/ix_values.yaml diff --git a/trains/community/organizr/1.0.17/migrations/migrate_from_kubernetes b/trains/community/organizr/1.0.18/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/organizr/1.0.17/migrations/migrate_from_kubernetes rename to trains/community/organizr/1.0.18/migrations/migrate_from_kubernetes diff --git a/trains/community/organizr/1.0.17/migrations/migration_helpers/__init__.py b/trains/community/organizr/1.0.18/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/organizr/1.0.17/migrations/migration_helpers/__init__.py rename to trains/community/organizr/1.0.18/migrations/migration_helpers/__init__.py diff --git a/trains/community/organizr/1.0.17/migrations/migration_helpers/cpu.py b/trains/community/organizr/1.0.18/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/organizr/1.0.17/migrations/migration_helpers/cpu.py rename to trains/community/organizr/1.0.18/migrations/migration_helpers/cpu.py diff --git a/trains/community/organizr/1.0.17/migrations/migration_helpers/dns_config.py b/trains/community/organizr/1.0.18/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/organizr/1.0.17/migrations/migration_helpers/dns_config.py rename to trains/community/organizr/1.0.18/migrations/migration_helpers/dns_config.py diff --git a/trains/community/organizr/1.0.17/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/organizr/1.0.18/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/organizr/1.0.17/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/organizr/1.0.18/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/organizr/1.0.17/migrations/migration_helpers/memory.py b/trains/community/organizr/1.0.18/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/organizr/1.0.17/migrations/migration_helpers/memory.py rename to trains/community/organizr/1.0.18/migrations/migration_helpers/memory.py diff --git a/trains/community/organizr/1.0.17/migrations/migration_helpers/resources.py b/trains/community/organizr/1.0.18/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/organizr/1.0.17/migrations/migration_helpers/resources.py rename to trains/community/organizr/1.0.18/migrations/migration_helpers/resources.py diff --git a/trains/community/organizr/1.0.17/migrations/migration_helpers/storage.py b/trains/community/organizr/1.0.18/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/organizr/1.0.17/migrations/migration_helpers/storage.py rename to trains/community/organizr/1.0.18/migrations/migration_helpers/storage.py diff --git a/trains/community/organizr/1.0.17/questions.yaml b/trains/community/organizr/1.0.18/questions.yaml similarity index 100% rename from trains/community/organizr/1.0.17/questions.yaml rename to trains/community/organizr/1.0.18/questions.yaml diff --git a/trains/community/organizr/1.0.17/templates/docker-compose.yaml b/trains/community/organizr/1.0.18/templates/docker-compose.yaml similarity index 100% rename from trains/community/organizr/1.0.17/templates/docker-compose.yaml rename to trains/community/organizr/1.0.18/templates/docker-compose.yaml diff --git a/trains/community/organizr/1.0.17/templates/library/base_v1_1_3/__init__.py b/trains/community/organizr/1.0.18/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/organizr/1.0.17/templates/library/base_v1_1_3/__init__.py rename to trains/community/organizr/1.0.18/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/organizr/1.0.17/templates/library/base_v1_1_3/environment.py b/trains/community/organizr/1.0.18/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/organizr/1.0.17/templates/library/base_v1_1_3/environment.py rename to trains/community/organizr/1.0.18/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/organizr/1.0.18/templates/library/base_v1_1_4/healthchecks.py b/trains/community/organizr/1.0.18/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/community/organizr/1.0.18/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/organizr/1.0.17/templates/library/base_v1_1_3/mariadb.py b/trains/community/organizr/1.0.18/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/organizr/1.0.17/templates/library/base_v1_1_3/mariadb.py rename to trains/community/organizr/1.0.18/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/organizr/1.0.17/templates/library/base_v1_1_3/metadata.py b/trains/community/organizr/1.0.18/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/organizr/1.0.17/templates/library/base_v1_1_3/metadata.py rename to trains/community/organizr/1.0.18/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/organizr/1.0.17/templates/library/base_v1_1_3/network.py b/trains/community/organizr/1.0.18/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/organizr/1.0.17/templates/library/base_v1_1_3/network.py rename to trains/community/organizr/1.0.18/templates/library/base_v1_1_4/network.py diff --git a/trains/community/organizr/1.0.18/templates/library/base_v1_1_4/permissions.py b/trains/community/organizr/1.0.18/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/community/organizr/1.0.18/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/community/organizr/1.0.17/templates/library/base_v1_1_3/ports.py b/trains/community/organizr/1.0.18/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/organizr/1.0.17/templates/library/base_v1_1_3/ports.py rename to trains/community/organizr/1.0.18/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/organizr/1.0.17/templates/library/base_v1_1_3/postgres.py b/trains/community/organizr/1.0.18/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/organizr/1.0.17/templates/library/base_v1_1_3/postgres.py rename to trains/community/organizr/1.0.18/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/organizr/1.0.17/templates/library/base_v1_1_3/redis.py b/trains/community/organizr/1.0.18/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/organizr/1.0.17/templates/library/base_v1_1_3/redis.py rename to trains/community/organizr/1.0.18/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/organizr/1.0.17/templates/library/base_v1_1_3/resources.py b/trains/community/organizr/1.0.18/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/organizr/1.0.17/templates/library/base_v1_1_3/resources.py rename to trains/community/organizr/1.0.18/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/organizr/1.0.17/templates/library/base_v1_1_3/security.py b/trains/community/organizr/1.0.18/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/organizr/1.0.17/templates/library/base_v1_1_3/security.py rename to trains/community/organizr/1.0.18/templates/library/base_v1_1_4/security.py diff --git a/trains/community/organizr/1.0.17/templates/library/base_v1_1_3/storage.py b/trains/community/organizr/1.0.18/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/organizr/1.0.17/templates/library/base_v1_1_3/storage.py rename to trains/community/organizr/1.0.18/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/organizr/1.0.17/templates/library/base_v1_1_3/utils.py b/trains/community/organizr/1.0.18/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/organizr/1.0.17/templates/library/base_v1_1_3/utils.py rename to trains/community/organizr/1.0.18/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/organizr/1.0.17/templates/test_values/basic-values.yaml b/trains/community/organizr/1.0.18/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/organizr/1.0.17/templates/test_values/basic-values.yaml rename to trains/community/organizr/1.0.18/templates/test_values/basic-values.yaml diff --git a/trains/community/overseerr/1.0.17/templates/library/base_v1_1_3/healthchecks.py b/trains/community/overseerr/1.0.17/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/community/overseerr/1.0.17/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/overseerr/1.0.17/templates/library/base_v1_1_3/permissions.py b/trains/community/overseerr/1.0.17/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/community/overseerr/1.0.17/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/community/overseerr/1.0.17/README.md b/trains/community/overseerr/1.0.18/README.md similarity index 100% rename from trains/community/overseerr/1.0.17/README.md rename to trains/community/overseerr/1.0.18/README.md diff --git a/trains/community/overseerr/1.0.17/app.yaml b/trains/community/overseerr/1.0.18/app.yaml similarity index 85% rename from trains/community/overseerr/1.0.17/app.yaml rename to trains/community/overseerr/1.0.18/app.yaml index 501259abc4..97fc6d8a0c 100644 --- a/trains/community/overseerr/1.0.17/app.yaml +++ b/trains/community/overseerr/1.0.18/app.yaml @@ -9,8 +9,8 @@ host_mounts: [] icon: https://media.sys.truenas.net/apps/overseerr/icons/icon.svg keywords: - media -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -28,4 +28,4 @@ sources: - https://github.com/sct/overseerr title: Overseerr train: community -version: 1.0.17 +version: 1.0.18 diff --git a/trains/community/overseerr/1.0.17/ix_values.yaml b/trains/community/overseerr/1.0.18/ix_values.yaml similarity index 100% rename from trains/community/overseerr/1.0.17/ix_values.yaml rename to trains/community/overseerr/1.0.18/ix_values.yaml diff --git a/trains/community/overseerr/1.0.17/migrations/migrate_from_kubernetes b/trains/community/overseerr/1.0.18/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/overseerr/1.0.17/migrations/migrate_from_kubernetes rename to trains/community/overseerr/1.0.18/migrations/migrate_from_kubernetes diff --git a/trains/community/overseerr/1.0.17/migrations/migration_helpers/__init__.py b/trains/community/overseerr/1.0.18/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/overseerr/1.0.17/migrations/migration_helpers/__init__.py rename to trains/community/overseerr/1.0.18/migrations/migration_helpers/__init__.py diff --git a/trains/community/overseerr/1.0.17/migrations/migration_helpers/cpu.py b/trains/community/overseerr/1.0.18/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/overseerr/1.0.17/migrations/migration_helpers/cpu.py rename to trains/community/overseerr/1.0.18/migrations/migration_helpers/cpu.py diff --git a/trains/community/overseerr/1.0.17/migrations/migration_helpers/dns_config.py b/trains/community/overseerr/1.0.18/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/overseerr/1.0.17/migrations/migration_helpers/dns_config.py rename to trains/community/overseerr/1.0.18/migrations/migration_helpers/dns_config.py diff --git a/trains/community/overseerr/1.0.17/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/overseerr/1.0.18/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/overseerr/1.0.17/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/overseerr/1.0.18/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/overseerr/1.0.17/migrations/migration_helpers/memory.py b/trains/community/overseerr/1.0.18/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/overseerr/1.0.17/migrations/migration_helpers/memory.py rename to trains/community/overseerr/1.0.18/migrations/migration_helpers/memory.py diff --git a/trains/community/overseerr/1.0.17/migrations/migration_helpers/resources.py b/trains/community/overseerr/1.0.18/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/overseerr/1.0.17/migrations/migration_helpers/resources.py rename to trains/community/overseerr/1.0.18/migrations/migration_helpers/resources.py diff --git a/trains/community/overseerr/1.0.17/migrations/migration_helpers/storage.py b/trains/community/overseerr/1.0.18/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/overseerr/1.0.17/migrations/migration_helpers/storage.py rename to trains/community/overseerr/1.0.18/migrations/migration_helpers/storage.py diff --git a/trains/community/overseerr/1.0.17/questions.yaml b/trains/community/overseerr/1.0.18/questions.yaml similarity index 100% rename from trains/community/overseerr/1.0.17/questions.yaml rename to trains/community/overseerr/1.0.18/questions.yaml diff --git a/trains/community/overseerr/1.0.17/templates/docker-compose.yaml b/trains/community/overseerr/1.0.18/templates/docker-compose.yaml similarity index 100% rename from trains/community/overseerr/1.0.17/templates/docker-compose.yaml rename to trains/community/overseerr/1.0.18/templates/docker-compose.yaml diff --git a/trains/community/overseerr/1.0.17/templates/library/base_v1_1_3/__init__.py b/trains/community/overseerr/1.0.18/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/overseerr/1.0.17/templates/library/base_v1_1_3/__init__.py rename to trains/community/overseerr/1.0.18/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/overseerr/1.0.17/templates/library/base_v1_1_3/environment.py b/trains/community/overseerr/1.0.18/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/overseerr/1.0.17/templates/library/base_v1_1_3/environment.py rename to trains/community/overseerr/1.0.18/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/overseerr/1.0.18/templates/library/base_v1_1_4/healthchecks.py b/trains/community/overseerr/1.0.18/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/community/overseerr/1.0.18/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/overseerr/1.0.17/templates/library/base_v1_1_3/mariadb.py b/trains/community/overseerr/1.0.18/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/overseerr/1.0.17/templates/library/base_v1_1_3/mariadb.py rename to trains/community/overseerr/1.0.18/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/overseerr/1.0.17/templates/library/base_v1_1_3/metadata.py b/trains/community/overseerr/1.0.18/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/overseerr/1.0.17/templates/library/base_v1_1_3/metadata.py rename to trains/community/overseerr/1.0.18/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/overseerr/1.0.17/templates/library/base_v1_1_3/network.py b/trains/community/overseerr/1.0.18/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/overseerr/1.0.17/templates/library/base_v1_1_3/network.py rename to trains/community/overseerr/1.0.18/templates/library/base_v1_1_4/network.py diff --git a/trains/community/overseerr/1.0.18/templates/library/base_v1_1_4/permissions.py b/trains/community/overseerr/1.0.18/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/community/overseerr/1.0.18/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/community/overseerr/1.0.17/templates/library/base_v1_1_3/ports.py b/trains/community/overseerr/1.0.18/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/overseerr/1.0.17/templates/library/base_v1_1_3/ports.py rename to trains/community/overseerr/1.0.18/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/overseerr/1.0.17/templates/library/base_v1_1_3/postgres.py b/trains/community/overseerr/1.0.18/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/overseerr/1.0.17/templates/library/base_v1_1_3/postgres.py rename to trains/community/overseerr/1.0.18/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/overseerr/1.0.17/templates/library/base_v1_1_3/redis.py b/trains/community/overseerr/1.0.18/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/overseerr/1.0.17/templates/library/base_v1_1_3/redis.py rename to trains/community/overseerr/1.0.18/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/overseerr/1.0.17/templates/library/base_v1_1_3/resources.py b/trains/community/overseerr/1.0.18/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/overseerr/1.0.17/templates/library/base_v1_1_3/resources.py rename to trains/community/overseerr/1.0.18/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/overseerr/1.0.17/templates/library/base_v1_1_3/security.py b/trains/community/overseerr/1.0.18/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/overseerr/1.0.17/templates/library/base_v1_1_3/security.py rename to trains/community/overseerr/1.0.18/templates/library/base_v1_1_4/security.py diff --git a/trains/community/overseerr/1.0.17/templates/library/base_v1_1_3/storage.py b/trains/community/overseerr/1.0.18/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/overseerr/1.0.17/templates/library/base_v1_1_3/storage.py rename to trains/community/overseerr/1.0.18/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/overseerr/1.0.17/templates/library/base_v1_1_3/utils.py b/trains/community/overseerr/1.0.18/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/overseerr/1.0.17/templates/library/base_v1_1_3/utils.py rename to trains/community/overseerr/1.0.18/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/overseerr/1.0.17/templates/test_values/basic-values.yaml b/trains/community/overseerr/1.0.18/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/overseerr/1.0.17/templates/test_values/basic-values.yaml rename to trains/community/overseerr/1.0.18/templates/test_values/basic-values.yaml diff --git a/trains/community/palworld/1.0.19/templates/library/base_v1_1_3/healthchecks.py b/trains/community/palworld/1.0.19/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/community/palworld/1.0.19/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/palworld/1.0.19/templates/library/base_v1_1_3/permissions.py b/trains/community/palworld/1.0.19/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/community/palworld/1.0.19/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/community/palworld/1.0.19/README.md b/trains/community/palworld/1.0.20/README.md similarity index 100% rename from trains/community/palworld/1.0.19/README.md rename to trains/community/palworld/1.0.20/README.md diff --git a/trains/community/palworld/1.0.19/app.yaml b/trains/community/palworld/1.0.20/app.yaml similarity index 92% rename from trains/community/palworld/1.0.19/app.yaml rename to trains/community/palworld/1.0.20/app.yaml index c63f4b01b4..a63c29ec0b 100644 --- a/trains/community/palworld/1.0.19/app.yaml +++ b/trains/community/palworld/1.0.20/app.yaml @@ -28,8 +28,8 @@ icon: https://media.sys.truenas.net/apps/palworld/icons/icon.webp keywords: - game - palworld -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -47,4 +47,4 @@ sources: - https://github.com/ich777/docker-steamcmd-server/tree/palworld title: Palworld train: community -version: 1.0.19 +version: 1.0.20 diff --git a/trains/community/palworld/1.0.19/ix_values.yaml b/trains/community/palworld/1.0.20/ix_values.yaml similarity index 100% rename from trains/community/palworld/1.0.19/ix_values.yaml rename to trains/community/palworld/1.0.20/ix_values.yaml diff --git a/trains/community/palworld/1.0.19/migrations/migrate_from_kubernetes b/trains/community/palworld/1.0.20/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/palworld/1.0.19/migrations/migrate_from_kubernetes rename to trains/community/palworld/1.0.20/migrations/migrate_from_kubernetes diff --git a/trains/community/palworld/1.0.19/migrations/migration_helpers/__init__.py b/trains/community/palworld/1.0.20/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/palworld/1.0.19/migrations/migration_helpers/__init__.py rename to trains/community/palworld/1.0.20/migrations/migration_helpers/__init__.py diff --git a/trains/community/palworld/1.0.19/migrations/migration_helpers/cpu.py b/trains/community/palworld/1.0.20/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/palworld/1.0.19/migrations/migration_helpers/cpu.py rename to trains/community/palworld/1.0.20/migrations/migration_helpers/cpu.py diff --git a/trains/community/palworld/1.0.19/migrations/migration_helpers/dns_config.py b/trains/community/palworld/1.0.20/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/palworld/1.0.19/migrations/migration_helpers/dns_config.py rename to trains/community/palworld/1.0.20/migrations/migration_helpers/dns_config.py diff --git a/trains/community/palworld/1.0.19/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/palworld/1.0.20/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/palworld/1.0.19/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/palworld/1.0.20/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/palworld/1.0.19/migrations/migration_helpers/memory.py b/trains/community/palworld/1.0.20/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/palworld/1.0.19/migrations/migration_helpers/memory.py rename to trains/community/palworld/1.0.20/migrations/migration_helpers/memory.py diff --git a/trains/community/palworld/1.0.19/migrations/migration_helpers/resources.py b/trains/community/palworld/1.0.20/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/palworld/1.0.19/migrations/migration_helpers/resources.py rename to trains/community/palworld/1.0.20/migrations/migration_helpers/resources.py diff --git a/trains/community/palworld/1.0.19/migrations/migration_helpers/storage.py b/trains/community/palworld/1.0.20/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/palworld/1.0.19/migrations/migration_helpers/storage.py rename to trains/community/palworld/1.0.20/migrations/migration_helpers/storage.py diff --git a/trains/community/palworld/1.0.19/questions.yaml b/trains/community/palworld/1.0.20/questions.yaml similarity index 100% rename from trains/community/palworld/1.0.19/questions.yaml rename to trains/community/palworld/1.0.20/questions.yaml diff --git a/trains/community/palworld/1.0.19/templates/docker-compose.yaml b/trains/community/palworld/1.0.20/templates/docker-compose.yaml similarity index 100% rename from trains/community/palworld/1.0.19/templates/docker-compose.yaml rename to trains/community/palworld/1.0.20/templates/docker-compose.yaml diff --git a/trains/community/palworld/1.0.19/templates/library/base_v1_1_3/__init__.py b/trains/community/palworld/1.0.20/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/palworld/1.0.19/templates/library/base_v1_1_3/__init__.py rename to trains/community/palworld/1.0.20/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/palworld/1.0.19/templates/library/base_v1_1_3/environment.py b/trains/community/palworld/1.0.20/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/palworld/1.0.19/templates/library/base_v1_1_3/environment.py rename to trains/community/palworld/1.0.20/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/palworld/1.0.20/templates/library/base_v1_1_4/healthchecks.py b/trains/community/palworld/1.0.20/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/community/palworld/1.0.20/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/palworld/1.0.19/templates/library/base_v1_1_3/mariadb.py b/trains/community/palworld/1.0.20/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/palworld/1.0.19/templates/library/base_v1_1_3/mariadb.py rename to trains/community/palworld/1.0.20/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/palworld/1.0.19/templates/library/base_v1_1_3/metadata.py b/trains/community/palworld/1.0.20/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/palworld/1.0.19/templates/library/base_v1_1_3/metadata.py rename to trains/community/palworld/1.0.20/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/palworld/1.0.19/templates/library/base_v1_1_3/network.py b/trains/community/palworld/1.0.20/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/palworld/1.0.19/templates/library/base_v1_1_3/network.py rename to trains/community/palworld/1.0.20/templates/library/base_v1_1_4/network.py diff --git a/trains/community/palworld/1.0.20/templates/library/base_v1_1_4/permissions.py b/trains/community/palworld/1.0.20/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/community/palworld/1.0.20/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/community/palworld/1.0.19/templates/library/base_v1_1_3/ports.py b/trains/community/palworld/1.0.20/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/palworld/1.0.19/templates/library/base_v1_1_3/ports.py rename to trains/community/palworld/1.0.20/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/palworld/1.0.19/templates/library/base_v1_1_3/postgres.py b/trains/community/palworld/1.0.20/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/palworld/1.0.19/templates/library/base_v1_1_3/postgres.py rename to trains/community/palworld/1.0.20/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/palworld/1.0.19/templates/library/base_v1_1_3/redis.py b/trains/community/palworld/1.0.20/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/palworld/1.0.19/templates/library/base_v1_1_3/redis.py rename to trains/community/palworld/1.0.20/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/palworld/1.0.19/templates/library/base_v1_1_3/resources.py b/trains/community/palworld/1.0.20/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/palworld/1.0.19/templates/library/base_v1_1_3/resources.py rename to trains/community/palworld/1.0.20/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/palworld/1.0.19/templates/library/base_v1_1_3/security.py b/trains/community/palworld/1.0.20/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/palworld/1.0.19/templates/library/base_v1_1_3/security.py rename to trains/community/palworld/1.0.20/templates/library/base_v1_1_4/security.py diff --git a/trains/community/palworld/1.0.19/templates/library/base_v1_1_3/storage.py b/trains/community/palworld/1.0.20/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/palworld/1.0.19/templates/library/base_v1_1_3/storage.py rename to trains/community/palworld/1.0.20/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/palworld/1.0.19/templates/library/base_v1_1_3/utils.py b/trains/community/palworld/1.0.20/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/palworld/1.0.19/templates/library/base_v1_1_3/utils.py rename to trains/community/palworld/1.0.20/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/palworld/1.0.19/templates/test_values/basic-values.yaml b/trains/community/palworld/1.0.20/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/palworld/1.0.19/templates/test_values/basic-values.yaml rename to trains/community/palworld/1.0.20/templates/test_values/basic-values.yaml diff --git a/trains/community/palworld/1.0.19/templates/test_values/extra-values.yaml b/trains/community/palworld/1.0.20/templates/test_values/extra-values.yaml similarity index 100% rename from trains/community/palworld/1.0.19/templates/test_values/extra-values.yaml rename to trains/community/palworld/1.0.20/templates/test_values/extra-values.yaml diff --git a/trains/community/paperless-ngx/1.0.11/templates/library/base_v1_1_3/healthchecks.py b/trains/community/paperless-ngx/1.0.11/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/community/paperless-ngx/1.0.11/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/paperless-ngx/1.0.11/templates/library/base_v1_1_3/permissions.py b/trains/community/paperless-ngx/1.0.11/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/community/paperless-ngx/1.0.11/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/community/paperless-ngx/1.0.11/README.md b/trains/community/paperless-ngx/1.0.12/README.md similarity index 100% rename from trains/community/paperless-ngx/1.0.11/README.md rename to trains/community/paperless-ngx/1.0.12/README.md diff --git a/trains/community/paperless-ngx/1.0.11/app.yaml b/trains/community/paperless-ngx/1.0.12/app.yaml similarity index 94% rename from trains/community/paperless-ngx/1.0.11/app.yaml rename to trains/community/paperless-ngx/1.0.12/app.yaml index 9a07aa56d7..a1186c153f 100644 --- a/trains/community/paperless-ngx/1.0.11/app.yaml +++ b/trains/community/paperless-ngx/1.0.12/app.yaml @@ -20,8 +20,8 @@ icon: https://media.sys.truenas.net/apps/paperless-ngx/icons/icon.svg keywords: - document - management -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -57,4 +57,4 @@ sources: - https://github.com/paperless-ngx/paperless-ngx title: Paperless-ngx train: community -version: 1.0.11 +version: 1.0.12 diff --git a/trains/community/paperless-ngx/1.0.11/ix_values.yaml b/trains/community/paperless-ngx/1.0.12/ix_values.yaml similarity index 100% rename from trains/community/paperless-ngx/1.0.11/ix_values.yaml rename to trains/community/paperless-ngx/1.0.12/ix_values.yaml diff --git a/trains/community/paperless-ngx/1.0.11/migrations/migrate_from_kubernetes b/trains/community/paperless-ngx/1.0.12/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/paperless-ngx/1.0.11/migrations/migrate_from_kubernetes rename to trains/community/paperless-ngx/1.0.12/migrations/migrate_from_kubernetes diff --git a/trains/community/paperless-ngx/1.0.11/migrations/migration_helpers/__init__.py b/trains/community/paperless-ngx/1.0.12/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/paperless-ngx/1.0.11/migrations/migration_helpers/__init__.py rename to trains/community/paperless-ngx/1.0.12/migrations/migration_helpers/__init__.py diff --git a/trains/community/paperless-ngx/1.0.11/migrations/migration_helpers/cpu.py b/trains/community/paperless-ngx/1.0.12/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/paperless-ngx/1.0.11/migrations/migration_helpers/cpu.py rename to trains/community/paperless-ngx/1.0.12/migrations/migration_helpers/cpu.py diff --git a/trains/community/paperless-ngx/1.0.11/migrations/migration_helpers/dns_config.py b/trains/community/paperless-ngx/1.0.12/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/paperless-ngx/1.0.11/migrations/migration_helpers/dns_config.py rename to trains/community/paperless-ngx/1.0.12/migrations/migration_helpers/dns_config.py diff --git a/trains/community/paperless-ngx/1.0.11/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/paperless-ngx/1.0.12/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/paperless-ngx/1.0.11/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/paperless-ngx/1.0.12/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/paperless-ngx/1.0.11/migrations/migration_helpers/memory.py b/trains/community/paperless-ngx/1.0.12/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/paperless-ngx/1.0.11/migrations/migration_helpers/memory.py rename to trains/community/paperless-ngx/1.0.12/migrations/migration_helpers/memory.py diff --git a/trains/community/paperless-ngx/1.0.11/migrations/migration_helpers/resources.py b/trains/community/paperless-ngx/1.0.12/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/paperless-ngx/1.0.11/migrations/migration_helpers/resources.py rename to trains/community/paperless-ngx/1.0.12/migrations/migration_helpers/resources.py diff --git a/trains/community/paperless-ngx/1.0.11/migrations/migration_helpers/storage.py b/trains/community/paperless-ngx/1.0.12/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/paperless-ngx/1.0.11/migrations/migration_helpers/storage.py rename to trains/community/paperless-ngx/1.0.12/migrations/migration_helpers/storage.py diff --git a/trains/community/paperless-ngx/1.0.11/questions.yaml b/trains/community/paperless-ngx/1.0.12/questions.yaml similarity index 100% rename from trains/community/paperless-ngx/1.0.11/questions.yaml rename to trains/community/paperless-ngx/1.0.12/questions.yaml diff --git a/trains/community/paperless-ngx/1.0.11/templates/docker-compose.yaml b/trains/community/paperless-ngx/1.0.12/templates/docker-compose.yaml similarity index 100% rename from trains/community/paperless-ngx/1.0.11/templates/docker-compose.yaml rename to trains/community/paperless-ngx/1.0.12/templates/docker-compose.yaml diff --git a/trains/community/paperless-ngx/1.0.11/templates/library/base_v1_1_3/__init__.py b/trains/community/paperless-ngx/1.0.12/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/paperless-ngx/1.0.11/templates/library/base_v1_1_3/__init__.py rename to trains/community/paperless-ngx/1.0.12/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/paperless-ngx/1.0.11/templates/library/base_v1_1_3/environment.py b/trains/community/paperless-ngx/1.0.12/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/paperless-ngx/1.0.11/templates/library/base_v1_1_3/environment.py rename to trains/community/paperless-ngx/1.0.12/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/paperless-ngx/1.0.12/templates/library/base_v1_1_4/healthchecks.py b/trains/community/paperless-ngx/1.0.12/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/community/paperless-ngx/1.0.12/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/paperless-ngx/1.0.11/templates/library/base_v1_1_3/mariadb.py b/trains/community/paperless-ngx/1.0.12/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/paperless-ngx/1.0.11/templates/library/base_v1_1_3/mariadb.py rename to trains/community/paperless-ngx/1.0.12/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/paperless-ngx/1.0.11/templates/library/base_v1_1_3/metadata.py b/trains/community/paperless-ngx/1.0.12/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/paperless-ngx/1.0.11/templates/library/base_v1_1_3/metadata.py rename to trains/community/paperless-ngx/1.0.12/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/paperless-ngx/1.0.11/templates/library/base_v1_1_3/network.py b/trains/community/paperless-ngx/1.0.12/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/paperless-ngx/1.0.11/templates/library/base_v1_1_3/network.py rename to trains/community/paperless-ngx/1.0.12/templates/library/base_v1_1_4/network.py diff --git a/trains/community/paperless-ngx/1.0.12/templates/library/base_v1_1_4/permissions.py b/trains/community/paperless-ngx/1.0.12/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/community/paperless-ngx/1.0.12/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/community/paperless-ngx/1.0.11/templates/library/base_v1_1_3/ports.py b/trains/community/paperless-ngx/1.0.12/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/paperless-ngx/1.0.11/templates/library/base_v1_1_3/ports.py rename to trains/community/paperless-ngx/1.0.12/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/paperless-ngx/1.0.11/templates/library/base_v1_1_3/postgres.py b/trains/community/paperless-ngx/1.0.12/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/paperless-ngx/1.0.11/templates/library/base_v1_1_3/postgres.py rename to trains/community/paperless-ngx/1.0.12/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/paperless-ngx/1.0.11/templates/library/base_v1_1_3/redis.py b/trains/community/paperless-ngx/1.0.12/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/paperless-ngx/1.0.11/templates/library/base_v1_1_3/redis.py rename to trains/community/paperless-ngx/1.0.12/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/paperless-ngx/1.0.11/templates/library/base_v1_1_3/resources.py b/trains/community/paperless-ngx/1.0.12/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/paperless-ngx/1.0.11/templates/library/base_v1_1_3/resources.py rename to trains/community/paperless-ngx/1.0.12/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/paperless-ngx/1.0.11/templates/library/base_v1_1_3/security.py b/trains/community/paperless-ngx/1.0.12/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/paperless-ngx/1.0.11/templates/library/base_v1_1_3/security.py rename to trains/community/paperless-ngx/1.0.12/templates/library/base_v1_1_4/security.py diff --git a/trains/community/paperless-ngx/1.0.11/templates/library/base_v1_1_3/storage.py b/trains/community/paperless-ngx/1.0.12/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/paperless-ngx/1.0.11/templates/library/base_v1_1_3/storage.py rename to trains/community/paperless-ngx/1.0.12/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/paperless-ngx/1.0.11/templates/library/base_v1_1_3/utils.py b/trains/community/paperless-ngx/1.0.12/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/paperless-ngx/1.0.11/templates/library/base_v1_1_3/utils.py rename to trains/community/paperless-ngx/1.0.12/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/paperless-ngx/1.0.11/templates/test_values/basic-values.yaml b/trains/community/paperless-ngx/1.0.12/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/paperless-ngx/1.0.11/templates/test_values/basic-values.yaml rename to trains/community/paperless-ngx/1.0.12/templates/test_values/basic-values.yaml diff --git a/trains/community/paperless-ngx/1.0.11/templates/test_values/trash-values.yaml b/trains/community/paperless-ngx/1.0.12/templates/test_values/trash-values.yaml similarity index 100% rename from trains/community/paperless-ngx/1.0.11/templates/test_values/trash-values.yaml rename to trains/community/paperless-ngx/1.0.12/templates/test_values/trash-values.yaml diff --git a/trains/community/passbolt/1.0.6/templates/library/base_v1_1_3/healthchecks.py b/trains/community/passbolt/1.0.6/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/community/passbolt/1.0.6/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/passbolt/1.0.6/templates/library/base_v1_1_3/permissions.py b/trains/community/passbolt/1.0.6/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/community/passbolt/1.0.6/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/community/passbolt/1.0.6/README.md b/trains/community/passbolt/1.0.7/README.md similarity index 100% rename from trains/community/passbolt/1.0.6/README.md rename to trains/community/passbolt/1.0.7/README.md diff --git a/trains/community/passbolt/1.0.6/app.yaml b/trains/community/passbolt/1.0.7/app.yaml similarity index 90% rename from trains/community/passbolt/1.0.6/app.yaml rename to trains/community/passbolt/1.0.7/app.yaml index 4b44e7644f..d1369f6eec 100644 --- a/trains/community/passbolt/1.0.6/app.yaml +++ b/trains/community/passbolt/1.0.7/app.yaml @@ -9,8 +9,8 @@ icon: https://media.sys.truenas.net/apps/passbolt/icons/icon.svg keywords: - password - manager -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -37,4 +37,4 @@ sources: - https://www.passbolt.com title: Passbolt train: community -version: 1.0.6 +version: 1.0.7 diff --git a/trains/community/passbolt/1.0.6/ix_values.yaml b/trains/community/passbolt/1.0.7/ix_values.yaml similarity index 100% rename from trains/community/passbolt/1.0.6/ix_values.yaml rename to trains/community/passbolt/1.0.7/ix_values.yaml diff --git a/trains/community/passbolt/1.0.6/migrations/migrate_from_kubernetes b/trains/community/passbolt/1.0.7/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/passbolt/1.0.6/migrations/migrate_from_kubernetes rename to trains/community/passbolt/1.0.7/migrations/migrate_from_kubernetes diff --git a/trains/community/passbolt/1.0.6/migrations/migration_helpers/__init__.py b/trains/community/passbolt/1.0.7/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/passbolt/1.0.6/migrations/migration_helpers/__init__.py rename to trains/community/passbolt/1.0.7/migrations/migration_helpers/__init__.py diff --git a/trains/community/passbolt/1.0.6/migrations/migration_helpers/cpu.py b/trains/community/passbolt/1.0.7/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/passbolt/1.0.6/migrations/migration_helpers/cpu.py rename to trains/community/passbolt/1.0.7/migrations/migration_helpers/cpu.py diff --git a/trains/community/passbolt/1.0.6/migrations/migration_helpers/dns_config.py b/trains/community/passbolt/1.0.7/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/passbolt/1.0.6/migrations/migration_helpers/dns_config.py rename to trains/community/passbolt/1.0.7/migrations/migration_helpers/dns_config.py diff --git a/trains/community/passbolt/1.0.6/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/passbolt/1.0.7/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/passbolt/1.0.6/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/passbolt/1.0.7/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/passbolt/1.0.6/migrations/migration_helpers/memory.py b/trains/community/passbolt/1.0.7/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/passbolt/1.0.6/migrations/migration_helpers/memory.py rename to trains/community/passbolt/1.0.7/migrations/migration_helpers/memory.py diff --git a/trains/community/passbolt/1.0.6/migrations/migration_helpers/resources.py b/trains/community/passbolt/1.0.7/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/passbolt/1.0.6/migrations/migration_helpers/resources.py rename to trains/community/passbolt/1.0.7/migrations/migration_helpers/resources.py diff --git a/trains/community/passbolt/1.0.6/migrations/migration_helpers/storage.py b/trains/community/passbolt/1.0.7/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/passbolt/1.0.6/migrations/migration_helpers/storage.py rename to trains/community/passbolt/1.0.7/migrations/migration_helpers/storage.py diff --git a/trains/community/passbolt/1.0.6/questions.yaml b/trains/community/passbolt/1.0.7/questions.yaml similarity index 100% rename from trains/community/passbolt/1.0.6/questions.yaml rename to trains/community/passbolt/1.0.7/questions.yaml diff --git a/trains/community/passbolt/1.0.6/templates/docker-compose.yaml b/trains/community/passbolt/1.0.7/templates/docker-compose.yaml similarity index 100% rename from trains/community/passbolt/1.0.6/templates/docker-compose.yaml rename to trains/community/passbolt/1.0.7/templates/docker-compose.yaml diff --git a/trains/community/passbolt/1.0.6/templates/library/base_v1_1_3/__init__.py b/trains/community/passbolt/1.0.7/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/passbolt/1.0.6/templates/library/base_v1_1_3/__init__.py rename to trains/community/passbolt/1.0.7/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/passbolt/1.0.6/templates/library/base_v1_1_3/environment.py b/trains/community/passbolt/1.0.7/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/passbolt/1.0.6/templates/library/base_v1_1_3/environment.py rename to trains/community/passbolt/1.0.7/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/passbolt/1.0.7/templates/library/base_v1_1_4/healthchecks.py b/trains/community/passbolt/1.0.7/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/community/passbolt/1.0.7/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/passbolt/1.0.6/templates/library/base_v1_1_3/mariadb.py b/trains/community/passbolt/1.0.7/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/passbolt/1.0.6/templates/library/base_v1_1_3/mariadb.py rename to trains/community/passbolt/1.0.7/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/passbolt/1.0.6/templates/library/base_v1_1_3/metadata.py b/trains/community/passbolt/1.0.7/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/passbolt/1.0.6/templates/library/base_v1_1_3/metadata.py rename to trains/community/passbolt/1.0.7/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/passbolt/1.0.6/templates/library/base_v1_1_3/network.py b/trains/community/passbolt/1.0.7/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/passbolt/1.0.6/templates/library/base_v1_1_3/network.py rename to trains/community/passbolt/1.0.7/templates/library/base_v1_1_4/network.py diff --git a/trains/community/passbolt/1.0.7/templates/library/base_v1_1_4/permissions.py b/trains/community/passbolt/1.0.7/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/community/passbolt/1.0.7/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/community/passbolt/1.0.6/templates/library/base_v1_1_3/ports.py b/trains/community/passbolt/1.0.7/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/passbolt/1.0.6/templates/library/base_v1_1_3/ports.py rename to trains/community/passbolt/1.0.7/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/passbolt/1.0.6/templates/library/base_v1_1_3/postgres.py b/trains/community/passbolt/1.0.7/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/passbolt/1.0.6/templates/library/base_v1_1_3/postgres.py rename to trains/community/passbolt/1.0.7/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/passbolt/1.0.6/templates/library/base_v1_1_3/redis.py b/trains/community/passbolt/1.0.7/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/passbolt/1.0.6/templates/library/base_v1_1_3/redis.py rename to trains/community/passbolt/1.0.7/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/passbolt/1.0.6/templates/library/base_v1_1_3/resources.py b/trains/community/passbolt/1.0.7/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/passbolt/1.0.6/templates/library/base_v1_1_3/resources.py rename to trains/community/passbolt/1.0.7/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/passbolt/1.0.6/templates/library/base_v1_1_3/security.py b/trains/community/passbolt/1.0.7/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/passbolt/1.0.6/templates/library/base_v1_1_3/security.py rename to trains/community/passbolt/1.0.7/templates/library/base_v1_1_4/security.py diff --git a/trains/community/passbolt/1.0.6/templates/library/base_v1_1_3/storage.py b/trains/community/passbolt/1.0.7/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/passbolt/1.0.6/templates/library/base_v1_1_3/storage.py rename to trains/community/passbolt/1.0.7/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/passbolt/1.0.6/templates/library/base_v1_1_3/utils.py b/trains/community/passbolt/1.0.7/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/passbolt/1.0.6/templates/library/base_v1_1_3/utils.py rename to trains/community/passbolt/1.0.7/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/passbolt/1.0.6/templates/test_values/basic-values.yaml b/trains/community/passbolt/1.0.7/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/passbolt/1.0.6/templates/test_values/basic-values.yaml rename to trains/community/passbolt/1.0.7/templates/test_values/basic-values.yaml diff --git a/trains/community/passbolt/1.0.6/templates/test_values/https-values.yaml b/trains/community/passbolt/1.0.7/templates/test_values/https-values.yaml similarity index 100% rename from trains/community/passbolt/1.0.6/templates/test_values/https-values.yaml rename to trains/community/passbolt/1.0.7/templates/test_values/https-values.yaml diff --git a/trains/community/pgadmin/1.0.4/templates/library/base_v1_1_3/healthchecks.py b/trains/community/pgadmin/1.0.4/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/community/pgadmin/1.0.4/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/pgadmin/1.0.4/templates/library/base_v1_1_3/permissions.py b/trains/community/pgadmin/1.0.4/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/community/pgadmin/1.0.4/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/community/pgadmin/1.0.4/README.md b/trains/community/pgadmin/1.0.5/README.md similarity index 100% rename from trains/community/pgadmin/1.0.4/README.md rename to trains/community/pgadmin/1.0.5/README.md diff --git a/trains/community/pgadmin/1.0.4/app.yaml b/trains/community/pgadmin/1.0.5/app.yaml similarity index 89% rename from trains/community/pgadmin/1.0.4/app.yaml rename to trains/community/pgadmin/1.0.5/app.yaml index 284bcb0a1a..91e254876c 100644 --- a/trains/community/pgadmin/1.0.4/app.yaml +++ b/trains/community/pgadmin/1.0.5/app.yaml @@ -12,8 +12,8 @@ icon: https://media.sys.truenas.net/apps/pgadmin/icons/icon.png keywords: - database - management -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -34,4 +34,4 @@ sources: - https://www.pgadmin.org/ title: pgAdmin train: community -version: 1.0.4 +version: 1.0.5 diff --git a/trains/community/pgadmin/1.0.4/ix_values.yaml b/trains/community/pgadmin/1.0.5/ix_values.yaml similarity index 100% rename from trains/community/pgadmin/1.0.4/ix_values.yaml rename to trains/community/pgadmin/1.0.5/ix_values.yaml diff --git a/trains/community/pgadmin/1.0.4/migrations/migrate_from_kubernetes b/trains/community/pgadmin/1.0.5/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/pgadmin/1.0.4/migrations/migrate_from_kubernetes rename to trains/community/pgadmin/1.0.5/migrations/migrate_from_kubernetes diff --git a/trains/community/pgadmin/1.0.4/migrations/migration_helpers/__init__.py b/trains/community/pgadmin/1.0.5/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/pgadmin/1.0.4/migrations/migration_helpers/__init__.py rename to trains/community/pgadmin/1.0.5/migrations/migration_helpers/__init__.py diff --git a/trains/community/pgadmin/1.0.4/migrations/migration_helpers/cpu.py b/trains/community/pgadmin/1.0.5/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/pgadmin/1.0.4/migrations/migration_helpers/cpu.py rename to trains/community/pgadmin/1.0.5/migrations/migration_helpers/cpu.py diff --git a/trains/community/pgadmin/1.0.4/migrations/migration_helpers/dns_config.py b/trains/community/pgadmin/1.0.5/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/pgadmin/1.0.4/migrations/migration_helpers/dns_config.py rename to trains/community/pgadmin/1.0.5/migrations/migration_helpers/dns_config.py diff --git a/trains/community/pgadmin/1.0.4/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/pgadmin/1.0.5/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/pgadmin/1.0.4/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/pgadmin/1.0.5/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/pgadmin/1.0.4/migrations/migration_helpers/memory.py b/trains/community/pgadmin/1.0.5/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/pgadmin/1.0.4/migrations/migration_helpers/memory.py rename to trains/community/pgadmin/1.0.5/migrations/migration_helpers/memory.py diff --git a/trains/community/pgadmin/1.0.4/migrations/migration_helpers/resources.py b/trains/community/pgadmin/1.0.5/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/pgadmin/1.0.4/migrations/migration_helpers/resources.py rename to trains/community/pgadmin/1.0.5/migrations/migration_helpers/resources.py diff --git a/trains/community/pgadmin/1.0.4/migrations/migration_helpers/storage.py b/trains/community/pgadmin/1.0.5/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/pgadmin/1.0.4/migrations/migration_helpers/storage.py rename to trains/community/pgadmin/1.0.5/migrations/migration_helpers/storage.py diff --git a/trains/community/pgadmin/1.0.4/questions.yaml b/trains/community/pgadmin/1.0.5/questions.yaml similarity index 100% rename from trains/community/pgadmin/1.0.4/questions.yaml rename to trains/community/pgadmin/1.0.5/questions.yaml diff --git a/trains/community/pgadmin/1.0.4/templates/docker-compose.yaml b/trains/community/pgadmin/1.0.5/templates/docker-compose.yaml similarity index 100% rename from trains/community/pgadmin/1.0.4/templates/docker-compose.yaml rename to trains/community/pgadmin/1.0.5/templates/docker-compose.yaml diff --git a/trains/community/pgadmin/1.0.4/templates/library/base_v1_1_3/__init__.py b/trains/community/pgadmin/1.0.5/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/pgadmin/1.0.4/templates/library/base_v1_1_3/__init__.py rename to trains/community/pgadmin/1.0.5/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/pgadmin/1.0.4/templates/library/base_v1_1_3/environment.py b/trains/community/pgadmin/1.0.5/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/pgadmin/1.0.4/templates/library/base_v1_1_3/environment.py rename to trains/community/pgadmin/1.0.5/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/pgadmin/1.0.5/templates/library/base_v1_1_4/healthchecks.py b/trains/community/pgadmin/1.0.5/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/community/pgadmin/1.0.5/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/pgadmin/1.0.4/templates/library/base_v1_1_3/mariadb.py b/trains/community/pgadmin/1.0.5/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/pgadmin/1.0.4/templates/library/base_v1_1_3/mariadb.py rename to trains/community/pgadmin/1.0.5/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/pgadmin/1.0.4/templates/library/base_v1_1_3/metadata.py b/trains/community/pgadmin/1.0.5/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/pgadmin/1.0.4/templates/library/base_v1_1_3/metadata.py rename to trains/community/pgadmin/1.0.5/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/pgadmin/1.0.4/templates/library/base_v1_1_3/network.py b/trains/community/pgadmin/1.0.5/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/pgadmin/1.0.4/templates/library/base_v1_1_3/network.py rename to trains/community/pgadmin/1.0.5/templates/library/base_v1_1_4/network.py diff --git a/trains/community/pgadmin/1.0.5/templates/library/base_v1_1_4/permissions.py b/trains/community/pgadmin/1.0.5/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/community/pgadmin/1.0.5/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/community/pgadmin/1.0.4/templates/library/base_v1_1_3/ports.py b/trains/community/pgadmin/1.0.5/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/pgadmin/1.0.4/templates/library/base_v1_1_3/ports.py rename to trains/community/pgadmin/1.0.5/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/pgadmin/1.0.4/templates/library/base_v1_1_3/postgres.py b/trains/community/pgadmin/1.0.5/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/pgadmin/1.0.4/templates/library/base_v1_1_3/postgres.py rename to trains/community/pgadmin/1.0.5/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/pgadmin/1.0.4/templates/library/base_v1_1_3/redis.py b/trains/community/pgadmin/1.0.5/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/pgadmin/1.0.4/templates/library/base_v1_1_3/redis.py rename to trains/community/pgadmin/1.0.5/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/pgadmin/1.0.4/templates/library/base_v1_1_3/resources.py b/trains/community/pgadmin/1.0.5/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/pgadmin/1.0.4/templates/library/base_v1_1_3/resources.py rename to trains/community/pgadmin/1.0.5/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/pgadmin/1.0.4/templates/library/base_v1_1_3/security.py b/trains/community/pgadmin/1.0.5/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/pgadmin/1.0.4/templates/library/base_v1_1_3/security.py rename to trains/community/pgadmin/1.0.5/templates/library/base_v1_1_4/security.py diff --git a/trains/community/pgadmin/1.0.4/templates/library/base_v1_1_3/storage.py b/trains/community/pgadmin/1.0.5/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/pgadmin/1.0.4/templates/library/base_v1_1_3/storage.py rename to trains/community/pgadmin/1.0.5/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/pgadmin/1.0.4/templates/library/base_v1_1_3/utils.py b/trains/community/pgadmin/1.0.5/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/pgadmin/1.0.4/templates/library/base_v1_1_3/utils.py rename to trains/community/pgadmin/1.0.5/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/pgadmin/1.0.4/templates/test_values/basic-values.yaml b/trains/community/pgadmin/1.0.5/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/pgadmin/1.0.4/templates/test_values/basic-values.yaml rename to trains/community/pgadmin/1.0.5/templates/test_values/basic-values.yaml diff --git a/trains/community/pgadmin/1.0.4/templates/test_values/https-values.yaml b/trains/community/pgadmin/1.0.5/templates/test_values/https-values.yaml similarity index 100% rename from trains/community/pgadmin/1.0.4/templates/test_values/https-values.yaml rename to trains/community/pgadmin/1.0.5/templates/test_values/https-values.yaml diff --git a/trains/community/pigallery2/1.0.5/templates/library/base_v1_1_3/healthchecks.py b/trains/community/pigallery2/1.0.5/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/community/pigallery2/1.0.5/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/pigallery2/1.0.5/templates/library/base_v1_1_3/permissions.py b/trains/community/pigallery2/1.0.5/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/community/pigallery2/1.0.5/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/community/pigallery2/1.0.5/README.md b/trains/community/pigallery2/1.0.6/README.md similarity index 100% rename from trains/community/pigallery2/1.0.5/README.md rename to trains/community/pigallery2/1.0.6/README.md diff --git a/trains/community/pigallery2/1.0.5/app.yaml b/trains/community/pigallery2/1.0.6/app.yaml similarity index 92% rename from trains/community/pigallery2/1.0.5/app.yaml rename to trains/community/pigallery2/1.0.6/app.yaml index 7df3986ede..f9e6a9dd74 100644 --- a/trains/community/pigallery2/1.0.5/app.yaml +++ b/trains/community/pigallery2/1.0.6/app.yaml @@ -10,8 +10,8 @@ icon: https://media.sys.truenas.net/apps/pigallery2/icons/icon.png keywords: - photo - media -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -39,4 +39,4 @@ sources: - https://github.com/bpatrik/pigallery2 title: PiGallery2 train: community -version: 1.0.5 +version: 1.0.6 diff --git a/trains/community/pigallery2/1.0.5/ix_values.yaml b/trains/community/pigallery2/1.0.6/ix_values.yaml similarity index 100% rename from trains/community/pigallery2/1.0.5/ix_values.yaml rename to trains/community/pigallery2/1.0.6/ix_values.yaml diff --git a/trains/community/pigallery2/1.0.5/migrations/migrate_from_kubernetes b/trains/community/pigallery2/1.0.6/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/pigallery2/1.0.5/migrations/migrate_from_kubernetes rename to trains/community/pigallery2/1.0.6/migrations/migrate_from_kubernetes diff --git a/trains/community/pigallery2/1.0.5/migrations/migration_helpers/__init__.py b/trains/community/pigallery2/1.0.6/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/pigallery2/1.0.5/migrations/migration_helpers/__init__.py rename to trains/community/pigallery2/1.0.6/migrations/migration_helpers/__init__.py diff --git a/trains/community/pigallery2/1.0.5/migrations/migration_helpers/cpu.py b/trains/community/pigallery2/1.0.6/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/pigallery2/1.0.5/migrations/migration_helpers/cpu.py rename to trains/community/pigallery2/1.0.6/migrations/migration_helpers/cpu.py diff --git a/trains/community/pigallery2/1.0.5/migrations/migration_helpers/dns_config.py b/trains/community/pigallery2/1.0.6/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/pigallery2/1.0.5/migrations/migration_helpers/dns_config.py rename to trains/community/pigallery2/1.0.6/migrations/migration_helpers/dns_config.py diff --git a/trains/community/pigallery2/1.0.5/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/pigallery2/1.0.6/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/pigallery2/1.0.5/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/pigallery2/1.0.6/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/pigallery2/1.0.5/migrations/migration_helpers/memory.py b/trains/community/pigallery2/1.0.6/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/pigallery2/1.0.5/migrations/migration_helpers/memory.py rename to trains/community/pigallery2/1.0.6/migrations/migration_helpers/memory.py diff --git a/trains/community/pigallery2/1.0.5/migrations/migration_helpers/resources.py b/trains/community/pigallery2/1.0.6/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/pigallery2/1.0.5/migrations/migration_helpers/resources.py rename to trains/community/pigallery2/1.0.6/migrations/migration_helpers/resources.py diff --git a/trains/community/pigallery2/1.0.5/migrations/migration_helpers/storage.py b/trains/community/pigallery2/1.0.6/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/pigallery2/1.0.5/migrations/migration_helpers/storage.py rename to trains/community/pigallery2/1.0.6/migrations/migration_helpers/storage.py diff --git a/trains/community/pigallery2/1.0.5/questions.yaml b/trains/community/pigallery2/1.0.6/questions.yaml similarity index 100% rename from trains/community/pigallery2/1.0.5/questions.yaml rename to trains/community/pigallery2/1.0.6/questions.yaml diff --git a/trains/community/pigallery2/1.0.5/templates/docker-compose.yaml b/trains/community/pigallery2/1.0.6/templates/docker-compose.yaml similarity index 100% rename from trains/community/pigallery2/1.0.5/templates/docker-compose.yaml rename to trains/community/pigallery2/1.0.6/templates/docker-compose.yaml diff --git a/trains/community/pigallery2/1.0.5/templates/library/base_v1_1_3/__init__.py b/trains/community/pigallery2/1.0.6/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/pigallery2/1.0.5/templates/library/base_v1_1_3/__init__.py rename to trains/community/pigallery2/1.0.6/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/pigallery2/1.0.5/templates/library/base_v1_1_3/environment.py b/trains/community/pigallery2/1.0.6/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/pigallery2/1.0.5/templates/library/base_v1_1_3/environment.py rename to trains/community/pigallery2/1.0.6/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/pigallery2/1.0.6/templates/library/base_v1_1_4/healthchecks.py b/trains/community/pigallery2/1.0.6/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/community/pigallery2/1.0.6/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/pigallery2/1.0.5/templates/library/base_v1_1_3/mariadb.py b/trains/community/pigallery2/1.0.6/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/pigallery2/1.0.5/templates/library/base_v1_1_3/mariadb.py rename to trains/community/pigallery2/1.0.6/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/pigallery2/1.0.5/templates/library/base_v1_1_3/metadata.py b/trains/community/pigallery2/1.0.6/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/pigallery2/1.0.5/templates/library/base_v1_1_3/metadata.py rename to trains/community/pigallery2/1.0.6/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/pigallery2/1.0.5/templates/library/base_v1_1_3/network.py b/trains/community/pigallery2/1.0.6/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/pigallery2/1.0.5/templates/library/base_v1_1_3/network.py rename to trains/community/pigallery2/1.0.6/templates/library/base_v1_1_4/network.py diff --git a/trains/community/pigallery2/1.0.6/templates/library/base_v1_1_4/permissions.py b/trains/community/pigallery2/1.0.6/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/community/pigallery2/1.0.6/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/community/pigallery2/1.0.5/templates/library/base_v1_1_3/ports.py b/trains/community/pigallery2/1.0.6/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/pigallery2/1.0.5/templates/library/base_v1_1_3/ports.py rename to trains/community/pigallery2/1.0.6/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/pigallery2/1.0.5/templates/library/base_v1_1_3/postgres.py b/trains/community/pigallery2/1.0.6/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/pigallery2/1.0.5/templates/library/base_v1_1_3/postgres.py rename to trains/community/pigallery2/1.0.6/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/pigallery2/1.0.5/templates/library/base_v1_1_3/redis.py b/trains/community/pigallery2/1.0.6/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/pigallery2/1.0.5/templates/library/base_v1_1_3/redis.py rename to trains/community/pigallery2/1.0.6/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/pigallery2/1.0.5/templates/library/base_v1_1_3/resources.py b/trains/community/pigallery2/1.0.6/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/pigallery2/1.0.5/templates/library/base_v1_1_3/resources.py rename to trains/community/pigallery2/1.0.6/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/pigallery2/1.0.5/templates/library/base_v1_1_3/security.py b/trains/community/pigallery2/1.0.6/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/pigallery2/1.0.5/templates/library/base_v1_1_3/security.py rename to trains/community/pigallery2/1.0.6/templates/library/base_v1_1_4/security.py diff --git a/trains/community/pigallery2/1.0.5/templates/library/base_v1_1_3/storage.py b/trains/community/pigallery2/1.0.6/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/pigallery2/1.0.5/templates/library/base_v1_1_3/storage.py rename to trains/community/pigallery2/1.0.6/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/pigallery2/1.0.5/templates/library/base_v1_1_3/utils.py b/trains/community/pigallery2/1.0.6/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/pigallery2/1.0.5/templates/library/base_v1_1_3/utils.py rename to trains/community/pigallery2/1.0.6/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/pigallery2/1.0.5/templates/test_values/basic-values.yaml b/trains/community/pigallery2/1.0.6/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/pigallery2/1.0.5/templates/test_values/basic-values.yaml rename to trains/community/pigallery2/1.0.6/templates/test_values/basic-values.yaml diff --git a/trains/community/piwigo/1.0.5/templates/library/base_v1_1_3/healthchecks.py b/trains/community/piwigo/1.0.5/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/community/piwigo/1.0.5/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/piwigo/1.0.5/templates/library/base_v1_1_3/permissions.py b/trains/community/piwigo/1.0.5/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/community/piwigo/1.0.5/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/community/piwigo/1.0.5/README.md b/trains/community/piwigo/1.0.6/README.md similarity index 100% rename from trains/community/piwigo/1.0.5/README.md rename to trains/community/piwigo/1.0.6/README.md diff --git a/trains/community/piwigo/1.0.5/app.yaml b/trains/community/piwigo/1.0.6/app.yaml similarity index 92% rename from trains/community/piwigo/1.0.5/app.yaml rename to trains/community/piwigo/1.0.6/app.yaml index 7474864ccb..62aa6d522f 100644 --- a/trains/community/piwigo/1.0.5/app.yaml +++ b/trains/community/piwigo/1.0.6/app.yaml @@ -22,8 +22,8 @@ icon: https://media.sys.truenas.net/apps/piwigo/icons/icon.svg keywords: - photo - gallery -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -47,4 +47,4 @@ sources: - https://hub.docker.com/r/linuxserver/piwigo title: Piwigo train: community -version: 1.0.5 +version: 1.0.6 diff --git a/trains/community/piwigo/1.0.5/ix_values.yaml b/trains/community/piwigo/1.0.6/ix_values.yaml similarity index 100% rename from trains/community/piwigo/1.0.5/ix_values.yaml rename to trains/community/piwigo/1.0.6/ix_values.yaml diff --git a/trains/community/piwigo/1.0.5/migrations/migrate_from_kubernetes b/trains/community/piwigo/1.0.6/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/piwigo/1.0.5/migrations/migrate_from_kubernetes rename to trains/community/piwigo/1.0.6/migrations/migrate_from_kubernetes diff --git a/trains/community/piwigo/1.0.5/migrations/migration_helpers/__init__.py b/trains/community/piwigo/1.0.6/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/piwigo/1.0.5/migrations/migration_helpers/__init__.py rename to trains/community/piwigo/1.0.6/migrations/migration_helpers/__init__.py diff --git a/trains/community/piwigo/1.0.5/migrations/migration_helpers/cpu.py b/trains/community/piwigo/1.0.6/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/piwigo/1.0.5/migrations/migration_helpers/cpu.py rename to trains/community/piwigo/1.0.6/migrations/migration_helpers/cpu.py diff --git a/trains/community/piwigo/1.0.5/migrations/migration_helpers/dns_config.py b/trains/community/piwigo/1.0.6/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/piwigo/1.0.5/migrations/migration_helpers/dns_config.py rename to trains/community/piwigo/1.0.6/migrations/migration_helpers/dns_config.py diff --git a/trains/community/piwigo/1.0.5/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/piwigo/1.0.6/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/piwigo/1.0.5/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/piwigo/1.0.6/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/piwigo/1.0.5/migrations/migration_helpers/memory.py b/trains/community/piwigo/1.0.6/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/piwigo/1.0.5/migrations/migration_helpers/memory.py rename to trains/community/piwigo/1.0.6/migrations/migration_helpers/memory.py diff --git a/trains/community/piwigo/1.0.5/migrations/migration_helpers/resources.py b/trains/community/piwigo/1.0.6/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/piwigo/1.0.5/migrations/migration_helpers/resources.py rename to trains/community/piwigo/1.0.6/migrations/migration_helpers/resources.py diff --git a/trains/community/piwigo/1.0.5/migrations/migration_helpers/storage.py b/trains/community/piwigo/1.0.6/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/piwigo/1.0.5/migrations/migration_helpers/storage.py rename to trains/community/piwigo/1.0.6/migrations/migration_helpers/storage.py diff --git a/trains/community/piwigo/1.0.5/questions.yaml b/trains/community/piwigo/1.0.6/questions.yaml similarity index 100% rename from trains/community/piwigo/1.0.5/questions.yaml rename to trains/community/piwigo/1.0.6/questions.yaml diff --git a/trains/community/piwigo/1.0.5/templates/docker-compose.yaml b/trains/community/piwigo/1.0.6/templates/docker-compose.yaml similarity index 100% rename from trains/community/piwigo/1.0.5/templates/docker-compose.yaml rename to trains/community/piwigo/1.0.6/templates/docker-compose.yaml diff --git a/trains/community/piwigo/1.0.5/templates/library/base_v1_1_3/__init__.py b/trains/community/piwigo/1.0.6/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/piwigo/1.0.5/templates/library/base_v1_1_3/__init__.py rename to trains/community/piwigo/1.0.6/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/piwigo/1.0.5/templates/library/base_v1_1_3/environment.py b/trains/community/piwigo/1.0.6/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/piwigo/1.0.5/templates/library/base_v1_1_3/environment.py rename to trains/community/piwigo/1.0.6/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/piwigo/1.0.6/templates/library/base_v1_1_4/healthchecks.py b/trains/community/piwigo/1.0.6/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/community/piwigo/1.0.6/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/piwigo/1.0.5/templates/library/base_v1_1_3/mariadb.py b/trains/community/piwigo/1.0.6/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/piwigo/1.0.5/templates/library/base_v1_1_3/mariadb.py rename to trains/community/piwigo/1.0.6/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/piwigo/1.0.5/templates/library/base_v1_1_3/metadata.py b/trains/community/piwigo/1.0.6/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/piwigo/1.0.5/templates/library/base_v1_1_3/metadata.py rename to trains/community/piwigo/1.0.6/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/piwigo/1.0.5/templates/library/base_v1_1_3/network.py b/trains/community/piwigo/1.0.6/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/piwigo/1.0.5/templates/library/base_v1_1_3/network.py rename to trains/community/piwigo/1.0.6/templates/library/base_v1_1_4/network.py diff --git a/trains/community/piwigo/1.0.6/templates/library/base_v1_1_4/permissions.py b/trains/community/piwigo/1.0.6/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/community/piwigo/1.0.6/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/community/piwigo/1.0.5/templates/library/base_v1_1_3/ports.py b/trains/community/piwigo/1.0.6/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/piwigo/1.0.5/templates/library/base_v1_1_3/ports.py rename to trains/community/piwigo/1.0.6/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/piwigo/1.0.5/templates/library/base_v1_1_3/postgres.py b/trains/community/piwigo/1.0.6/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/piwigo/1.0.5/templates/library/base_v1_1_3/postgres.py rename to trains/community/piwigo/1.0.6/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/piwigo/1.0.5/templates/library/base_v1_1_3/redis.py b/trains/community/piwigo/1.0.6/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/piwigo/1.0.5/templates/library/base_v1_1_3/redis.py rename to trains/community/piwigo/1.0.6/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/piwigo/1.0.5/templates/library/base_v1_1_3/resources.py b/trains/community/piwigo/1.0.6/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/piwigo/1.0.5/templates/library/base_v1_1_3/resources.py rename to trains/community/piwigo/1.0.6/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/piwigo/1.0.5/templates/library/base_v1_1_3/security.py b/trains/community/piwigo/1.0.6/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/piwigo/1.0.5/templates/library/base_v1_1_3/security.py rename to trains/community/piwigo/1.0.6/templates/library/base_v1_1_4/security.py diff --git a/trains/community/piwigo/1.0.5/templates/library/base_v1_1_3/storage.py b/trains/community/piwigo/1.0.6/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/piwigo/1.0.5/templates/library/base_v1_1_3/storage.py rename to trains/community/piwigo/1.0.6/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/piwigo/1.0.5/templates/library/base_v1_1_3/utils.py b/trains/community/piwigo/1.0.6/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/piwigo/1.0.5/templates/library/base_v1_1_3/utils.py rename to trains/community/piwigo/1.0.6/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/piwigo/1.0.5/templates/macros/init.sh b/trains/community/piwigo/1.0.6/templates/macros/init.sh similarity index 100% rename from trains/community/piwigo/1.0.5/templates/macros/init.sh rename to trains/community/piwigo/1.0.6/templates/macros/init.sh diff --git a/trains/community/piwigo/1.0.5/templates/test_values/basic-values.yaml b/trains/community/piwigo/1.0.6/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/piwigo/1.0.5/templates/test_values/basic-values.yaml rename to trains/community/piwigo/1.0.6/templates/test_values/basic-values.yaml diff --git a/trains/community/planka/1.0.10/templates/library/base_v1_1_3/healthchecks.py b/trains/community/planka/1.0.10/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/community/planka/1.0.10/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/planka/1.0.10/templates/library/base_v1_1_3/permissions.py b/trains/community/planka/1.0.10/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/community/planka/1.0.10/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/community/planka/1.0.10/README.md b/trains/community/planka/1.0.11/README.md similarity index 100% rename from trains/community/planka/1.0.10/README.md rename to trains/community/planka/1.0.11/README.md diff --git a/trains/community/planka/1.0.10/app.yaml b/trains/community/planka/1.0.11/app.yaml similarity index 88% rename from trains/community/planka/1.0.10/app.yaml rename to trains/community/planka/1.0.11/app.yaml index ea51fa2ce6..384be8fa44 100644 --- a/trains/community/planka/1.0.10/app.yaml +++ b/trains/community/planka/1.0.11/app.yaml @@ -10,8 +10,8 @@ keywords: - kanban - project - task -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -35,4 +35,4 @@ sources: - https://github.com/plankanban/planka title: Planka train: community -version: 1.0.10 +version: 1.0.11 diff --git a/trains/community/planka/1.0.10/ix_values.yaml b/trains/community/planka/1.0.11/ix_values.yaml similarity index 100% rename from trains/community/planka/1.0.10/ix_values.yaml rename to trains/community/planka/1.0.11/ix_values.yaml diff --git a/trains/community/planka/1.0.10/migrations/migrate_from_kubernetes b/trains/community/planka/1.0.11/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/planka/1.0.10/migrations/migrate_from_kubernetes rename to trains/community/planka/1.0.11/migrations/migrate_from_kubernetes diff --git a/trains/community/planka/1.0.10/migrations/migration_helpers/__init__.py b/trains/community/planka/1.0.11/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/planka/1.0.10/migrations/migration_helpers/__init__.py rename to trains/community/planka/1.0.11/migrations/migration_helpers/__init__.py diff --git a/trains/community/planka/1.0.10/migrations/migration_helpers/cpu.py b/trains/community/planka/1.0.11/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/planka/1.0.10/migrations/migration_helpers/cpu.py rename to trains/community/planka/1.0.11/migrations/migration_helpers/cpu.py diff --git a/trains/community/planka/1.0.10/migrations/migration_helpers/dns_config.py b/trains/community/planka/1.0.11/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/planka/1.0.10/migrations/migration_helpers/dns_config.py rename to trains/community/planka/1.0.11/migrations/migration_helpers/dns_config.py diff --git a/trains/community/planka/1.0.10/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/planka/1.0.11/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/planka/1.0.10/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/planka/1.0.11/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/planka/1.0.10/migrations/migration_helpers/memory.py b/trains/community/planka/1.0.11/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/planka/1.0.10/migrations/migration_helpers/memory.py rename to trains/community/planka/1.0.11/migrations/migration_helpers/memory.py diff --git a/trains/community/planka/1.0.10/migrations/migration_helpers/resources.py b/trains/community/planka/1.0.11/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/planka/1.0.10/migrations/migration_helpers/resources.py rename to trains/community/planka/1.0.11/migrations/migration_helpers/resources.py diff --git a/trains/community/planka/1.0.10/migrations/migration_helpers/storage.py b/trains/community/planka/1.0.11/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/planka/1.0.10/migrations/migration_helpers/storage.py rename to trains/community/planka/1.0.11/migrations/migration_helpers/storage.py diff --git a/trains/community/planka/1.0.10/questions.yaml b/trains/community/planka/1.0.11/questions.yaml similarity index 100% rename from trains/community/planka/1.0.10/questions.yaml rename to trains/community/planka/1.0.11/questions.yaml diff --git a/trains/community/planka/1.0.10/templates/docker-compose.yaml b/trains/community/planka/1.0.11/templates/docker-compose.yaml similarity index 100% rename from trains/community/planka/1.0.10/templates/docker-compose.yaml rename to trains/community/planka/1.0.11/templates/docker-compose.yaml diff --git a/trains/community/planka/1.0.10/templates/library/base_v1_1_3/__init__.py b/trains/community/planka/1.0.11/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/planka/1.0.10/templates/library/base_v1_1_3/__init__.py rename to trains/community/planka/1.0.11/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/planka/1.0.10/templates/library/base_v1_1_3/environment.py b/trains/community/planka/1.0.11/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/planka/1.0.10/templates/library/base_v1_1_3/environment.py rename to trains/community/planka/1.0.11/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/planka/1.0.11/templates/library/base_v1_1_4/healthchecks.py b/trains/community/planka/1.0.11/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/community/planka/1.0.11/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/planka/1.0.10/templates/library/base_v1_1_3/mariadb.py b/trains/community/planka/1.0.11/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/planka/1.0.10/templates/library/base_v1_1_3/mariadb.py rename to trains/community/planka/1.0.11/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/planka/1.0.10/templates/library/base_v1_1_3/metadata.py b/trains/community/planka/1.0.11/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/planka/1.0.10/templates/library/base_v1_1_3/metadata.py rename to trains/community/planka/1.0.11/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/planka/1.0.10/templates/library/base_v1_1_3/network.py b/trains/community/planka/1.0.11/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/planka/1.0.10/templates/library/base_v1_1_3/network.py rename to trains/community/planka/1.0.11/templates/library/base_v1_1_4/network.py diff --git a/trains/community/planka/1.0.11/templates/library/base_v1_1_4/permissions.py b/trains/community/planka/1.0.11/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/community/planka/1.0.11/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/community/planka/1.0.10/templates/library/base_v1_1_3/ports.py b/trains/community/planka/1.0.11/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/planka/1.0.10/templates/library/base_v1_1_3/ports.py rename to trains/community/planka/1.0.11/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/planka/1.0.10/templates/library/base_v1_1_3/postgres.py b/trains/community/planka/1.0.11/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/planka/1.0.10/templates/library/base_v1_1_3/postgres.py rename to trains/community/planka/1.0.11/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/planka/1.0.10/templates/library/base_v1_1_3/redis.py b/trains/community/planka/1.0.11/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/planka/1.0.10/templates/library/base_v1_1_3/redis.py rename to trains/community/planka/1.0.11/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/planka/1.0.10/templates/library/base_v1_1_3/resources.py b/trains/community/planka/1.0.11/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/planka/1.0.10/templates/library/base_v1_1_3/resources.py rename to trains/community/planka/1.0.11/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/planka/1.0.10/templates/library/base_v1_1_3/security.py b/trains/community/planka/1.0.11/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/planka/1.0.10/templates/library/base_v1_1_3/security.py rename to trains/community/planka/1.0.11/templates/library/base_v1_1_4/security.py diff --git a/trains/community/planka/1.0.10/templates/library/base_v1_1_3/storage.py b/trains/community/planka/1.0.11/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/planka/1.0.10/templates/library/base_v1_1_3/storage.py rename to trains/community/planka/1.0.11/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/planka/1.0.10/templates/library/base_v1_1_3/utils.py b/trains/community/planka/1.0.11/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/planka/1.0.10/templates/library/base_v1_1_3/utils.py rename to trains/community/planka/1.0.11/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/planka/1.0.10/templates/test_values/basic-values.yaml b/trains/community/planka/1.0.11/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/planka/1.0.10/templates/test_values/basic-values.yaml rename to trains/community/planka/1.0.11/templates/test_values/basic-values.yaml diff --git a/trains/community/plex-auto-languages/1.0.15/templates/library/base_v1_1_3/healthchecks.py b/trains/community/plex-auto-languages/1.0.15/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/community/plex-auto-languages/1.0.15/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/plex-auto-languages/1.0.15/templates/library/base_v1_1_3/permissions.py b/trains/community/plex-auto-languages/1.0.15/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/community/plex-auto-languages/1.0.15/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/community/plex-auto-languages/1.0.15/README.md b/trains/community/plex-auto-languages/1.0.16/README.md similarity index 100% rename from trains/community/plex-auto-languages/1.0.15/README.md rename to trains/community/plex-auto-languages/1.0.16/README.md diff --git a/trains/community/plex-auto-languages/1.0.15/app.yaml b/trains/community/plex-auto-languages/1.0.16/app.yaml similarity index 86% rename from trains/community/plex-auto-languages/1.0.15/app.yaml rename to trains/community/plex-auto-languages/1.0.16/app.yaml index b4e6b5eb26..7410237226 100644 --- a/trains/community/plex-auto-languages/1.0.15/app.yaml +++ b/trains/community/plex-auto-languages/1.0.16/app.yaml @@ -9,8 +9,8 @@ icon: https://media.sys.truenas.net/apps/plex-auto-languages/icons/icon.svg keywords: - plex - languages -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -28,4 +28,4 @@ sources: - https://hub.docker.com/r/remirigal/plex-auto-languages title: Plex Auto Languages train: community -version: 1.0.15 +version: 1.0.16 diff --git a/trains/community/plex-auto-languages/1.0.15/ix_values.yaml b/trains/community/plex-auto-languages/1.0.16/ix_values.yaml similarity index 100% rename from trains/community/plex-auto-languages/1.0.15/ix_values.yaml rename to trains/community/plex-auto-languages/1.0.16/ix_values.yaml diff --git a/trains/community/plex-auto-languages/1.0.15/migrations/migrate_from_kubernetes b/trains/community/plex-auto-languages/1.0.16/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/plex-auto-languages/1.0.15/migrations/migrate_from_kubernetes rename to trains/community/plex-auto-languages/1.0.16/migrations/migrate_from_kubernetes diff --git a/trains/community/plex-auto-languages/1.0.15/migrations/migration_helpers/__init__.py b/trains/community/plex-auto-languages/1.0.16/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/plex-auto-languages/1.0.15/migrations/migration_helpers/__init__.py rename to trains/community/plex-auto-languages/1.0.16/migrations/migration_helpers/__init__.py diff --git a/trains/community/plex-auto-languages/1.0.15/migrations/migration_helpers/cpu.py b/trains/community/plex-auto-languages/1.0.16/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/plex-auto-languages/1.0.15/migrations/migration_helpers/cpu.py rename to trains/community/plex-auto-languages/1.0.16/migrations/migration_helpers/cpu.py diff --git a/trains/community/plex-auto-languages/1.0.15/migrations/migration_helpers/dns_config.py b/trains/community/plex-auto-languages/1.0.16/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/plex-auto-languages/1.0.15/migrations/migration_helpers/dns_config.py rename to trains/community/plex-auto-languages/1.0.16/migrations/migration_helpers/dns_config.py diff --git a/trains/community/plex-auto-languages/1.0.15/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/plex-auto-languages/1.0.16/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/plex-auto-languages/1.0.15/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/plex-auto-languages/1.0.16/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/plex-auto-languages/1.0.15/migrations/migration_helpers/memory.py b/trains/community/plex-auto-languages/1.0.16/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/plex-auto-languages/1.0.15/migrations/migration_helpers/memory.py rename to trains/community/plex-auto-languages/1.0.16/migrations/migration_helpers/memory.py diff --git a/trains/community/plex-auto-languages/1.0.15/migrations/migration_helpers/resources.py b/trains/community/plex-auto-languages/1.0.16/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/plex-auto-languages/1.0.15/migrations/migration_helpers/resources.py rename to trains/community/plex-auto-languages/1.0.16/migrations/migration_helpers/resources.py diff --git a/trains/community/plex-auto-languages/1.0.15/migrations/migration_helpers/storage.py b/trains/community/plex-auto-languages/1.0.16/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/plex-auto-languages/1.0.15/migrations/migration_helpers/storage.py rename to trains/community/plex-auto-languages/1.0.16/migrations/migration_helpers/storage.py diff --git a/trains/community/plex-auto-languages/1.0.15/questions.yaml b/trains/community/plex-auto-languages/1.0.16/questions.yaml similarity index 100% rename from trains/community/plex-auto-languages/1.0.15/questions.yaml rename to trains/community/plex-auto-languages/1.0.16/questions.yaml diff --git a/trains/community/plex-auto-languages/1.0.15/templates/docker-compose.yaml b/trains/community/plex-auto-languages/1.0.16/templates/docker-compose.yaml similarity index 100% rename from trains/community/plex-auto-languages/1.0.15/templates/docker-compose.yaml rename to trains/community/plex-auto-languages/1.0.16/templates/docker-compose.yaml diff --git a/trains/community/plex-auto-languages/1.0.15/templates/library/base_v1_1_3/__init__.py b/trains/community/plex-auto-languages/1.0.16/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/plex-auto-languages/1.0.15/templates/library/base_v1_1_3/__init__.py rename to trains/community/plex-auto-languages/1.0.16/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/plex-auto-languages/1.0.15/templates/library/base_v1_1_3/environment.py b/trains/community/plex-auto-languages/1.0.16/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/plex-auto-languages/1.0.15/templates/library/base_v1_1_3/environment.py rename to trains/community/plex-auto-languages/1.0.16/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/plex-auto-languages/1.0.16/templates/library/base_v1_1_4/healthchecks.py b/trains/community/plex-auto-languages/1.0.16/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/community/plex-auto-languages/1.0.16/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/plex-auto-languages/1.0.15/templates/library/base_v1_1_3/mariadb.py b/trains/community/plex-auto-languages/1.0.16/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/plex-auto-languages/1.0.15/templates/library/base_v1_1_3/mariadb.py rename to trains/community/plex-auto-languages/1.0.16/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/plex-auto-languages/1.0.15/templates/library/base_v1_1_3/metadata.py b/trains/community/plex-auto-languages/1.0.16/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/plex-auto-languages/1.0.15/templates/library/base_v1_1_3/metadata.py rename to trains/community/plex-auto-languages/1.0.16/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/plex-auto-languages/1.0.15/templates/library/base_v1_1_3/network.py b/trains/community/plex-auto-languages/1.0.16/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/plex-auto-languages/1.0.15/templates/library/base_v1_1_3/network.py rename to trains/community/plex-auto-languages/1.0.16/templates/library/base_v1_1_4/network.py diff --git a/trains/community/plex-auto-languages/1.0.16/templates/library/base_v1_1_4/permissions.py b/trains/community/plex-auto-languages/1.0.16/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/community/plex-auto-languages/1.0.16/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/community/plex-auto-languages/1.0.15/templates/library/base_v1_1_3/ports.py b/trains/community/plex-auto-languages/1.0.16/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/plex-auto-languages/1.0.15/templates/library/base_v1_1_3/ports.py rename to trains/community/plex-auto-languages/1.0.16/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/plex-auto-languages/1.0.15/templates/library/base_v1_1_3/postgres.py b/trains/community/plex-auto-languages/1.0.16/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/plex-auto-languages/1.0.15/templates/library/base_v1_1_3/postgres.py rename to trains/community/plex-auto-languages/1.0.16/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/plex-auto-languages/1.0.15/templates/library/base_v1_1_3/redis.py b/trains/community/plex-auto-languages/1.0.16/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/plex-auto-languages/1.0.15/templates/library/base_v1_1_3/redis.py rename to trains/community/plex-auto-languages/1.0.16/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/plex-auto-languages/1.0.15/templates/library/base_v1_1_3/resources.py b/trains/community/plex-auto-languages/1.0.16/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/plex-auto-languages/1.0.15/templates/library/base_v1_1_3/resources.py rename to trains/community/plex-auto-languages/1.0.16/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/plex-auto-languages/1.0.15/templates/library/base_v1_1_3/security.py b/trains/community/plex-auto-languages/1.0.16/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/plex-auto-languages/1.0.15/templates/library/base_v1_1_3/security.py rename to trains/community/plex-auto-languages/1.0.16/templates/library/base_v1_1_4/security.py diff --git a/trains/community/plex-auto-languages/1.0.15/templates/library/base_v1_1_3/storage.py b/trains/community/plex-auto-languages/1.0.16/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/plex-auto-languages/1.0.15/templates/library/base_v1_1_3/storage.py rename to trains/community/plex-auto-languages/1.0.16/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/plex-auto-languages/1.0.15/templates/library/base_v1_1_3/utils.py b/trains/community/plex-auto-languages/1.0.16/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/plex-auto-languages/1.0.15/templates/library/base_v1_1_3/utils.py rename to trains/community/plex-auto-languages/1.0.16/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/plex-auto-languages/1.0.15/templates/test_values/basic-values.yaml b/trains/community/plex-auto-languages/1.0.16/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/plex-auto-languages/1.0.15/templates/test_values/basic-values.yaml rename to trains/community/plex-auto-languages/1.0.16/templates/test_values/basic-values.yaml diff --git a/trains/community/portainer/1.2.13/templates/library/base_v1_1_3/healthchecks.py b/trains/community/portainer/1.2.13/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/community/portainer/1.2.13/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/portainer/1.2.13/templates/library/base_v1_1_3/permissions.py b/trains/community/portainer/1.2.13/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/community/portainer/1.2.13/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/community/portainer/1.2.13/README.md b/trains/community/portainer/1.2.14/README.md similarity index 100% rename from trains/community/portainer/1.2.13/README.md rename to trains/community/portainer/1.2.14/README.md diff --git a/trains/community/portainer/1.2.13/app.yaml b/trains/community/portainer/1.2.14/app.yaml similarity index 92% rename from trains/community/portainer/1.2.13/app.yaml rename to trains/community/portainer/1.2.14/app.yaml index a86cc6b90e..54e33aebc1 100644 --- a/trains/community/portainer/1.2.13/app.yaml +++ b/trains/community/portainer/1.2.14/app.yaml @@ -28,8 +28,8 @@ keywords: - docker - compose - container -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -49,4 +49,4 @@ sources: - https://github.com/portainer/portainer title: Portainer train: community -version: 1.2.13 +version: 1.2.14 diff --git a/trains/community/portainer/1.2.13/ix_values.yaml b/trains/community/portainer/1.2.14/ix_values.yaml similarity index 100% rename from trains/community/portainer/1.2.13/ix_values.yaml rename to trains/community/portainer/1.2.14/ix_values.yaml diff --git a/trains/community/portainer/1.2.13/migrations/migration_helpers/__init__.py b/trains/community/portainer/1.2.14/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/portainer/1.2.13/migrations/migration_helpers/__init__.py rename to trains/community/portainer/1.2.14/migrations/migration_helpers/__init__.py diff --git a/trains/community/portainer/1.2.13/migrations/migration_helpers/cpu.py b/trains/community/portainer/1.2.14/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/portainer/1.2.13/migrations/migration_helpers/cpu.py rename to trains/community/portainer/1.2.14/migrations/migration_helpers/cpu.py diff --git a/trains/community/portainer/1.2.13/migrations/migration_helpers/dns_config.py b/trains/community/portainer/1.2.14/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/portainer/1.2.13/migrations/migration_helpers/dns_config.py rename to trains/community/portainer/1.2.14/migrations/migration_helpers/dns_config.py diff --git a/trains/community/portainer/1.2.13/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/portainer/1.2.14/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/portainer/1.2.13/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/portainer/1.2.14/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/portainer/1.2.13/migrations/migration_helpers/memory.py b/trains/community/portainer/1.2.14/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/portainer/1.2.13/migrations/migration_helpers/memory.py rename to trains/community/portainer/1.2.14/migrations/migration_helpers/memory.py diff --git a/trains/community/portainer/1.2.13/migrations/migration_helpers/resources.py b/trains/community/portainer/1.2.14/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/portainer/1.2.13/migrations/migration_helpers/resources.py rename to trains/community/portainer/1.2.14/migrations/migration_helpers/resources.py diff --git a/trains/community/portainer/1.2.13/migrations/migration_helpers/storage.py b/trains/community/portainer/1.2.14/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/portainer/1.2.13/migrations/migration_helpers/storage.py rename to trains/community/portainer/1.2.14/migrations/migration_helpers/storage.py diff --git a/trains/community/portainer/1.2.13/questions.yaml b/trains/community/portainer/1.2.14/questions.yaml similarity index 100% rename from trains/community/portainer/1.2.13/questions.yaml rename to trains/community/portainer/1.2.14/questions.yaml diff --git a/trains/community/portainer/1.2.13/templates/docker-compose.yaml b/trains/community/portainer/1.2.14/templates/docker-compose.yaml similarity index 100% rename from trains/community/portainer/1.2.13/templates/docker-compose.yaml rename to trains/community/portainer/1.2.14/templates/docker-compose.yaml diff --git a/trains/community/portainer/1.2.13/templates/library/base_v1_1_3/__init__.py b/trains/community/portainer/1.2.14/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/portainer/1.2.13/templates/library/base_v1_1_3/__init__.py rename to trains/community/portainer/1.2.14/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/portainer/1.2.13/templates/library/base_v1_1_3/environment.py b/trains/community/portainer/1.2.14/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/portainer/1.2.13/templates/library/base_v1_1_3/environment.py rename to trains/community/portainer/1.2.14/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/portainer/1.2.14/templates/library/base_v1_1_4/healthchecks.py b/trains/community/portainer/1.2.14/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/community/portainer/1.2.14/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/portainer/1.2.13/templates/library/base_v1_1_3/mariadb.py b/trains/community/portainer/1.2.14/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/portainer/1.2.13/templates/library/base_v1_1_3/mariadb.py rename to trains/community/portainer/1.2.14/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/portainer/1.2.13/templates/library/base_v1_1_3/metadata.py b/trains/community/portainer/1.2.14/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/portainer/1.2.13/templates/library/base_v1_1_3/metadata.py rename to trains/community/portainer/1.2.14/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/portainer/1.2.13/templates/library/base_v1_1_3/network.py b/trains/community/portainer/1.2.14/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/portainer/1.2.13/templates/library/base_v1_1_3/network.py rename to trains/community/portainer/1.2.14/templates/library/base_v1_1_4/network.py diff --git a/trains/community/portainer/1.2.14/templates/library/base_v1_1_4/permissions.py b/trains/community/portainer/1.2.14/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/community/portainer/1.2.14/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/community/portainer/1.2.13/templates/library/base_v1_1_3/ports.py b/trains/community/portainer/1.2.14/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/portainer/1.2.13/templates/library/base_v1_1_3/ports.py rename to trains/community/portainer/1.2.14/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/portainer/1.2.13/templates/library/base_v1_1_3/postgres.py b/trains/community/portainer/1.2.14/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/portainer/1.2.13/templates/library/base_v1_1_3/postgres.py rename to trains/community/portainer/1.2.14/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/portainer/1.2.13/templates/library/base_v1_1_3/redis.py b/trains/community/portainer/1.2.14/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/portainer/1.2.13/templates/library/base_v1_1_3/redis.py rename to trains/community/portainer/1.2.14/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/portainer/1.2.13/templates/library/base_v1_1_3/resources.py b/trains/community/portainer/1.2.14/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/portainer/1.2.13/templates/library/base_v1_1_3/resources.py rename to trains/community/portainer/1.2.14/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/portainer/1.2.13/templates/library/base_v1_1_3/security.py b/trains/community/portainer/1.2.14/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/portainer/1.2.13/templates/library/base_v1_1_3/security.py rename to trains/community/portainer/1.2.14/templates/library/base_v1_1_4/security.py diff --git a/trains/community/portainer/1.2.13/templates/library/base_v1_1_3/storage.py b/trains/community/portainer/1.2.14/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/portainer/1.2.13/templates/library/base_v1_1_3/storage.py rename to trains/community/portainer/1.2.14/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/portainer/1.2.13/templates/library/base_v1_1_3/utils.py b/trains/community/portainer/1.2.14/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/portainer/1.2.13/templates/library/base_v1_1_3/utils.py rename to trains/community/portainer/1.2.14/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/portainer/1.2.13/templates/test_values/basic-values.yaml b/trains/community/portainer/1.2.14/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/portainer/1.2.13/templates/test_values/basic-values.yaml rename to trains/community/portainer/1.2.14/templates/test_values/basic-values.yaml diff --git a/trains/community/portainer/1.2.13/templates/test_values/https-values.yaml b/trains/community/portainer/1.2.14/templates/test_values/https-values.yaml similarity index 100% rename from trains/community/portainer/1.2.13/templates/test_values/https-values.yaml rename to trains/community/portainer/1.2.14/templates/test_values/https-values.yaml diff --git a/trains/community/prowlarr/1.2.12/templates/library/base_v1_1_3/healthchecks.py b/trains/community/prowlarr/1.2.12/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/community/prowlarr/1.2.12/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/prowlarr/1.2.12/templates/library/base_v1_1_3/permissions.py b/trains/community/prowlarr/1.2.12/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/community/prowlarr/1.2.12/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/community/prowlarr/1.2.12/README.md b/trains/community/prowlarr/1.2.13/README.md similarity index 100% rename from trains/community/prowlarr/1.2.12/README.md rename to trains/community/prowlarr/1.2.13/README.md diff --git a/trains/community/prowlarr/1.2.12/app.yaml b/trains/community/prowlarr/1.2.13/app.yaml similarity index 86% rename from trains/community/prowlarr/1.2.12/app.yaml rename to trains/community/prowlarr/1.2.13/app.yaml index 98ca504136..f9ed28e38b 100644 --- a/trains/community/prowlarr/1.2.12/app.yaml +++ b/trains/community/prowlarr/1.2.13/app.yaml @@ -9,8 +9,8 @@ host_mounts: [] icon: https://media.sys.truenas.net/apps/prowlarr/icons/icon.png keywords: - indexer -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -29,4 +29,4 @@ sources: - https://prowlarr.com title: Prowlarr train: community -version: 1.2.12 +version: 1.2.13 diff --git a/trains/community/prowlarr/1.2.12/ix_values.yaml b/trains/community/prowlarr/1.2.13/ix_values.yaml similarity index 100% rename from trains/community/prowlarr/1.2.12/ix_values.yaml rename to trains/community/prowlarr/1.2.13/ix_values.yaml diff --git a/trains/community/prowlarr/1.2.12/migrations/migrate_from_kubernetes b/trains/community/prowlarr/1.2.13/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/prowlarr/1.2.12/migrations/migrate_from_kubernetes rename to trains/community/prowlarr/1.2.13/migrations/migrate_from_kubernetes diff --git a/trains/community/prowlarr/1.2.12/migrations/migration_helpers/__init__.py b/trains/community/prowlarr/1.2.13/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/prowlarr/1.2.12/migrations/migration_helpers/__init__.py rename to trains/community/prowlarr/1.2.13/migrations/migration_helpers/__init__.py diff --git a/trains/community/prowlarr/1.2.12/migrations/migration_helpers/cpu.py b/trains/community/prowlarr/1.2.13/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/prowlarr/1.2.12/migrations/migration_helpers/cpu.py rename to trains/community/prowlarr/1.2.13/migrations/migration_helpers/cpu.py diff --git a/trains/community/prowlarr/1.2.12/migrations/migration_helpers/dns_config.py b/trains/community/prowlarr/1.2.13/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/prowlarr/1.2.12/migrations/migration_helpers/dns_config.py rename to trains/community/prowlarr/1.2.13/migrations/migration_helpers/dns_config.py diff --git a/trains/community/prowlarr/1.2.12/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/prowlarr/1.2.13/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/prowlarr/1.2.12/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/prowlarr/1.2.13/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/prowlarr/1.2.12/migrations/migration_helpers/memory.py b/trains/community/prowlarr/1.2.13/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/prowlarr/1.2.12/migrations/migration_helpers/memory.py rename to trains/community/prowlarr/1.2.13/migrations/migration_helpers/memory.py diff --git a/trains/community/prowlarr/1.2.12/migrations/migration_helpers/resources.py b/trains/community/prowlarr/1.2.13/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/prowlarr/1.2.12/migrations/migration_helpers/resources.py rename to trains/community/prowlarr/1.2.13/migrations/migration_helpers/resources.py diff --git a/trains/community/prowlarr/1.2.12/migrations/migration_helpers/storage.py b/trains/community/prowlarr/1.2.13/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/prowlarr/1.2.12/migrations/migration_helpers/storage.py rename to trains/community/prowlarr/1.2.13/migrations/migration_helpers/storage.py diff --git a/trains/community/prowlarr/1.2.12/questions.yaml b/trains/community/prowlarr/1.2.13/questions.yaml similarity index 100% rename from trains/community/prowlarr/1.2.12/questions.yaml rename to trains/community/prowlarr/1.2.13/questions.yaml diff --git a/trains/community/prowlarr/1.2.12/templates/docker-compose.yaml b/trains/community/prowlarr/1.2.13/templates/docker-compose.yaml similarity index 100% rename from trains/community/prowlarr/1.2.12/templates/docker-compose.yaml rename to trains/community/prowlarr/1.2.13/templates/docker-compose.yaml diff --git a/trains/community/prowlarr/1.2.12/templates/library/base_v1_1_3/__init__.py b/trains/community/prowlarr/1.2.13/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/prowlarr/1.2.12/templates/library/base_v1_1_3/__init__.py rename to trains/community/prowlarr/1.2.13/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/prowlarr/1.2.12/templates/library/base_v1_1_3/environment.py b/trains/community/prowlarr/1.2.13/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/prowlarr/1.2.12/templates/library/base_v1_1_3/environment.py rename to trains/community/prowlarr/1.2.13/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/prowlarr/1.2.13/templates/library/base_v1_1_4/healthchecks.py b/trains/community/prowlarr/1.2.13/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/community/prowlarr/1.2.13/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/prowlarr/1.2.12/templates/library/base_v1_1_3/mariadb.py b/trains/community/prowlarr/1.2.13/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/prowlarr/1.2.12/templates/library/base_v1_1_3/mariadb.py rename to trains/community/prowlarr/1.2.13/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/prowlarr/1.2.12/templates/library/base_v1_1_3/metadata.py b/trains/community/prowlarr/1.2.13/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/prowlarr/1.2.12/templates/library/base_v1_1_3/metadata.py rename to trains/community/prowlarr/1.2.13/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/prowlarr/1.2.12/templates/library/base_v1_1_3/network.py b/trains/community/prowlarr/1.2.13/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/prowlarr/1.2.12/templates/library/base_v1_1_3/network.py rename to trains/community/prowlarr/1.2.13/templates/library/base_v1_1_4/network.py diff --git a/trains/community/prowlarr/1.2.13/templates/library/base_v1_1_4/permissions.py b/trains/community/prowlarr/1.2.13/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/community/prowlarr/1.2.13/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/community/prowlarr/1.2.12/templates/library/base_v1_1_3/ports.py b/trains/community/prowlarr/1.2.13/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/prowlarr/1.2.12/templates/library/base_v1_1_3/ports.py rename to trains/community/prowlarr/1.2.13/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/prowlarr/1.2.12/templates/library/base_v1_1_3/postgres.py b/trains/community/prowlarr/1.2.13/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/prowlarr/1.2.12/templates/library/base_v1_1_3/postgres.py rename to trains/community/prowlarr/1.2.13/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/prowlarr/1.2.12/templates/library/base_v1_1_3/redis.py b/trains/community/prowlarr/1.2.13/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/prowlarr/1.2.12/templates/library/base_v1_1_3/redis.py rename to trains/community/prowlarr/1.2.13/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/prowlarr/1.2.12/templates/library/base_v1_1_3/resources.py b/trains/community/prowlarr/1.2.13/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/prowlarr/1.2.12/templates/library/base_v1_1_3/resources.py rename to trains/community/prowlarr/1.2.13/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/prowlarr/1.2.12/templates/library/base_v1_1_3/security.py b/trains/community/prowlarr/1.2.13/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/prowlarr/1.2.12/templates/library/base_v1_1_3/security.py rename to trains/community/prowlarr/1.2.13/templates/library/base_v1_1_4/security.py diff --git a/trains/community/prowlarr/1.2.12/templates/library/base_v1_1_3/storage.py b/trains/community/prowlarr/1.2.13/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/prowlarr/1.2.12/templates/library/base_v1_1_3/storage.py rename to trains/community/prowlarr/1.2.13/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/prowlarr/1.2.12/templates/library/base_v1_1_3/utils.py b/trains/community/prowlarr/1.2.13/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/prowlarr/1.2.12/templates/library/base_v1_1_3/utils.py rename to trains/community/prowlarr/1.2.13/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/prowlarr/1.2.12/templates/test_values/basic-values.yaml b/trains/community/prowlarr/1.2.13/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/prowlarr/1.2.12/templates/test_values/basic-values.yaml rename to trains/community/prowlarr/1.2.13/templates/test_values/basic-values.yaml diff --git a/trains/community/qbittorrent/1.0.27/templates/library/base_v1_1_3/healthchecks.py b/trains/community/qbittorrent/1.0.27/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/community/qbittorrent/1.0.27/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/qbittorrent/1.0.27/templates/library/base_v1_1_3/permissions.py b/trains/community/qbittorrent/1.0.27/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/community/qbittorrent/1.0.27/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/community/qbittorrent/1.0.27/README.md b/trains/community/qbittorrent/1.0.28/README.md similarity index 100% rename from trains/community/qbittorrent/1.0.27/README.md rename to trains/community/qbittorrent/1.0.28/README.md diff --git a/trains/community/qbittorrent/1.0.27/app.yaml b/trains/community/qbittorrent/1.0.28/app.yaml similarity index 87% rename from trains/community/qbittorrent/1.0.27/app.yaml rename to trains/community/qbittorrent/1.0.28/app.yaml index fdac7a6860..adc1ccdc69 100644 --- a/trains/community/qbittorrent/1.0.27/app.yaml +++ b/trains/community/qbittorrent/1.0.28/app.yaml @@ -11,8 +11,8 @@ keywords: - media - torrent - download -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -31,4 +31,4 @@ sources: - https://www.qbittorrent.org/ title: qBittorrent train: community -version: 1.0.27 +version: 1.0.28 diff --git a/trains/community/qbittorrent/1.0.27/ix_values.yaml b/trains/community/qbittorrent/1.0.28/ix_values.yaml similarity index 100% rename from trains/community/qbittorrent/1.0.27/ix_values.yaml rename to trains/community/qbittorrent/1.0.28/ix_values.yaml diff --git a/trains/community/qbittorrent/1.0.27/migrations/migrate_from_kubernetes b/trains/community/qbittorrent/1.0.28/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/qbittorrent/1.0.27/migrations/migrate_from_kubernetes rename to trains/community/qbittorrent/1.0.28/migrations/migrate_from_kubernetes diff --git a/trains/community/qbittorrent/1.0.27/migrations/migration_helpers/__init__.py b/trains/community/qbittorrent/1.0.28/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/qbittorrent/1.0.27/migrations/migration_helpers/__init__.py rename to trains/community/qbittorrent/1.0.28/migrations/migration_helpers/__init__.py diff --git a/trains/community/qbittorrent/1.0.27/migrations/migration_helpers/cpu.py b/trains/community/qbittorrent/1.0.28/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/qbittorrent/1.0.27/migrations/migration_helpers/cpu.py rename to trains/community/qbittorrent/1.0.28/migrations/migration_helpers/cpu.py diff --git a/trains/community/qbittorrent/1.0.27/migrations/migration_helpers/dns_config.py b/trains/community/qbittorrent/1.0.28/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/qbittorrent/1.0.27/migrations/migration_helpers/dns_config.py rename to trains/community/qbittorrent/1.0.28/migrations/migration_helpers/dns_config.py diff --git a/trains/community/qbittorrent/1.0.27/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/qbittorrent/1.0.28/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/qbittorrent/1.0.27/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/qbittorrent/1.0.28/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/qbittorrent/1.0.27/migrations/migration_helpers/memory.py b/trains/community/qbittorrent/1.0.28/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/qbittorrent/1.0.27/migrations/migration_helpers/memory.py rename to trains/community/qbittorrent/1.0.28/migrations/migration_helpers/memory.py diff --git a/trains/community/qbittorrent/1.0.27/migrations/migration_helpers/resources.py b/trains/community/qbittorrent/1.0.28/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/qbittorrent/1.0.27/migrations/migration_helpers/resources.py rename to trains/community/qbittorrent/1.0.28/migrations/migration_helpers/resources.py diff --git a/trains/community/qbittorrent/1.0.27/migrations/migration_helpers/storage.py b/trains/community/qbittorrent/1.0.28/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/qbittorrent/1.0.27/migrations/migration_helpers/storage.py rename to trains/community/qbittorrent/1.0.28/migrations/migration_helpers/storage.py diff --git a/trains/community/qbittorrent/1.0.27/questions.yaml b/trains/community/qbittorrent/1.0.28/questions.yaml similarity index 100% rename from trains/community/qbittorrent/1.0.27/questions.yaml rename to trains/community/qbittorrent/1.0.28/questions.yaml diff --git a/trains/community/qbittorrent/1.0.27/templates/docker-compose.yaml b/trains/community/qbittorrent/1.0.28/templates/docker-compose.yaml similarity index 100% rename from trains/community/qbittorrent/1.0.27/templates/docker-compose.yaml rename to trains/community/qbittorrent/1.0.28/templates/docker-compose.yaml diff --git a/trains/community/qbittorrent/1.0.27/templates/library/base_v1_1_3/__init__.py b/trains/community/qbittorrent/1.0.28/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/qbittorrent/1.0.27/templates/library/base_v1_1_3/__init__.py rename to trains/community/qbittorrent/1.0.28/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/qbittorrent/1.0.27/templates/library/base_v1_1_3/environment.py b/trains/community/qbittorrent/1.0.28/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/qbittorrent/1.0.27/templates/library/base_v1_1_3/environment.py rename to trains/community/qbittorrent/1.0.28/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/qbittorrent/1.0.28/templates/library/base_v1_1_4/healthchecks.py b/trains/community/qbittorrent/1.0.28/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/community/qbittorrent/1.0.28/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/qbittorrent/1.0.27/templates/library/base_v1_1_3/mariadb.py b/trains/community/qbittorrent/1.0.28/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/qbittorrent/1.0.27/templates/library/base_v1_1_3/mariadb.py rename to trains/community/qbittorrent/1.0.28/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/qbittorrent/1.0.27/templates/library/base_v1_1_3/metadata.py b/trains/community/qbittorrent/1.0.28/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/qbittorrent/1.0.27/templates/library/base_v1_1_3/metadata.py rename to trains/community/qbittorrent/1.0.28/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/qbittorrent/1.0.27/templates/library/base_v1_1_3/network.py b/trains/community/qbittorrent/1.0.28/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/qbittorrent/1.0.27/templates/library/base_v1_1_3/network.py rename to trains/community/qbittorrent/1.0.28/templates/library/base_v1_1_4/network.py diff --git a/trains/community/qbittorrent/1.0.28/templates/library/base_v1_1_4/permissions.py b/trains/community/qbittorrent/1.0.28/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/community/qbittorrent/1.0.28/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/community/qbittorrent/1.0.27/templates/library/base_v1_1_3/ports.py b/trains/community/qbittorrent/1.0.28/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/qbittorrent/1.0.27/templates/library/base_v1_1_3/ports.py rename to trains/community/qbittorrent/1.0.28/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/qbittorrent/1.0.27/templates/library/base_v1_1_3/postgres.py b/trains/community/qbittorrent/1.0.28/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/qbittorrent/1.0.27/templates/library/base_v1_1_3/postgres.py rename to trains/community/qbittorrent/1.0.28/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/qbittorrent/1.0.27/templates/library/base_v1_1_3/redis.py b/trains/community/qbittorrent/1.0.28/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/qbittorrent/1.0.27/templates/library/base_v1_1_3/redis.py rename to trains/community/qbittorrent/1.0.28/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/qbittorrent/1.0.27/templates/library/base_v1_1_3/resources.py b/trains/community/qbittorrent/1.0.28/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/qbittorrent/1.0.27/templates/library/base_v1_1_3/resources.py rename to trains/community/qbittorrent/1.0.28/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/qbittorrent/1.0.27/templates/library/base_v1_1_3/security.py b/trains/community/qbittorrent/1.0.28/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/qbittorrent/1.0.27/templates/library/base_v1_1_3/security.py rename to trains/community/qbittorrent/1.0.28/templates/library/base_v1_1_4/security.py diff --git a/trains/community/qbittorrent/1.0.27/templates/library/base_v1_1_3/storage.py b/trains/community/qbittorrent/1.0.28/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/qbittorrent/1.0.27/templates/library/base_v1_1_3/storage.py rename to trains/community/qbittorrent/1.0.28/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/qbittorrent/1.0.27/templates/library/base_v1_1_3/utils.py b/trains/community/qbittorrent/1.0.28/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/qbittorrent/1.0.27/templates/library/base_v1_1_3/utils.py rename to trains/community/qbittorrent/1.0.28/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/qbittorrent/1.0.27/templates/test_values/basic-values.yaml b/trains/community/qbittorrent/1.0.28/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/qbittorrent/1.0.27/templates/test_values/basic-values.yaml rename to trains/community/qbittorrent/1.0.28/templates/test_values/basic-values.yaml diff --git a/trains/community/radarr/1.1.11/templates/library/base_v1_1_3/healthchecks.py b/trains/community/radarr/1.1.11/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/community/radarr/1.1.11/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/radarr/1.1.11/templates/library/base_v1_1_3/permissions.py b/trains/community/radarr/1.1.11/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/community/radarr/1.1.11/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/community/radarr/1.1.11/README.md b/trains/community/radarr/1.1.12/README.md similarity index 100% rename from trains/community/radarr/1.1.11/README.md rename to trains/community/radarr/1.1.12/README.md diff --git a/trains/community/radarr/1.1.11/app.yaml b/trains/community/radarr/1.1.12/app.yaml similarity index 89% rename from trains/community/radarr/1.1.11/app.yaml rename to trains/community/radarr/1.1.12/app.yaml index 20b1d017f2..2b20465546 100644 --- a/trains/community/radarr/1.1.11/app.yaml +++ b/trains/community/radarr/1.1.12/app.yaml @@ -9,8 +9,8 @@ icon: https://media.sys.truenas.net/apps/radarr/icons/icon.png keywords: - media - movies -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -32,4 +32,4 @@ sources: - https://github.com/Radarr/Radarr title: Radarr train: community -version: 1.1.11 +version: 1.1.12 diff --git a/trains/community/radarr/1.1.11/ix_values.yaml b/trains/community/radarr/1.1.12/ix_values.yaml similarity index 100% rename from trains/community/radarr/1.1.11/ix_values.yaml rename to trains/community/radarr/1.1.12/ix_values.yaml diff --git a/trains/community/radarr/1.1.11/migrations/migrate_from_kubernetes b/trains/community/radarr/1.1.12/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/radarr/1.1.11/migrations/migrate_from_kubernetes rename to trains/community/radarr/1.1.12/migrations/migrate_from_kubernetes diff --git a/trains/community/radarr/1.1.11/migrations/migration_helpers/__init__.py b/trains/community/radarr/1.1.12/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/radarr/1.1.11/migrations/migration_helpers/__init__.py rename to trains/community/radarr/1.1.12/migrations/migration_helpers/__init__.py diff --git a/trains/community/radarr/1.1.11/migrations/migration_helpers/cpu.py b/trains/community/radarr/1.1.12/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/radarr/1.1.11/migrations/migration_helpers/cpu.py rename to trains/community/radarr/1.1.12/migrations/migration_helpers/cpu.py diff --git a/trains/community/radarr/1.1.11/migrations/migration_helpers/dns_config.py b/trains/community/radarr/1.1.12/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/radarr/1.1.11/migrations/migration_helpers/dns_config.py rename to trains/community/radarr/1.1.12/migrations/migration_helpers/dns_config.py diff --git a/trains/community/radarr/1.1.11/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/radarr/1.1.12/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/radarr/1.1.11/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/radarr/1.1.12/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/radarr/1.1.11/migrations/migration_helpers/memory.py b/trains/community/radarr/1.1.12/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/radarr/1.1.11/migrations/migration_helpers/memory.py rename to trains/community/radarr/1.1.12/migrations/migration_helpers/memory.py diff --git a/trains/community/radarr/1.1.11/migrations/migration_helpers/resources.py b/trains/community/radarr/1.1.12/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/radarr/1.1.11/migrations/migration_helpers/resources.py rename to trains/community/radarr/1.1.12/migrations/migration_helpers/resources.py diff --git a/trains/community/radarr/1.1.11/migrations/migration_helpers/storage.py b/trains/community/radarr/1.1.12/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/radarr/1.1.11/migrations/migration_helpers/storage.py rename to trains/community/radarr/1.1.12/migrations/migration_helpers/storage.py diff --git a/trains/community/radarr/1.1.11/questions.yaml b/trains/community/radarr/1.1.12/questions.yaml similarity index 100% rename from trains/community/radarr/1.1.11/questions.yaml rename to trains/community/radarr/1.1.12/questions.yaml diff --git a/trains/community/radarr/1.1.11/templates/docker-compose.yaml b/trains/community/radarr/1.1.12/templates/docker-compose.yaml similarity index 100% rename from trains/community/radarr/1.1.11/templates/docker-compose.yaml rename to trains/community/radarr/1.1.12/templates/docker-compose.yaml diff --git a/trains/community/radarr/1.1.11/templates/library/base_v1_1_3/__init__.py b/trains/community/radarr/1.1.12/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/radarr/1.1.11/templates/library/base_v1_1_3/__init__.py rename to trains/community/radarr/1.1.12/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/radarr/1.1.11/templates/library/base_v1_1_3/environment.py b/trains/community/radarr/1.1.12/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/radarr/1.1.11/templates/library/base_v1_1_3/environment.py rename to trains/community/radarr/1.1.12/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/radarr/1.1.12/templates/library/base_v1_1_4/healthchecks.py b/trains/community/radarr/1.1.12/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/community/radarr/1.1.12/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/radarr/1.1.11/templates/library/base_v1_1_3/mariadb.py b/trains/community/radarr/1.1.12/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/radarr/1.1.11/templates/library/base_v1_1_3/mariadb.py rename to trains/community/radarr/1.1.12/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/radarr/1.1.11/templates/library/base_v1_1_3/metadata.py b/trains/community/radarr/1.1.12/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/radarr/1.1.11/templates/library/base_v1_1_3/metadata.py rename to trains/community/radarr/1.1.12/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/radarr/1.1.11/templates/library/base_v1_1_3/network.py b/trains/community/radarr/1.1.12/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/radarr/1.1.11/templates/library/base_v1_1_3/network.py rename to trains/community/radarr/1.1.12/templates/library/base_v1_1_4/network.py diff --git a/trains/community/radarr/1.1.12/templates/library/base_v1_1_4/permissions.py b/trains/community/radarr/1.1.12/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/community/radarr/1.1.12/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/community/radarr/1.1.11/templates/library/base_v1_1_3/ports.py b/trains/community/radarr/1.1.12/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/radarr/1.1.11/templates/library/base_v1_1_3/ports.py rename to trains/community/radarr/1.1.12/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/radarr/1.1.11/templates/library/base_v1_1_3/postgres.py b/trains/community/radarr/1.1.12/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/radarr/1.1.11/templates/library/base_v1_1_3/postgres.py rename to trains/community/radarr/1.1.12/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/radarr/1.1.11/templates/library/base_v1_1_3/redis.py b/trains/community/radarr/1.1.12/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/radarr/1.1.11/templates/library/base_v1_1_3/redis.py rename to trains/community/radarr/1.1.12/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/radarr/1.1.11/templates/library/base_v1_1_3/resources.py b/trains/community/radarr/1.1.12/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/radarr/1.1.11/templates/library/base_v1_1_3/resources.py rename to trains/community/radarr/1.1.12/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/radarr/1.1.11/templates/library/base_v1_1_3/security.py b/trains/community/radarr/1.1.12/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/radarr/1.1.11/templates/library/base_v1_1_3/security.py rename to trains/community/radarr/1.1.12/templates/library/base_v1_1_4/security.py diff --git a/trains/community/radarr/1.1.11/templates/library/base_v1_1_3/storage.py b/trains/community/radarr/1.1.12/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/radarr/1.1.11/templates/library/base_v1_1_3/storage.py rename to trains/community/radarr/1.1.12/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/radarr/1.1.11/templates/library/base_v1_1_3/utils.py b/trains/community/radarr/1.1.12/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/radarr/1.1.11/templates/library/base_v1_1_3/utils.py rename to trains/community/radarr/1.1.12/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/radarr/1.1.11/templates/test_values/basic-values.yaml b/trains/community/radarr/1.1.12/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/radarr/1.1.11/templates/test_values/basic-values.yaml rename to trains/community/radarr/1.1.12/templates/test_values/basic-values.yaml diff --git a/trains/community/readarr/1.0.18/templates/library/base_v1_1_3/healthchecks.py b/trains/community/readarr/1.0.18/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/community/readarr/1.0.18/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/readarr/1.0.18/templates/library/base_v1_1_3/permissions.py b/trains/community/readarr/1.0.18/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/community/readarr/1.0.18/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/community/readarr/1.0.18/README.md b/trains/community/readarr/1.0.19/README.md similarity index 100% rename from trains/community/readarr/1.0.18/README.md rename to trains/community/readarr/1.0.19/README.md diff --git a/trains/community/readarr/1.0.18/app.yaml b/trains/community/readarr/1.0.19/app.yaml similarity index 88% rename from trains/community/readarr/1.0.18/app.yaml rename to trains/community/readarr/1.0.19/app.yaml index b0032c353a..dda961b817 100644 --- a/trains/community/readarr/1.0.18/app.yaml +++ b/trains/community/readarr/1.0.19/app.yaml @@ -11,8 +11,8 @@ keywords: - media - ebook - audiobook -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -33,4 +33,4 @@ sources: - https://github.com/Readarr/Readarr title: Readarr train: community -version: 1.0.18 +version: 1.0.19 diff --git a/trains/community/readarr/1.0.18/ix_values.yaml b/trains/community/readarr/1.0.19/ix_values.yaml similarity index 100% rename from trains/community/readarr/1.0.18/ix_values.yaml rename to trains/community/readarr/1.0.19/ix_values.yaml diff --git a/trains/community/readarr/1.0.18/migrations/migrate_from_kubernetes b/trains/community/readarr/1.0.19/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/readarr/1.0.18/migrations/migrate_from_kubernetes rename to trains/community/readarr/1.0.19/migrations/migrate_from_kubernetes diff --git a/trains/community/readarr/1.0.18/migrations/migration_helpers/__init__.py b/trains/community/readarr/1.0.19/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/readarr/1.0.18/migrations/migration_helpers/__init__.py rename to trains/community/readarr/1.0.19/migrations/migration_helpers/__init__.py diff --git a/trains/community/readarr/1.0.18/migrations/migration_helpers/cpu.py b/trains/community/readarr/1.0.19/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/readarr/1.0.18/migrations/migration_helpers/cpu.py rename to trains/community/readarr/1.0.19/migrations/migration_helpers/cpu.py diff --git a/trains/community/readarr/1.0.18/migrations/migration_helpers/dns_config.py b/trains/community/readarr/1.0.19/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/readarr/1.0.18/migrations/migration_helpers/dns_config.py rename to trains/community/readarr/1.0.19/migrations/migration_helpers/dns_config.py diff --git a/trains/community/readarr/1.0.18/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/readarr/1.0.19/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/readarr/1.0.18/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/readarr/1.0.19/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/readarr/1.0.18/migrations/migration_helpers/memory.py b/trains/community/readarr/1.0.19/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/readarr/1.0.18/migrations/migration_helpers/memory.py rename to trains/community/readarr/1.0.19/migrations/migration_helpers/memory.py diff --git a/trains/community/readarr/1.0.18/migrations/migration_helpers/resources.py b/trains/community/readarr/1.0.19/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/readarr/1.0.18/migrations/migration_helpers/resources.py rename to trains/community/readarr/1.0.19/migrations/migration_helpers/resources.py diff --git a/trains/community/readarr/1.0.18/migrations/migration_helpers/storage.py b/trains/community/readarr/1.0.19/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/readarr/1.0.18/migrations/migration_helpers/storage.py rename to trains/community/readarr/1.0.19/migrations/migration_helpers/storage.py diff --git a/trains/community/readarr/1.0.18/questions.yaml b/trains/community/readarr/1.0.19/questions.yaml similarity index 100% rename from trains/community/readarr/1.0.18/questions.yaml rename to trains/community/readarr/1.0.19/questions.yaml diff --git a/trains/community/readarr/1.0.18/templates/docker-compose.yaml b/trains/community/readarr/1.0.19/templates/docker-compose.yaml similarity index 100% rename from trains/community/readarr/1.0.18/templates/docker-compose.yaml rename to trains/community/readarr/1.0.19/templates/docker-compose.yaml diff --git a/trains/community/readarr/1.0.18/templates/library/base_v1_1_3/__init__.py b/trains/community/readarr/1.0.19/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/readarr/1.0.18/templates/library/base_v1_1_3/__init__.py rename to trains/community/readarr/1.0.19/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/readarr/1.0.18/templates/library/base_v1_1_3/environment.py b/trains/community/readarr/1.0.19/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/readarr/1.0.18/templates/library/base_v1_1_3/environment.py rename to trains/community/readarr/1.0.19/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/readarr/1.0.19/templates/library/base_v1_1_4/healthchecks.py b/trains/community/readarr/1.0.19/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/community/readarr/1.0.19/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/readarr/1.0.18/templates/library/base_v1_1_3/mariadb.py b/trains/community/readarr/1.0.19/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/readarr/1.0.18/templates/library/base_v1_1_3/mariadb.py rename to trains/community/readarr/1.0.19/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/readarr/1.0.18/templates/library/base_v1_1_3/metadata.py b/trains/community/readarr/1.0.19/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/readarr/1.0.18/templates/library/base_v1_1_3/metadata.py rename to trains/community/readarr/1.0.19/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/readarr/1.0.18/templates/library/base_v1_1_3/network.py b/trains/community/readarr/1.0.19/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/readarr/1.0.18/templates/library/base_v1_1_3/network.py rename to trains/community/readarr/1.0.19/templates/library/base_v1_1_4/network.py diff --git a/trains/community/readarr/1.0.19/templates/library/base_v1_1_4/permissions.py b/trains/community/readarr/1.0.19/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/community/readarr/1.0.19/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/community/readarr/1.0.18/templates/library/base_v1_1_3/ports.py b/trains/community/readarr/1.0.19/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/readarr/1.0.18/templates/library/base_v1_1_3/ports.py rename to trains/community/readarr/1.0.19/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/readarr/1.0.18/templates/library/base_v1_1_3/postgres.py b/trains/community/readarr/1.0.19/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/readarr/1.0.18/templates/library/base_v1_1_3/postgres.py rename to trains/community/readarr/1.0.19/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/readarr/1.0.18/templates/library/base_v1_1_3/redis.py b/trains/community/readarr/1.0.19/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/readarr/1.0.18/templates/library/base_v1_1_3/redis.py rename to trains/community/readarr/1.0.19/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/readarr/1.0.18/templates/library/base_v1_1_3/resources.py b/trains/community/readarr/1.0.19/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/readarr/1.0.18/templates/library/base_v1_1_3/resources.py rename to trains/community/readarr/1.0.19/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/readarr/1.0.18/templates/library/base_v1_1_3/security.py b/trains/community/readarr/1.0.19/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/readarr/1.0.18/templates/library/base_v1_1_3/security.py rename to trains/community/readarr/1.0.19/templates/library/base_v1_1_4/security.py diff --git a/trains/community/readarr/1.0.18/templates/library/base_v1_1_3/storage.py b/trains/community/readarr/1.0.19/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/readarr/1.0.18/templates/library/base_v1_1_3/storage.py rename to trains/community/readarr/1.0.19/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/readarr/1.0.18/templates/library/base_v1_1_3/utils.py b/trains/community/readarr/1.0.19/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/readarr/1.0.18/templates/library/base_v1_1_3/utils.py rename to trains/community/readarr/1.0.19/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/readarr/1.0.18/templates/test_values/basic-values.yaml b/trains/community/readarr/1.0.19/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/readarr/1.0.18/templates/test_values/basic-values.yaml rename to trains/community/readarr/1.0.19/templates/test_values/basic-values.yaml diff --git a/trains/community/recyclarr/1.0.7/templates/library/base_v1_1_3/healthchecks.py b/trains/community/recyclarr/1.0.7/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/community/recyclarr/1.0.7/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/recyclarr/1.0.7/templates/library/base_v1_1_3/permissions.py b/trains/community/recyclarr/1.0.7/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/community/recyclarr/1.0.7/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/community/recyclarr/1.0.7/README.md b/trains/community/recyclarr/1.0.8/README.md similarity index 100% rename from trains/community/recyclarr/1.0.7/README.md rename to trains/community/recyclarr/1.0.8/README.md diff --git a/trains/community/recyclarr/1.0.7/app.yaml b/trains/community/recyclarr/1.0.8/app.yaml similarity index 85% rename from trains/community/recyclarr/1.0.7/app.yaml rename to trains/community/recyclarr/1.0.8/app.yaml index eb9122d4ed..c69360f58e 100644 --- a/trains/community/recyclarr/1.0.7/app.yaml +++ b/trains/community/recyclarr/1.0.8/app.yaml @@ -11,8 +11,8 @@ keywords: - sync - sonarr - radarr -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -30,4 +30,4 @@ sources: - https://github.com/recyclarr/recyclarr/tree/recyclarr title: Recyclarr train: community -version: 1.0.7 +version: 1.0.8 diff --git a/trains/community/recyclarr/1.0.7/ix_values.yaml b/trains/community/recyclarr/1.0.8/ix_values.yaml similarity index 100% rename from trains/community/recyclarr/1.0.7/ix_values.yaml rename to trains/community/recyclarr/1.0.8/ix_values.yaml diff --git a/trains/community/recyclarr/1.0.7/migrations/migrate_from_kubernetes b/trains/community/recyclarr/1.0.8/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/recyclarr/1.0.7/migrations/migrate_from_kubernetes rename to trains/community/recyclarr/1.0.8/migrations/migrate_from_kubernetes diff --git a/trains/community/recyclarr/1.0.7/migrations/migration_helpers/__init__.py b/trains/community/recyclarr/1.0.8/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/recyclarr/1.0.7/migrations/migration_helpers/__init__.py rename to trains/community/recyclarr/1.0.8/migrations/migration_helpers/__init__.py diff --git a/trains/community/recyclarr/1.0.7/migrations/migration_helpers/cpu.py b/trains/community/recyclarr/1.0.8/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/recyclarr/1.0.7/migrations/migration_helpers/cpu.py rename to trains/community/recyclarr/1.0.8/migrations/migration_helpers/cpu.py diff --git a/trains/community/recyclarr/1.0.7/migrations/migration_helpers/dns_config.py b/trains/community/recyclarr/1.0.8/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/recyclarr/1.0.7/migrations/migration_helpers/dns_config.py rename to trains/community/recyclarr/1.0.8/migrations/migration_helpers/dns_config.py diff --git a/trains/community/recyclarr/1.0.7/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/recyclarr/1.0.8/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/recyclarr/1.0.7/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/recyclarr/1.0.8/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/recyclarr/1.0.7/migrations/migration_helpers/memory.py b/trains/community/recyclarr/1.0.8/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/recyclarr/1.0.7/migrations/migration_helpers/memory.py rename to trains/community/recyclarr/1.0.8/migrations/migration_helpers/memory.py diff --git a/trains/community/recyclarr/1.0.7/migrations/migration_helpers/resources.py b/trains/community/recyclarr/1.0.8/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/recyclarr/1.0.7/migrations/migration_helpers/resources.py rename to trains/community/recyclarr/1.0.8/migrations/migration_helpers/resources.py diff --git a/trains/community/recyclarr/1.0.7/migrations/migration_helpers/storage.py b/trains/community/recyclarr/1.0.8/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/recyclarr/1.0.7/migrations/migration_helpers/storage.py rename to trains/community/recyclarr/1.0.8/migrations/migration_helpers/storage.py diff --git a/trains/community/recyclarr/1.0.7/questions.yaml b/trains/community/recyclarr/1.0.8/questions.yaml similarity index 100% rename from trains/community/recyclarr/1.0.7/questions.yaml rename to trains/community/recyclarr/1.0.8/questions.yaml diff --git a/trains/community/recyclarr/1.0.7/templates/docker-compose.yaml b/trains/community/recyclarr/1.0.8/templates/docker-compose.yaml similarity index 100% rename from trains/community/recyclarr/1.0.7/templates/docker-compose.yaml rename to trains/community/recyclarr/1.0.8/templates/docker-compose.yaml diff --git a/trains/community/recyclarr/1.0.7/templates/library/base_v1_1_3/__init__.py b/trains/community/recyclarr/1.0.8/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/recyclarr/1.0.7/templates/library/base_v1_1_3/__init__.py rename to trains/community/recyclarr/1.0.8/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/recyclarr/1.0.7/templates/library/base_v1_1_3/environment.py b/trains/community/recyclarr/1.0.8/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/recyclarr/1.0.7/templates/library/base_v1_1_3/environment.py rename to trains/community/recyclarr/1.0.8/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/recyclarr/1.0.8/templates/library/base_v1_1_4/healthchecks.py b/trains/community/recyclarr/1.0.8/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/community/recyclarr/1.0.8/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/recyclarr/1.0.7/templates/library/base_v1_1_3/mariadb.py b/trains/community/recyclarr/1.0.8/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/recyclarr/1.0.7/templates/library/base_v1_1_3/mariadb.py rename to trains/community/recyclarr/1.0.8/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/recyclarr/1.0.7/templates/library/base_v1_1_3/metadata.py b/trains/community/recyclarr/1.0.8/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/recyclarr/1.0.7/templates/library/base_v1_1_3/metadata.py rename to trains/community/recyclarr/1.0.8/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/recyclarr/1.0.7/templates/library/base_v1_1_3/network.py b/trains/community/recyclarr/1.0.8/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/recyclarr/1.0.7/templates/library/base_v1_1_3/network.py rename to trains/community/recyclarr/1.0.8/templates/library/base_v1_1_4/network.py diff --git a/trains/community/recyclarr/1.0.8/templates/library/base_v1_1_4/permissions.py b/trains/community/recyclarr/1.0.8/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/community/recyclarr/1.0.8/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/community/recyclarr/1.0.7/templates/library/base_v1_1_3/ports.py b/trains/community/recyclarr/1.0.8/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/recyclarr/1.0.7/templates/library/base_v1_1_3/ports.py rename to trains/community/recyclarr/1.0.8/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/recyclarr/1.0.7/templates/library/base_v1_1_3/postgres.py b/trains/community/recyclarr/1.0.8/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/recyclarr/1.0.7/templates/library/base_v1_1_3/postgres.py rename to trains/community/recyclarr/1.0.8/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/recyclarr/1.0.7/templates/library/base_v1_1_3/redis.py b/trains/community/recyclarr/1.0.8/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/recyclarr/1.0.7/templates/library/base_v1_1_3/redis.py rename to trains/community/recyclarr/1.0.8/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/recyclarr/1.0.7/templates/library/base_v1_1_3/resources.py b/trains/community/recyclarr/1.0.8/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/recyclarr/1.0.7/templates/library/base_v1_1_3/resources.py rename to trains/community/recyclarr/1.0.8/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/recyclarr/1.0.7/templates/library/base_v1_1_3/security.py b/trains/community/recyclarr/1.0.8/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/recyclarr/1.0.7/templates/library/base_v1_1_3/security.py rename to trains/community/recyclarr/1.0.8/templates/library/base_v1_1_4/security.py diff --git a/trains/community/recyclarr/1.0.7/templates/library/base_v1_1_3/storage.py b/trains/community/recyclarr/1.0.8/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/recyclarr/1.0.7/templates/library/base_v1_1_3/storage.py rename to trains/community/recyclarr/1.0.8/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/recyclarr/1.0.7/templates/library/base_v1_1_3/utils.py b/trains/community/recyclarr/1.0.8/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/recyclarr/1.0.7/templates/library/base_v1_1_3/utils.py rename to trains/community/recyclarr/1.0.8/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/recyclarr/1.0.7/templates/test_values/basic-values.yaml b/trains/community/recyclarr/1.0.8/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/recyclarr/1.0.7/templates/test_values/basic-values.yaml rename to trains/community/recyclarr/1.0.8/templates/test_values/basic-values.yaml diff --git a/trains/community/redis/1.0.6/templates/library/base_v1_1_3/healthchecks.py b/trains/community/redis/1.0.6/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/community/redis/1.0.6/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/redis/1.0.6/templates/library/base_v1_1_3/permissions.py b/trains/community/redis/1.0.6/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/community/redis/1.0.6/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/community/redis/1.0.6/README.md b/trains/community/redis/1.0.7/README.md similarity index 100% rename from trains/community/redis/1.0.6/README.md rename to trains/community/redis/1.0.7/README.md diff --git a/trains/community/redis/1.0.6/app.yaml b/trains/community/redis/1.0.7/app.yaml similarity index 86% rename from trains/community/redis/1.0.6/app.yaml rename to trains/community/redis/1.0.7/app.yaml index b805989fbc..43e445b7ca 100644 --- a/trains/community/redis/1.0.6/app.yaml +++ b/trains/community/redis/1.0.7/app.yaml @@ -9,8 +9,8 @@ host_mounts: [] icon: https://media.sys.truenas.net/apps/redis/icons/icon.png keywords: - cache -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -29,4 +29,4 @@ sources: - https://redis.io/ title: Redis train: community -version: 1.0.6 +version: 1.0.7 diff --git a/trains/community/redis/1.0.6/ix_values.yaml b/trains/community/redis/1.0.7/ix_values.yaml similarity index 100% rename from trains/community/redis/1.0.6/ix_values.yaml rename to trains/community/redis/1.0.7/ix_values.yaml diff --git a/trains/community/redis/1.0.6/migrations/migrate_from_kubernetes b/trains/community/redis/1.0.7/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/redis/1.0.6/migrations/migrate_from_kubernetes rename to trains/community/redis/1.0.7/migrations/migrate_from_kubernetes diff --git a/trains/community/redis/1.0.6/migrations/migration_helpers/__init__.py b/trains/community/redis/1.0.7/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/redis/1.0.6/migrations/migration_helpers/__init__.py rename to trains/community/redis/1.0.7/migrations/migration_helpers/__init__.py diff --git a/trains/community/redis/1.0.6/migrations/migration_helpers/cpu.py b/trains/community/redis/1.0.7/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/redis/1.0.6/migrations/migration_helpers/cpu.py rename to trains/community/redis/1.0.7/migrations/migration_helpers/cpu.py diff --git a/trains/community/redis/1.0.6/migrations/migration_helpers/dns_config.py b/trains/community/redis/1.0.7/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/redis/1.0.6/migrations/migration_helpers/dns_config.py rename to trains/community/redis/1.0.7/migrations/migration_helpers/dns_config.py diff --git a/trains/community/redis/1.0.6/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/redis/1.0.7/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/redis/1.0.6/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/redis/1.0.7/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/redis/1.0.6/migrations/migration_helpers/memory.py b/trains/community/redis/1.0.7/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/redis/1.0.6/migrations/migration_helpers/memory.py rename to trains/community/redis/1.0.7/migrations/migration_helpers/memory.py diff --git a/trains/community/redis/1.0.6/migrations/migration_helpers/resources.py b/trains/community/redis/1.0.7/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/redis/1.0.6/migrations/migration_helpers/resources.py rename to trains/community/redis/1.0.7/migrations/migration_helpers/resources.py diff --git a/trains/community/redis/1.0.6/migrations/migration_helpers/storage.py b/trains/community/redis/1.0.7/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/redis/1.0.6/migrations/migration_helpers/storage.py rename to trains/community/redis/1.0.7/migrations/migration_helpers/storage.py diff --git a/trains/community/redis/1.0.6/questions.yaml b/trains/community/redis/1.0.7/questions.yaml similarity index 100% rename from trains/community/redis/1.0.6/questions.yaml rename to trains/community/redis/1.0.7/questions.yaml diff --git a/trains/community/redis/1.0.6/templates/docker-compose.yaml b/trains/community/redis/1.0.7/templates/docker-compose.yaml similarity index 100% rename from trains/community/redis/1.0.6/templates/docker-compose.yaml rename to trains/community/redis/1.0.7/templates/docker-compose.yaml diff --git a/trains/community/redis/1.0.6/templates/library/base_v1_1_3/__init__.py b/trains/community/redis/1.0.7/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/redis/1.0.6/templates/library/base_v1_1_3/__init__.py rename to trains/community/redis/1.0.7/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/redis/1.0.6/templates/library/base_v1_1_3/environment.py b/trains/community/redis/1.0.7/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/redis/1.0.6/templates/library/base_v1_1_3/environment.py rename to trains/community/redis/1.0.7/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/redis/1.0.7/templates/library/base_v1_1_4/healthchecks.py b/trains/community/redis/1.0.7/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/community/redis/1.0.7/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/redis/1.0.6/templates/library/base_v1_1_3/mariadb.py b/trains/community/redis/1.0.7/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/redis/1.0.6/templates/library/base_v1_1_3/mariadb.py rename to trains/community/redis/1.0.7/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/redis/1.0.6/templates/library/base_v1_1_3/metadata.py b/trains/community/redis/1.0.7/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/redis/1.0.6/templates/library/base_v1_1_3/metadata.py rename to trains/community/redis/1.0.7/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/redis/1.0.6/templates/library/base_v1_1_3/network.py b/trains/community/redis/1.0.7/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/redis/1.0.6/templates/library/base_v1_1_3/network.py rename to trains/community/redis/1.0.7/templates/library/base_v1_1_4/network.py diff --git a/trains/community/redis/1.0.7/templates/library/base_v1_1_4/permissions.py b/trains/community/redis/1.0.7/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/community/redis/1.0.7/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/community/redis/1.0.6/templates/library/base_v1_1_3/ports.py b/trains/community/redis/1.0.7/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/redis/1.0.6/templates/library/base_v1_1_3/ports.py rename to trains/community/redis/1.0.7/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/redis/1.0.6/templates/library/base_v1_1_3/postgres.py b/trains/community/redis/1.0.7/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/redis/1.0.6/templates/library/base_v1_1_3/postgres.py rename to trains/community/redis/1.0.7/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/redis/1.0.6/templates/library/base_v1_1_3/redis.py b/trains/community/redis/1.0.7/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/redis/1.0.6/templates/library/base_v1_1_3/redis.py rename to trains/community/redis/1.0.7/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/redis/1.0.6/templates/library/base_v1_1_3/resources.py b/trains/community/redis/1.0.7/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/redis/1.0.6/templates/library/base_v1_1_3/resources.py rename to trains/community/redis/1.0.7/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/redis/1.0.6/templates/library/base_v1_1_3/security.py b/trains/community/redis/1.0.7/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/redis/1.0.6/templates/library/base_v1_1_3/security.py rename to trains/community/redis/1.0.7/templates/library/base_v1_1_4/security.py diff --git a/trains/community/redis/1.0.6/templates/library/base_v1_1_3/storage.py b/trains/community/redis/1.0.7/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/redis/1.0.6/templates/library/base_v1_1_3/storage.py rename to trains/community/redis/1.0.7/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/redis/1.0.6/templates/library/base_v1_1_3/utils.py b/trains/community/redis/1.0.7/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/redis/1.0.6/templates/library/base_v1_1_3/utils.py rename to trains/community/redis/1.0.7/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/redis/1.0.6/templates/test_values/basic-values.yaml b/trains/community/redis/1.0.7/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/redis/1.0.6/templates/test_values/basic-values.yaml rename to trains/community/redis/1.0.7/templates/test_values/basic-values.yaml diff --git a/trains/community/redis/1.0.6/templates/test_values/noauth-values.yaml b/trains/community/redis/1.0.7/templates/test_values/noauth-values.yaml similarity index 100% rename from trains/community/redis/1.0.6/templates/test_values/noauth-values.yaml rename to trains/community/redis/1.0.7/templates/test_values/noauth-values.yaml diff --git a/trains/community/roundcube/1.0.6/templates/library/base_v1_1_3/healthchecks.py b/trains/community/roundcube/1.0.6/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/community/roundcube/1.0.6/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/roundcube/1.0.6/templates/library/base_v1_1_3/permissions.py b/trains/community/roundcube/1.0.6/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/community/roundcube/1.0.6/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/community/roundcube/1.0.6/README.md b/trains/community/roundcube/1.0.7/README.md similarity index 100% rename from trains/community/roundcube/1.0.6/README.md rename to trains/community/roundcube/1.0.7/README.md diff --git a/trains/community/roundcube/1.0.6/app.yaml b/trains/community/roundcube/1.0.7/app.yaml similarity index 93% rename from trains/community/roundcube/1.0.6/app.yaml rename to trains/community/roundcube/1.0.7/app.yaml index a1d562a34a..b93f4047ef 100644 --- a/trains/community/roundcube/1.0.6/app.yaml +++ b/trains/community/roundcube/1.0.7/app.yaml @@ -20,8 +20,8 @@ icon: https://media.sys.truenas.net/apps/roundcube/icons/icon.png keywords: - webmail - email -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -49,4 +49,4 @@ sources: - https://hub.docker.com/r/roundcube/roundcubemail/ title: Roundcube train: community -version: 1.0.6 +version: 1.0.7 diff --git a/trains/community/roundcube/1.0.6/ix_values.yaml b/trains/community/roundcube/1.0.7/ix_values.yaml similarity index 100% rename from trains/community/roundcube/1.0.6/ix_values.yaml rename to trains/community/roundcube/1.0.7/ix_values.yaml diff --git a/trains/community/roundcube/1.0.6/migrations/migrate_from_kubernetes b/trains/community/roundcube/1.0.7/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/roundcube/1.0.6/migrations/migrate_from_kubernetes rename to trains/community/roundcube/1.0.7/migrations/migrate_from_kubernetes diff --git a/trains/community/roundcube/1.0.6/migrations/migration_helpers/__init__.py b/trains/community/roundcube/1.0.7/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/roundcube/1.0.6/migrations/migration_helpers/__init__.py rename to trains/community/roundcube/1.0.7/migrations/migration_helpers/__init__.py diff --git a/trains/community/roundcube/1.0.6/migrations/migration_helpers/cpu.py b/trains/community/roundcube/1.0.7/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/roundcube/1.0.6/migrations/migration_helpers/cpu.py rename to trains/community/roundcube/1.0.7/migrations/migration_helpers/cpu.py diff --git a/trains/community/roundcube/1.0.6/migrations/migration_helpers/dns_config.py b/trains/community/roundcube/1.0.7/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/roundcube/1.0.6/migrations/migration_helpers/dns_config.py rename to trains/community/roundcube/1.0.7/migrations/migration_helpers/dns_config.py diff --git a/trains/community/roundcube/1.0.6/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/roundcube/1.0.7/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/roundcube/1.0.6/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/roundcube/1.0.7/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/roundcube/1.0.6/migrations/migration_helpers/memory.py b/trains/community/roundcube/1.0.7/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/roundcube/1.0.6/migrations/migration_helpers/memory.py rename to trains/community/roundcube/1.0.7/migrations/migration_helpers/memory.py diff --git a/trains/community/roundcube/1.0.6/migrations/migration_helpers/resources.py b/trains/community/roundcube/1.0.7/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/roundcube/1.0.6/migrations/migration_helpers/resources.py rename to trains/community/roundcube/1.0.7/migrations/migration_helpers/resources.py diff --git a/trains/community/roundcube/1.0.6/migrations/migration_helpers/storage.py b/trains/community/roundcube/1.0.7/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/roundcube/1.0.6/migrations/migration_helpers/storage.py rename to trains/community/roundcube/1.0.7/migrations/migration_helpers/storage.py diff --git a/trains/community/roundcube/1.0.6/questions.yaml b/trains/community/roundcube/1.0.7/questions.yaml similarity index 100% rename from trains/community/roundcube/1.0.6/questions.yaml rename to trains/community/roundcube/1.0.7/questions.yaml diff --git a/trains/community/roundcube/1.0.6/templates/docker-compose.yaml b/trains/community/roundcube/1.0.7/templates/docker-compose.yaml similarity index 100% rename from trains/community/roundcube/1.0.6/templates/docker-compose.yaml rename to trains/community/roundcube/1.0.7/templates/docker-compose.yaml diff --git a/trains/community/roundcube/1.0.6/templates/library/base_v1_1_3/__init__.py b/trains/community/roundcube/1.0.7/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/roundcube/1.0.6/templates/library/base_v1_1_3/__init__.py rename to trains/community/roundcube/1.0.7/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/roundcube/1.0.6/templates/library/base_v1_1_3/environment.py b/trains/community/roundcube/1.0.7/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/roundcube/1.0.6/templates/library/base_v1_1_3/environment.py rename to trains/community/roundcube/1.0.7/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/roundcube/1.0.7/templates/library/base_v1_1_4/healthchecks.py b/trains/community/roundcube/1.0.7/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/community/roundcube/1.0.7/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/roundcube/1.0.6/templates/library/base_v1_1_3/mariadb.py b/trains/community/roundcube/1.0.7/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/roundcube/1.0.6/templates/library/base_v1_1_3/mariadb.py rename to trains/community/roundcube/1.0.7/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/roundcube/1.0.6/templates/library/base_v1_1_3/metadata.py b/trains/community/roundcube/1.0.7/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/roundcube/1.0.6/templates/library/base_v1_1_3/metadata.py rename to trains/community/roundcube/1.0.7/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/roundcube/1.0.6/templates/library/base_v1_1_3/network.py b/trains/community/roundcube/1.0.7/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/roundcube/1.0.6/templates/library/base_v1_1_3/network.py rename to trains/community/roundcube/1.0.7/templates/library/base_v1_1_4/network.py diff --git a/trains/community/roundcube/1.0.7/templates/library/base_v1_1_4/permissions.py b/trains/community/roundcube/1.0.7/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/community/roundcube/1.0.7/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/community/roundcube/1.0.6/templates/library/base_v1_1_3/ports.py b/trains/community/roundcube/1.0.7/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/roundcube/1.0.6/templates/library/base_v1_1_3/ports.py rename to trains/community/roundcube/1.0.7/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/roundcube/1.0.6/templates/library/base_v1_1_3/postgres.py b/trains/community/roundcube/1.0.7/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/roundcube/1.0.6/templates/library/base_v1_1_3/postgres.py rename to trains/community/roundcube/1.0.7/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/roundcube/1.0.6/templates/library/base_v1_1_3/redis.py b/trains/community/roundcube/1.0.7/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/roundcube/1.0.6/templates/library/base_v1_1_3/redis.py rename to trains/community/roundcube/1.0.7/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/roundcube/1.0.6/templates/library/base_v1_1_3/resources.py b/trains/community/roundcube/1.0.7/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/roundcube/1.0.6/templates/library/base_v1_1_3/resources.py rename to trains/community/roundcube/1.0.7/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/roundcube/1.0.6/templates/library/base_v1_1_3/security.py b/trains/community/roundcube/1.0.7/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/roundcube/1.0.6/templates/library/base_v1_1_3/security.py rename to trains/community/roundcube/1.0.7/templates/library/base_v1_1_4/security.py diff --git a/trains/community/roundcube/1.0.6/templates/library/base_v1_1_3/storage.py b/trains/community/roundcube/1.0.7/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/roundcube/1.0.6/templates/library/base_v1_1_3/storage.py rename to trains/community/roundcube/1.0.7/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/roundcube/1.0.6/templates/library/base_v1_1_3/utils.py b/trains/community/roundcube/1.0.7/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/roundcube/1.0.6/templates/library/base_v1_1_3/utils.py rename to trains/community/roundcube/1.0.7/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/roundcube/1.0.6/templates/test_values/basic-values.yaml b/trains/community/roundcube/1.0.7/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/roundcube/1.0.6/templates/test_values/basic-values.yaml rename to trains/community/roundcube/1.0.7/templates/test_values/basic-values.yaml diff --git a/trains/community/rsyncd/1.0.13/templates/library/base_v1_1_3/healthchecks.py b/trains/community/rsyncd/1.0.13/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/community/rsyncd/1.0.13/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/rsyncd/1.0.13/templates/library/base_v1_1_3/permissions.py b/trains/community/rsyncd/1.0.13/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/community/rsyncd/1.0.13/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/community/rsyncd/1.0.13/README.md b/trains/community/rsyncd/1.0.14/README.md similarity index 100% rename from trains/community/rsyncd/1.0.13/README.md rename to trains/community/rsyncd/1.0.14/README.md diff --git a/trains/community/rsyncd/1.0.13/app.yaml b/trains/community/rsyncd/1.0.14/app.yaml similarity index 91% rename from trains/community/rsyncd/1.0.13/app.yaml rename to trains/community/rsyncd/1.0.14/app.yaml index 2d09066674..2482e35b4e 100644 --- a/trains/community/rsyncd/1.0.13/app.yaml +++ b/trains/community/rsyncd/1.0.14/app.yaml @@ -22,8 +22,8 @@ keywords: - sync - rsync - file transfer -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -41,4 +41,4 @@ sources: - https://hub.docker.com/r/ixsystems/rsyncd title: Rsync Daemon train: community -version: 1.0.13 +version: 1.0.14 diff --git a/trains/community/rsyncd/1.0.13/ix_values.yaml b/trains/community/rsyncd/1.0.14/ix_values.yaml similarity index 100% rename from trains/community/rsyncd/1.0.13/ix_values.yaml rename to trains/community/rsyncd/1.0.14/ix_values.yaml diff --git a/trains/community/rsyncd/1.0.13/migrations/migrate_from_kubernetes b/trains/community/rsyncd/1.0.14/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/rsyncd/1.0.13/migrations/migrate_from_kubernetes rename to trains/community/rsyncd/1.0.14/migrations/migrate_from_kubernetes diff --git a/trains/community/rsyncd/1.0.13/migrations/migration_helpers/__init__.py b/trains/community/rsyncd/1.0.14/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/rsyncd/1.0.13/migrations/migration_helpers/__init__.py rename to trains/community/rsyncd/1.0.14/migrations/migration_helpers/__init__.py diff --git a/trains/community/rsyncd/1.0.13/migrations/migration_helpers/cpu.py b/trains/community/rsyncd/1.0.14/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/rsyncd/1.0.13/migrations/migration_helpers/cpu.py rename to trains/community/rsyncd/1.0.14/migrations/migration_helpers/cpu.py diff --git a/trains/community/rsyncd/1.0.13/migrations/migration_helpers/dns_config.py b/trains/community/rsyncd/1.0.14/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/rsyncd/1.0.13/migrations/migration_helpers/dns_config.py rename to trains/community/rsyncd/1.0.14/migrations/migration_helpers/dns_config.py diff --git a/trains/community/rsyncd/1.0.13/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/rsyncd/1.0.14/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/rsyncd/1.0.13/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/rsyncd/1.0.14/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/rsyncd/1.0.13/migrations/migration_helpers/memory.py b/trains/community/rsyncd/1.0.14/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/rsyncd/1.0.13/migrations/migration_helpers/memory.py rename to trains/community/rsyncd/1.0.14/migrations/migration_helpers/memory.py diff --git a/trains/community/rsyncd/1.0.13/migrations/migration_helpers/resources.py b/trains/community/rsyncd/1.0.14/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/rsyncd/1.0.13/migrations/migration_helpers/resources.py rename to trains/community/rsyncd/1.0.14/migrations/migration_helpers/resources.py diff --git a/trains/community/rsyncd/1.0.13/migrations/migration_helpers/storage.py b/trains/community/rsyncd/1.0.14/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/rsyncd/1.0.13/migrations/migration_helpers/storage.py rename to trains/community/rsyncd/1.0.14/migrations/migration_helpers/storage.py diff --git a/trains/community/rsyncd/1.0.13/questions.yaml b/trains/community/rsyncd/1.0.14/questions.yaml similarity index 100% rename from trains/community/rsyncd/1.0.13/questions.yaml rename to trains/community/rsyncd/1.0.14/questions.yaml diff --git a/trains/community/rsyncd/1.0.13/templates/docker-compose.yaml b/trains/community/rsyncd/1.0.14/templates/docker-compose.yaml similarity index 100% rename from trains/community/rsyncd/1.0.13/templates/docker-compose.yaml rename to trains/community/rsyncd/1.0.14/templates/docker-compose.yaml diff --git a/trains/community/rsyncd/1.0.13/templates/library/base_v1_1_3/__init__.py b/trains/community/rsyncd/1.0.14/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/rsyncd/1.0.13/templates/library/base_v1_1_3/__init__.py rename to trains/community/rsyncd/1.0.14/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/rsyncd/1.0.13/templates/library/base_v1_1_3/environment.py b/trains/community/rsyncd/1.0.14/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/rsyncd/1.0.13/templates/library/base_v1_1_3/environment.py rename to trains/community/rsyncd/1.0.14/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/rsyncd/1.0.14/templates/library/base_v1_1_4/healthchecks.py b/trains/community/rsyncd/1.0.14/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/community/rsyncd/1.0.14/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/rsyncd/1.0.13/templates/library/base_v1_1_3/mariadb.py b/trains/community/rsyncd/1.0.14/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/rsyncd/1.0.13/templates/library/base_v1_1_3/mariadb.py rename to trains/community/rsyncd/1.0.14/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/rsyncd/1.0.13/templates/library/base_v1_1_3/metadata.py b/trains/community/rsyncd/1.0.14/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/rsyncd/1.0.13/templates/library/base_v1_1_3/metadata.py rename to trains/community/rsyncd/1.0.14/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/rsyncd/1.0.13/templates/library/base_v1_1_3/network.py b/trains/community/rsyncd/1.0.14/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/rsyncd/1.0.13/templates/library/base_v1_1_3/network.py rename to trains/community/rsyncd/1.0.14/templates/library/base_v1_1_4/network.py diff --git a/trains/community/rsyncd/1.0.14/templates/library/base_v1_1_4/permissions.py b/trains/community/rsyncd/1.0.14/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/community/rsyncd/1.0.14/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/community/rsyncd/1.0.13/templates/library/base_v1_1_3/ports.py b/trains/community/rsyncd/1.0.14/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/rsyncd/1.0.13/templates/library/base_v1_1_3/ports.py rename to trains/community/rsyncd/1.0.14/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/rsyncd/1.0.13/templates/library/base_v1_1_3/postgres.py b/trains/community/rsyncd/1.0.14/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/rsyncd/1.0.13/templates/library/base_v1_1_3/postgres.py rename to trains/community/rsyncd/1.0.14/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/rsyncd/1.0.13/templates/library/base_v1_1_3/redis.py b/trains/community/rsyncd/1.0.14/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/rsyncd/1.0.13/templates/library/base_v1_1_3/redis.py rename to trains/community/rsyncd/1.0.14/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/rsyncd/1.0.13/templates/library/base_v1_1_3/resources.py b/trains/community/rsyncd/1.0.14/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/rsyncd/1.0.13/templates/library/base_v1_1_3/resources.py rename to trains/community/rsyncd/1.0.14/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/rsyncd/1.0.13/templates/library/base_v1_1_3/security.py b/trains/community/rsyncd/1.0.14/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/rsyncd/1.0.13/templates/library/base_v1_1_3/security.py rename to trains/community/rsyncd/1.0.14/templates/library/base_v1_1_4/security.py diff --git a/trains/community/rsyncd/1.0.13/templates/library/base_v1_1_3/storage.py b/trains/community/rsyncd/1.0.14/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/rsyncd/1.0.13/templates/library/base_v1_1_3/storage.py rename to trains/community/rsyncd/1.0.14/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/rsyncd/1.0.13/templates/library/base_v1_1_3/utils.py b/trains/community/rsyncd/1.0.14/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/rsyncd/1.0.13/templates/library/base_v1_1_3/utils.py rename to trains/community/rsyncd/1.0.14/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/rsyncd/1.0.13/templates/rsync_macros/rsyncd.conf b/trains/community/rsyncd/1.0.14/templates/rsync_macros/rsyncd.conf similarity index 100% rename from trains/community/rsyncd/1.0.13/templates/rsync_macros/rsyncd.conf rename to trains/community/rsyncd/1.0.14/templates/rsync_macros/rsyncd.conf diff --git a/trains/community/rsyncd/1.0.13/templates/test_values/basic-values.yaml b/trains/community/rsyncd/1.0.14/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/rsyncd/1.0.13/templates/test_values/basic-values.yaml rename to trains/community/rsyncd/1.0.14/templates/test_values/basic-values.yaml diff --git a/trains/community/rsyncd/1.0.13/templates/test_values/hostnet-values.yaml b/trains/community/rsyncd/1.0.14/templates/test_values/hostnet-values.yaml similarity index 100% rename from trains/community/rsyncd/1.0.13/templates/test_values/hostnet-values.yaml rename to trains/community/rsyncd/1.0.14/templates/test_values/hostnet-values.yaml diff --git a/trains/community/rust-desk/1.0.6/templates/library/base_v1_1_3/healthchecks.py b/trains/community/rust-desk/1.0.6/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/community/rust-desk/1.0.6/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/rust-desk/1.0.6/templates/library/base_v1_1_3/permissions.py b/trains/community/rust-desk/1.0.6/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/community/rust-desk/1.0.6/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/community/rust-desk/1.0.6/README.md b/trains/community/rust-desk/1.0.7/README.md similarity index 100% rename from trains/community/rust-desk/1.0.6/README.md rename to trains/community/rust-desk/1.0.7/README.md diff --git a/trains/community/rust-desk/1.0.6/app.yaml b/trains/community/rust-desk/1.0.7/app.yaml similarity index 85% rename from trains/community/rust-desk/1.0.6/app.yaml rename to trains/community/rust-desk/1.0.7/app.yaml index fe973abdd6..fa4f5be738 100644 --- a/trains/community/rust-desk/1.0.6/app.yaml +++ b/trains/community/rust-desk/1.0.7/app.yaml @@ -9,8 +9,8 @@ icon: https://media.sys.truenas.net/apps/rust-desk/icons/icon.png keywords: - remote - desktop -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -28,4 +28,4 @@ sources: - https://github.com/rustdesk/rustdesk-server title: Rust Desk train: community -version: 1.0.6 +version: 1.0.7 diff --git a/trains/community/rust-desk/1.0.6/ix_values.yaml b/trains/community/rust-desk/1.0.7/ix_values.yaml similarity index 100% rename from trains/community/rust-desk/1.0.6/ix_values.yaml rename to trains/community/rust-desk/1.0.7/ix_values.yaml diff --git a/trains/community/rust-desk/1.0.6/migrations/migrate_from_kubernetes b/trains/community/rust-desk/1.0.7/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/rust-desk/1.0.6/migrations/migrate_from_kubernetes rename to trains/community/rust-desk/1.0.7/migrations/migrate_from_kubernetes diff --git a/trains/community/rust-desk/1.0.6/migrations/migration_helpers/__init__.py b/trains/community/rust-desk/1.0.7/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/rust-desk/1.0.6/migrations/migration_helpers/__init__.py rename to trains/community/rust-desk/1.0.7/migrations/migration_helpers/__init__.py diff --git a/trains/community/rust-desk/1.0.6/migrations/migration_helpers/cpu.py b/trains/community/rust-desk/1.0.7/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/rust-desk/1.0.6/migrations/migration_helpers/cpu.py rename to trains/community/rust-desk/1.0.7/migrations/migration_helpers/cpu.py diff --git a/trains/community/rust-desk/1.0.6/migrations/migration_helpers/dns_config.py b/trains/community/rust-desk/1.0.7/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/rust-desk/1.0.6/migrations/migration_helpers/dns_config.py rename to trains/community/rust-desk/1.0.7/migrations/migration_helpers/dns_config.py diff --git a/trains/community/rust-desk/1.0.6/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/rust-desk/1.0.7/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/rust-desk/1.0.6/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/rust-desk/1.0.7/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/rust-desk/1.0.6/migrations/migration_helpers/memory.py b/trains/community/rust-desk/1.0.7/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/rust-desk/1.0.6/migrations/migration_helpers/memory.py rename to trains/community/rust-desk/1.0.7/migrations/migration_helpers/memory.py diff --git a/trains/community/rust-desk/1.0.6/migrations/migration_helpers/resources.py b/trains/community/rust-desk/1.0.7/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/rust-desk/1.0.6/migrations/migration_helpers/resources.py rename to trains/community/rust-desk/1.0.7/migrations/migration_helpers/resources.py diff --git a/trains/community/rust-desk/1.0.6/migrations/migration_helpers/storage.py b/trains/community/rust-desk/1.0.7/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/rust-desk/1.0.6/migrations/migration_helpers/storage.py rename to trains/community/rust-desk/1.0.7/migrations/migration_helpers/storage.py diff --git a/trains/community/rust-desk/1.0.6/questions.yaml b/trains/community/rust-desk/1.0.7/questions.yaml similarity index 100% rename from trains/community/rust-desk/1.0.6/questions.yaml rename to trains/community/rust-desk/1.0.7/questions.yaml diff --git a/trains/community/rust-desk/1.0.6/templates/docker-compose.yaml b/trains/community/rust-desk/1.0.7/templates/docker-compose.yaml similarity index 100% rename from trains/community/rust-desk/1.0.6/templates/docker-compose.yaml rename to trains/community/rust-desk/1.0.7/templates/docker-compose.yaml diff --git a/trains/community/rust-desk/1.0.6/templates/library/base_v1_1_3/__init__.py b/trains/community/rust-desk/1.0.7/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/rust-desk/1.0.6/templates/library/base_v1_1_3/__init__.py rename to trains/community/rust-desk/1.0.7/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/rust-desk/1.0.6/templates/library/base_v1_1_3/environment.py b/trains/community/rust-desk/1.0.7/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/rust-desk/1.0.6/templates/library/base_v1_1_3/environment.py rename to trains/community/rust-desk/1.0.7/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/rust-desk/1.0.7/templates/library/base_v1_1_4/healthchecks.py b/trains/community/rust-desk/1.0.7/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/community/rust-desk/1.0.7/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/rust-desk/1.0.6/templates/library/base_v1_1_3/mariadb.py b/trains/community/rust-desk/1.0.7/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/rust-desk/1.0.6/templates/library/base_v1_1_3/mariadb.py rename to trains/community/rust-desk/1.0.7/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/rust-desk/1.0.6/templates/library/base_v1_1_3/metadata.py b/trains/community/rust-desk/1.0.7/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/rust-desk/1.0.6/templates/library/base_v1_1_3/metadata.py rename to trains/community/rust-desk/1.0.7/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/rust-desk/1.0.6/templates/library/base_v1_1_3/network.py b/trains/community/rust-desk/1.0.7/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/rust-desk/1.0.6/templates/library/base_v1_1_3/network.py rename to trains/community/rust-desk/1.0.7/templates/library/base_v1_1_4/network.py diff --git a/trains/community/rust-desk/1.0.7/templates/library/base_v1_1_4/permissions.py b/trains/community/rust-desk/1.0.7/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/community/rust-desk/1.0.7/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/community/rust-desk/1.0.6/templates/library/base_v1_1_3/ports.py b/trains/community/rust-desk/1.0.7/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/rust-desk/1.0.6/templates/library/base_v1_1_3/ports.py rename to trains/community/rust-desk/1.0.7/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/rust-desk/1.0.6/templates/library/base_v1_1_3/postgres.py b/trains/community/rust-desk/1.0.7/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/rust-desk/1.0.6/templates/library/base_v1_1_3/postgres.py rename to trains/community/rust-desk/1.0.7/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/rust-desk/1.0.6/templates/library/base_v1_1_3/redis.py b/trains/community/rust-desk/1.0.7/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/rust-desk/1.0.6/templates/library/base_v1_1_3/redis.py rename to trains/community/rust-desk/1.0.7/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/rust-desk/1.0.6/templates/library/base_v1_1_3/resources.py b/trains/community/rust-desk/1.0.7/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/rust-desk/1.0.6/templates/library/base_v1_1_3/resources.py rename to trains/community/rust-desk/1.0.7/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/rust-desk/1.0.6/templates/library/base_v1_1_3/security.py b/trains/community/rust-desk/1.0.7/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/rust-desk/1.0.6/templates/library/base_v1_1_3/security.py rename to trains/community/rust-desk/1.0.7/templates/library/base_v1_1_4/security.py diff --git a/trains/community/rust-desk/1.0.6/templates/library/base_v1_1_3/storage.py b/trains/community/rust-desk/1.0.7/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/rust-desk/1.0.6/templates/library/base_v1_1_3/storage.py rename to trains/community/rust-desk/1.0.7/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/rust-desk/1.0.6/templates/library/base_v1_1_3/utils.py b/trains/community/rust-desk/1.0.7/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/rust-desk/1.0.6/templates/library/base_v1_1_3/utils.py rename to trains/community/rust-desk/1.0.7/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/rust-desk/1.0.6/templates/test_values/basic-values.yaml b/trains/community/rust-desk/1.0.7/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/rust-desk/1.0.6/templates/test_values/basic-values.yaml rename to trains/community/rust-desk/1.0.7/templates/test_values/basic-values.yaml diff --git a/trains/community/sabnzbd/1.0.6/templates/library/base_v1_1_3/healthchecks.py b/trains/community/sabnzbd/1.0.6/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/community/sabnzbd/1.0.6/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/sabnzbd/1.0.6/templates/library/base_v1_1_3/permissions.py b/trains/community/sabnzbd/1.0.6/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/community/sabnzbd/1.0.6/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/community/sabnzbd/1.0.6/README.md b/trains/community/sabnzbd/1.0.7/README.md similarity index 100% rename from trains/community/sabnzbd/1.0.6/README.md rename to trains/community/sabnzbd/1.0.7/README.md diff --git a/trains/community/sabnzbd/1.0.6/app.yaml b/trains/community/sabnzbd/1.0.7/app.yaml similarity index 88% rename from trains/community/sabnzbd/1.0.6/app.yaml rename to trains/community/sabnzbd/1.0.7/app.yaml index f4c8a79940..645955f4f9 100644 --- a/trains/community/sabnzbd/1.0.6/app.yaml +++ b/trains/community/sabnzbd/1.0.7/app.yaml @@ -10,8 +10,8 @@ keywords: - media - usenet - newsreader -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -32,4 +32,4 @@ sources: - https://sabnzbd.org/ title: SABnzbd train: community -version: 1.0.6 +version: 1.0.7 diff --git a/trains/community/sabnzbd/1.0.6/ix_values.yaml b/trains/community/sabnzbd/1.0.7/ix_values.yaml similarity index 100% rename from trains/community/sabnzbd/1.0.6/ix_values.yaml rename to trains/community/sabnzbd/1.0.7/ix_values.yaml diff --git a/trains/community/sabnzbd/1.0.6/migrations/migrate_from_kubernetes b/trains/community/sabnzbd/1.0.7/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/sabnzbd/1.0.6/migrations/migrate_from_kubernetes rename to trains/community/sabnzbd/1.0.7/migrations/migrate_from_kubernetes diff --git a/trains/community/sabnzbd/1.0.6/migrations/migration_helpers/__init__.py b/trains/community/sabnzbd/1.0.7/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/sabnzbd/1.0.6/migrations/migration_helpers/__init__.py rename to trains/community/sabnzbd/1.0.7/migrations/migration_helpers/__init__.py diff --git a/trains/community/sabnzbd/1.0.6/migrations/migration_helpers/cpu.py b/trains/community/sabnzbd/1.0.7/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/sabnzbd/1.0.6/migrations/migration_helpers/cpu.py rename to trains/community/sabnzbd/1.0.7/migrations/migration_helpers/cpu.py diff --git a/trains/community/sabnzbd/1.0.6/migrations/migration_helpers/dns_config.py b/trains/community/sabnzbd/1.0.7/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/sabnzbd/1.0.6/migrations/migration_helpers/dns_config.py rename to trains/community/sabnzbd/1.0.7/migrations/migration_helpers/dns_config.py diff --git a/trains/community/sabnzbd/1.0.6/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/sabnzbd/1.0.7/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/sabnzbd/1.0.6/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/sabnzbd/1.0.7/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/sabnzbd/1.0.6/migrations/migration_helpers/memory.py b/trains/community/sabnzbd/1.0.7/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/sabnzbd/1.0.6/migrations/migration_helpers/memory.py rename to trains/community/sabnzbd/1.0.7/migrations/migration_helpers/memory.py diff --git a/trains/community/sabnzbd/1.0.6/migrations/migration_helpers/resources.py b/trains/community/sabnzbd/1.0.7/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/sabnzbd/1.0.6/migrations/migration_helpers/resources.py rename to trains/community/sabnzbd/1.0.7/migrations/migration_helpers/resources.py diff --git a/trains/community/sabnzbd/1.0.6/migrations/migration_helpers/storage.py b/trains/community/sabnzbd/1.0.7/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/sabnzbd/1.0.6/migrations/migration_helpers/storage.py rename to trains/community/sabnzbd/1.0.7/migrations/migration_helpers/storage.py diff --git a/trains/community/sabnzbd/1.0.6/questions.yaml b/trains/community/sabnzbd/1.0.7/questions.yaml similarity index 100% rename from trains/community/sabnzbd/1.0.6/questions.yaml rename to trains/community/sabnzbd/1.0.7/questions.yaml diff --git a/trains/community/sabnzbd/1.0.6/templates/docker-compose.yaml b/trains/community/sabnzbd/1.0.7/templates/docker-compose.yaml similarity index 100% rename from trains/community/sabnzbd/1.0.6/templates/docker-compose.yaml rename to trains/community/sabnzbd/1.0.7/templates/docker-compose.yaml diff --git a/trains/community/sabnzbd/1.0.6/templates/library/base_v1_1_3/__init__.py b/trains/community/sabnzbd/1.0.7/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/sabnzbd/1.0.6/templates/library/base_v1_1_3/__init__.py rename to trains/community/sabnzbd/1.0.7/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/sabnzbd/1.0.6/templates/library/base_v1_1_3/environment.py b/trains/community/sabnzbd/1.0.7/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/sabnzbd/1.0.6/templates/library/base_v1_1_3/environment.py rename to trains/community/sabnzbd/1.0.7/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/sabnzbd/1.0.7/templates/library/base_v1_1_4/healthchecks.py b/trains/community/sabnzbd/1.0.7/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/community/sabnzbd/1.0.7/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/sabnzbd/1.0.6/templates/library/base_v1_1_3/mariadb.py b/trains/community/sabnzbd/1.0.7/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/sabnzbd/1.0.6/templates/library/base_v1_1_3/mariadb.py rename to trains/community/sabnzbd/1.0.7/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/sabnzbd/1.0.6/templates/library/base_v1_1_3/metadata.py b/trains/community/sabnzbd/1.0.7/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/sabnzbd/1.0.6/templates/library/base_v1_1_3/metadata.py rename to trains/community/sabnzbd/1.0.7/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/sabnzbd/1.0.6/templates/library/base_v1_1_3/network.py b/trains/community/sabnzbd/1.0.7/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/sabnzbd/1.0.6/templates/library/base_v1_1_3/network.py rename to trains/community/sabnzbd/1.0.7/templates/library/base_v1_1_4/network.py diff --git a/trains/community/sabnzbd/1.0.7/templates/library/base_v1_1_4/permissions.py b/trains/community/sabnzbd/1.0.7/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/community/sabnzbd/1.0.7/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/community/sabnzbd/1.0.6/templates/library/base_v1_1_3/ports.py b/trains/community/sabnzbd/1.0.7/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/sabnzbd/1.0.6/templates/library/base_v1_1_3/ports.py rename to trains/community/sabnzbd/1.0.7/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/sabnzbd/1.0.6/templates/library/base_v1_1_3/postgres.py b/trains/community/sabnzbd/1.0.7/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/sabnzbd/1.0.6/templates/library/base_v1_1_3/postgres.py rename to trains/community/sabnzbd/1.0.7/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/sabnzbd/1.0.6/templates/library/base_v1_1_3/redis.py b/trains/community/sabnzbd/1.0.7/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/sabnzbd/1.0.6/templates/library/base_v1_1_3/redis.py rename to trains/community/sabnzbd/1.0.7/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/sabnzbd/1.0.6/templates/library/base_v1_1_3/resources.py b/trains/community/sabnzbd/1.0.7/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/sabnzbd/1.0.6/templates/library/base_v1_1_3/resources.py rename to trains/community/sabnzbd/1.0.7/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/sabnzbd/1.0.6/templates/library/base_v1_1_3/security.py b/trains/community/sabnzbd/1.0.7/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/sabnzbd/1.0.6/templates/library/base_v1_1_3/security.py rename to trains/community/sabnzbd/1.0.7/templates/library/base_v1_1_4/security.py diff --git a/trains/community/sabnzbd/1.0.6/templates/library/base_v1_1_3/storage.py b/trains/community/sabnzbd/1.0.7/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/sabnzbd/1.0.6/templates/library/base_v1_1_3/storage.py rename to trains/community/sabnzbd/1.0.7/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/sabnzbd/1.0.6/templates/library/base_v1_1_3/utils.py b/trains/community/sabnzbd/1.0.7/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/sabnzbd/1.0.6/templates/library/base_v1_1_3/utils.py rename to trains/community/sabnzbd/1.0.7/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/sabnzbd/1.0.6/templates/test_values/basic-values.yaml b/trains/community/sabnzbd/1.0.7/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/sabnzbd/1.0.6/templates/test_values/basic-values.yaml rename to trains/community/sabnzbd/1.0.7/templates/test_values/basic-values.yaml diff --git a/trains/community/searxng/1.0.15/templates/library/base_v1_1_3/healthchecks.py b/trains/community/searxng/1.0.15/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/community/searxng/1.0.15/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/searxng/1.0.15/templates/library/base_v1_1_3/permissions.py b/trains/community/searxng/1.0.15/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/community/searxng/1.0.15/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/community/searxng/1.0.15/README.md b/trains/community/searxng/1.0.16/README.md similarity index 100% rename from trains/community/searxng/1.0.15/README.md rename to trains/community/searxng/1.0.16/README.md diff --git a/trains/community/searxng/1.0.15/app.yaml b/trains/community/searxng/1.0.16/app.yaml similarity index 87% rename from trains/community/searxng/1.0.15/app.yaml rename to trains/community/searxng/1.0.16/app.yaml index 1c83a3ece4..2e1078f4f5 100644 --- a/trains/community/searxng/1.0.15/app.yaml +++ b/trains/community/searxng/1.0.16/app.yaml @@ -12,8 +12,8 @@ host_mounts: [] icon: https://media.sys.truenas.net/apps/searxng/icons/icon.svg keywords: - search -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -31,4 +31,4 @@ sources: - https://github.com/searxng/searxng title: SearXNG train: community -version: 1.0.15 +version: 1.0.16 diff --git a/trains/community/searxng/1.0.15/ix_values.yaml b/trains/community/searxng/1.0.16/ix_values.yaml similarity index 100% rename from trains/community/searxng/1.0.15/ix_values.yaml rename to trains/community/searxng/1.0.16/ix_values.yaml diff --git a/trains/community/searxng/1.0.15/migrations/migrate_from_kubernetes b/trains/community/searxng/1.0.16/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/searxng/1.0.15/migrations/migrate_from_kubernetes rename to trains/community/searxng/1.0.16/migrations/migrate_from_kubernetes diff --git a/trains/community/searxng/1.0.15/migrations/migration_helpers/__init__.py b/trains/community/searxng/1.0.16/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/searxng/1.0.15/migrations/migration_helpers/__init__.py rename to trains/community/searxng/1.0.16/migrations/migration_helpers/__init__.py diff --git a/trains/community/searxng/1.0.15/migrations/migration_helpers/cpu.py b/trains/community/searxng/1.0.16/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/searxng/1.0.15/migrations/migration_helpers/cpu.py rename to trains/community/searxng/1.0.16/migrations/migration_helpers/cpu.py diff --git a/trains/community/searxng/1.0.15/migrations/migration_helpers/dns_config.py b/trains/community/searxng/1.0.16/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/searxng/1.0.15/migrations/migration_helpers/dns_config.py rename to trains/community/searxng/1.0.16/migrations/migration_helpers/dns_config.py diff --git a/trains/community/searxng/1.0.15/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/searxng/1.0.16/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/searxng/1.0.15/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/searxng/1.0.16/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/searxng/1.0.15/migrations/migration_helpers/memory.py b/trains/community/searxng/1.0.16/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/searxng/1.0.15/migrations/migration_helpers/memory.py rename to trains/community/searxng/1.0.16/migrations/migration_helpers/memory.py diff --git a/trains/community/searxng/1.0.15/migrations/migration_helpers/resources.py b/trains/community/searxng/1.0.16/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/searxng/1.0.15/migrations/migration_helpers/resources.py rename to trains/community/searxng/1.0.16/migrations/migration_helpers/resources.py diff --git a/trains/community/searxng/1.0.15/migrations/migration_helpers/storage.py b/trains/community/searxng/1.0.16/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/searxng/1.0.15/migrations/migration_helpers/storage.py rename to trains/community/searxng/1.0.16/migrations/migration_helpers/storage.py diff --git a/trains/community/searxng/1.0.15/questions.yaml b/trains/community/searxng/1.0.16/questions.yaml similarity index 100% rename from trains/community/searxng/1.0.15/questions.yaml rename to trains/community/searxng/1.0.16/questions.yaml diff --git a/trains/community/searxng/1.0.15/templates/docker-compose.yaml b/trains/community/searxng/1.0.16/templates/docker-compose.yaml similarity index 100% rename from trains/community/searxng/1.0.15/templates/docker-compose.yaml rename to trains/community/searxng/1.0.16/templates/docker-compose.yaml diff --git a/trains/community/searxng/1.0.15/templates/library/base_v1_1_3/__init__.py b/trains/community/searxng/1.0.16/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/searxng/1.0.15/templates/library/base_v1_1_3/__init__.py rename to trains/community/searxng/1.0.16/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/searxng/1.0.15/templates/library/base_v1_1_3/environment.py b/trains/community/searxng/1.0.16/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/searxng/1.0.15/templates/library/base_v1_1_3/environment.py rename to trains/community/searxng/1.0.16/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/searxng/1.0.16/templates/library/base_v1_1_4/healthchecks.py b/trains/community/searxng/1.0.16/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/community/searxng/1.0.16/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/searxng/1.0.15/templates/library/base_v1_1_3/mariadb.py b/trains/community/searxng/1.0.16/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/searxng/1.0.15/templates/library/base_v1_1_3/mariadb.py rename to trains/community/searxng/1.0.16/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/searxng/1.0.15/templates/library/base_v1_1_3/metadata.py b/trains/community/searxng/1.0.16/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/searxng/1.0.15/templates/library/base_v1_1_3/metadata.py rename to trains/community/searxng/1.0.16/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/searxng/1.0.15/templates/library/base_v1_1_3/network.py b/trains/community/searxng/1.0.16/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/searxng/1.0.15/templates/library/base_v1_1_3/network.py rename to trains/community/searxng/1.0.16/templates/library/base_v1_1_4/network.py diff --git a/trains/community/searxng/1.0.16/templates/library/base_v1_1_4/permissions.py b/trains/community/searxng/1.0.16/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/community/searxng/1.0.16/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/community/searxng/1.0.15/templates/library/base_v1_1_3/ports.py b/trains/community/searxng/1.0.16/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/searxng/1.0.15/templates/library/base_v1_1_3/ports.py rename to trains/community/searxng/1.0.16/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/searxng/1.0.15/templates/library/base_v1_1_3/postgres.py b/trains/community/searxng/1.0.16/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/searxng/1.0.15/templates/library/base_v1_1_3/postgres.py rename to trains/community/searxng/1.0.16/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/searxng/1.0.15/templates/library/base_v1_1_3/redis.py b/trains/community/searxng/1.0.16/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/searxng/1.0.15/templates/library/base_v1_1_3/redis.py rename to trains/community/searxng/1.0.16/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/searxng/1.0.15/templates/library/base_v1_1_3/resources.py b/trains/community/searxng/1.0.16/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/searxng/1.0.15/templates/library/base_v1_1_3/resources.py rename to trains/community/searxng/1.0.16/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/searxng/1.0.15/templates/library/base_v1_1_3/security.py b/trains/community/searxng/1.0.16/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/searxng/1.0.15/templates/library/base_v1_1_3/security.py rename to trains/community/searxng/1.0.16/templates/library/base_v1_1_4/security.py diff --git a/trains/community/searxng/1.0.15/templates/library/base_v1_1_3/storage.py b/trains/community/searxng/1.0.16/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/searxng/1.0.15/templates/library/base_v1_1_3/storage.py rename to trains/community/searxng/1.0.16/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/searxng/1.0.15/templates/library/base_v1_1_3/utils.py b/trains/community/searxng/1.0.16/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/searxng/1.0.15/templates/library/base_v1_1_3/utils.py rename to trains/community/searxng/1.0.16/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/searxng/1.0.15/templates/test_values/basic-values.yaml b/trains/community/searxng/1.0.16/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/searxng/1.0.15/templates/test_values/basic-values.yaml rename to trains/community/searxng/1.0.16/templates/test_values/basic-values.yaml diff --git a/trains/community/sftpgo/1.0.6/templates/library/base_v1_1_3/healthchecks.py b/trains/community/sftpgo/1.0.6/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/community/sftpgo/1.0.6/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/sftpgo/1.0.6/templates/library/base_v1_1_3/permissions.py b/trains/community/sftpgo/1.0.6/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/community/sftpgo/1.0.6/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/community/sftpgo/1.0.6/README.md b/trains/community/sftpgo/1.0.7/README.md similarity index 100% rename from trains/community/sftpgo/1.0.6/README.md rename to trains/community/sftpgo/1.0.7/README.md diff --git a/trains/community/sftpgo/1.0.6/app.yaml b/trains/community/sftpgo/1.0.7/app.yaml similarity index 86% rename from trains/community/sftpgo/1.0.6/app.yaml rename to trains/community/sftpgo/1.0.7/app.yaml index 8f274b09d7..a6d43ce69e 100644 --- a/trains/community/sftpgo/1.0.6/app.yaml +++ b/trains/community/sftpgo/1.0.7/app.yaml @@ -9,8 +9,8 @@ host_mounts: [] icon: https://media.sys.truenas.net/apps/sftpgo/icons/icon.png keywords: - sftp -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -28,4 +28,4 @@ sources: - https://github.com/drakkan/sftpgo title: SFTPGo train: community -version: 1.0.6 +version: 1.0.7 diff --git a/trains/community/sftpgo/1.0.6/ix_values.yaml b/trains/community/sftpgo/1.0.7/ix_values.yaml similarity index 100% rename from trains/community/sftpgo/1.0.6/ix_values.yaml rename to trains/community/sftpgo/1.0.7/ix_values.yaml diff --git a/trains/community/sftpgo/1.0.6/migrations/migrate_from_kubernetes b/trains/community/sftpgo/1.0.7/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/sftpgo/1.0.6/migrations/migrate_from_kubernetes rename to trains/community/sftpgo/1.0.7/migrations/migrate_from_kubernetes diff --git a/trains/community/sftpgo/1.0.6/migrations/migration_helpers/__init__.py b/trains/community/sftpgo/1.0.7/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/sftpgo/1.0.6/migrations/migration_helpers/__init__.py rename to trains/community/sftpgo/1.0.7/migrations/migration_helpers/__init__.py diff --git a/trains/community/sftpgo/1.0.6/migrations/migration_helpers/cpu.py b/trains/community/sftpgo/1.0.7/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/sftpgo/1.0.6/migrations/migration_helpers/cpu.py rename to trains/community/sftpgo/1.0.7/migrations/migration_helpers/cpu.py diff --git a/trains/community/sftpgo/1.0.6/migrations/migration_helpers/dns_config.py b/trains/community/sftpgo/1.0.7/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/sftpgo/1.0.6/migrations/migration_helpers/dns_config.py rename to trains/community/sftpgo/1.0.7/migrations/migration_helpers/dns_config.py diff --git a/trains/community/sftpgo/1.0.6/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/sftpgo/1.0.7/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/sftpgo/1.0.6/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/sftpgo/1.0.7/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/sftpgo/1.0.6/migrations/migration_helpers/memory.py b/trains/community/sftpgo/1.0.7/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/sftpgo/1.0.6/migrations/migration_helpers/memory.py rename to trains/community/sftpgo/1.0.7/migrations/migration_helpers/memory.py diff --git a/trains/community/sftpgo/1.0.6/migrations/migration_helpers/resources.py b/trains/community/sftpgo/1.0.7/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/sftpgo/1.0.6/migrations/migration_helpers/resources.py rename to trains/community/sftpgo/1.0.7/migrations/migration_helpers/resources.py diff --git a/trains/community/sftpgo/1.0.6/migrations/migration_helpers/storage.py b/trains/community/sftpgo/1.0.7/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/sftpgo/1.0.6/migrations/migration_helpers/storage.py rename to trains/community/sftpgo/1.0.7/migrations/migration_helpers/storage.py diff --git a/trains/community/sftpgo/1.0.6/questions.yaml b/trains/community/sftpgo/1.0.7/questions.yaml similarity index 100% rename from trains/community/sftpgo/1.0.6/questions.yaml rename to trains/community/sftpgo/1.0.7/questions.yaml diff --git a/trains/community/sftpgo/1.0.6/templates/docker-compose.yaml b/trains/community/sftpgo/1.0.7/templates/docker-compose.yaml similarity index 100% rename from trains/community/sftpgo/1.0.6/templates/docker-compose.yaml rename to trains/community/sftpgo/1.0.7/templates/docker-compose.yaml diff --git a/trains/community/sftpgo/1.0.6/templates/library/base_v1_1_3/__init__.py b/trains/community/sftpgo/1.0.7/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/sftpgo/1.0.6/templates/library/base_v1_1_3/__init__.py rename to trains/community/sftpgo/1.0.7/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/sftpgo/1.0.6/templates/library/base_v1_1_3/environment.py b/trains/community/sftpgo/1.0.7/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/sftpgo/1.0.6/templates/library/base_v1_1_3/environment.py rename to trains/community/sftpgo/1.0.7/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/sftpgo/1.0.7/templates/library/base_v1_1_4/healthchecks.py b/trains/community/sftpgo/1.0.7/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/community/sftpgo/1.0.7/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/sftpgo/1.0.6/templates/library/base_v1_1_3/mariadb.py b/trains/community/sftpgo/1.0.7/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/sftpgo/1.0.6/templates/library/base_v1_1_3/mariadb.py rename to trains/community/sftpgo/1.0.7/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/sftpgo/1.0.6/templates/library/base_v1_1_3/metadata.py b/trains/community/sftpgo/1.0.7/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/sftpgo/1.0.6/templates/library/base_v1_1_3/metadata.py rename to trains/community/sftpgo/1.0.7/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/sftpgo/1.0.6/templates/library/base_v1_1_3/network.py b/trains/community/sftpgo/1.0.7/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/sftpgo/1.0.6/templates/library/base_v1_1_3/network.py rename to trains/community/sftpgo/1.0.7/templates/library/base_v1_1_4/network.py diff --git a/trains/community/sftpgo/1.0.7/templates/library/base_v1_1_4/permissions.py b/trains/community/sftpgo/1.0.7/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/community/sftpgo/1.0.7/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/community/sftpgo/1.0.6/templates/library/base_v1_1_3/ports.py b/trains/community/sftpgo/1.0.7/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/sftpgo/1.0.6/templates/library/base_v1_1_3/ports.py rename to trains/community/sftpgo/1.0.7/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/sftpgo/1.0.6/templates/library/base_v1_1_3/postgres.py b/trains/community/sftpgo/1.0.7/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/sftpgo/1.0.6/templates/library/base_v1_1_3/postgres.py rename to trains/community/sftpgo/1.0.7/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/sftpgo/1.0.6/templates/library/base_v1_1_3/redis.py b/trains/community/sftpgo/1.0.7/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/sftpgo/1.0.6/templates/library/base_v1_1_3/redis.py rename to trains/community/sftpgo/1.0.7/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/sftpgo/1.0.6/templates/library/base_v1_1_3/resources.py b/trains/community/sftpgo/1.0.7/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/sftpgo/1.0.6/templates/library/base_v1_1_3/resources.py rename to trains/community/sftpgo/1.0.7/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/sftpgo/1.0.6/templates/library/base_v1_1_3/security.py b/trains/community/sftpgo/1.0.7/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/sftpgo/1.0.6/templates/library/base_v1_1_3/security.py rename to trains/community/sftpgo/1.0.7/templates/library/base_v1_1_4/security.py diff --git a/trains/community/sftpgo/1.0.6/templates/library/base_v1_1_3/storage.py b/trains/community/sftpgo/1.0.7/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/sftpgo/1.0.6/templates/library/base_v1_1_3/storage.py rename to trains/community/sftpgo/1.0.7/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/sftpgo/1.0.6/templates/library/base_v1_1_3/utils.py b/trains/community/sftpgo/1.0.7/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/sftpgo/1.0.6/templates/library/base_v1_1_3/utils.py rename to trains/community/sftpgo/1.0.7/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/sftpgo/1.0.6/templates/test_values/basic-values.yaml b/trains/community/sftpgo/1.0.7/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/sftpgo/1.0.6/templates/test_values/basic-values.yaml rename to trains/community/sftpgo/1.0.7/templates/test_values/basic-values.yaml diff --git a/trains/community/sftpgo/1.0.6/templates/test_values/https-values.yaml b/trains/community/sftpgo/1.0.7/templates/test_values/https-values.yaml similarity index 100% rename from trains/community/sftpgo/1.0.6/templates/test_values/https-values.yaml rename to trains/community/sftpgo/1.0.7/templates/test_values/https-values.yaml diff --git a/trains/community/sftpgo/1.0.6/templates/test_values/plugins-values.yaml b/trains/community/sftpgo/1.0.7/templates/test_values/plugins-values.yaml similarity index 100% rename from trains/community/sftpgo/1.0.6/templates/test_values/plugins-values.yaml rename to trains/community/sftpgo/1.0.7/templates/test_values/plugins-values.yaml diff --git a/trains/community/sonarr/1.0.18/templates/library/base_v1_1_3/healthchecks.py b/trains/community/sonarr/1.0.18/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/community/sonarr/1.0.18/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/sonarr/1.0.18/templates/library/base_v1_1_3/permissions.py b/trains/community/sonarr/1.0.18/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/community/sonarr/1.0.18/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/community/sonarr/1.0.18/README.md b/trains/community/sonarr/1.0.19/README.md similarity index 100% rename from trains/community/sonarr/1.0.18/README.md rename to trains/community/sonarr/1.0.19/README.md diff --git a/trains/community/sonarr/1.0.18/app.yaml b/trains/community/sonarr/1.0.19/app.yaml similarity index 87% rename from trains/community/sonarr/1.0.18/app.yaml rename to trains/community/sonarr/1.0.19/app.yaml index b17d0ff8ed..3af2babe7b 100644 --- a/trains/community/sonarr/1.0.18/app.yaml +++ b/trains/community/sonarr/1.0.19/app.yaml @@ -9,8 +9,8 @@ icon: https://media.sys.truenas.net/apps/sonarr/icons/icon.png keywords: - media - series -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -31,4 +31,4 @@ sources: - https://github.com/Sonarr/Sonarr title: Sonarr train: community -version: 1.0.18 +version: 1.0.19 diff --git a/trains/community/sonarr/1.0.18/ix_values.yaml b/trains/community/sonarr/1.0.19/ix_values.yaml similarity index 100% rename from trains/community/sonarr/1.0.18/ix_values.yaml rename to trains/community/sonarr/1.0.19/ix_values.yaml diff --git a/trains/community/sonarr/1.0.18/migrations/migrate_from_kubernetes b/trains/community/sonarr/1.0.19/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/sonarr/1.0.18/migrations/migrate_from_kubernetes rename to trains/community/sonarr/1.0.19/migrations/migrate_from_kubernetes diff --git a/trains/community/sonarr/1.0.18/migrations/migration_helpers/__init__.py b/trains/community/sonarr/1.0.19/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/sonarr/1.0.18/migrations/migration_helpers/__init__.py rename to trains/community/sonarr/1.0.19/migrations/migration_helpers/__init__.py diff --git a/trains/community/sonarr/1.0.18/migrations/migration_helpers/cpu.py b/trains/community/sonarr/1.0.19/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/sonarr/1.0.18/migrations/migration_helpers/cpu.py rename to trains/community/sonarr/1.0.19/migrations/migration_helpers/cpu.py diff --git a/trains/community/sonarr/1.0.18/migrations/migration_helpers/dns_config.py b/trains/community/sonarr/1.0.19/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/sonarr/1.0.18/migrations/migration_helpers/dns_config.py rename to trains/community/sonarr/1.0.19/migrations/migration_helpers/dns_config.py diff --git a/trains/community/sonarr/1.0.18/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/sonarr/1.0.19/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/sonarr/1.0.18/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/sonarr/1.0.19/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/sonarr/1.0.18/migrations/migration_helpers/memory.py b/trains/community/sonarr/1.0.19/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/sonarr/1.0.18/migrations/migration_helpers/memory.py rename to trains/community/sonarr/1.0.19/migrations/migration_helpers/memory.py diff --git a/trains/community/sonarr/1.0.18/migrations/migration_helpers/resources.py b/trains/community/sonarr/1.0.19/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/sonarr/1.0.18/migrations/migration_helpers/resources.py rename to trains/community/sonarr/1.0.19/migrations/migration_helpers/resources.py diff --git a/trains/community/sonarr/1.0.18/migrations/migration_helpers/storage.py b/trains/community/sonarr/1.0.19/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/sonarr/1.0.18/migrations/migration_helpers/storage.py rename to trains/community/sonarr/1.0.19/migrations/migration_helpers/storage.py diff --git a/trains/community/sonarr/1.0.18/questions.yaml b/trains/community/sonarr/1.0.19/questions.yaml similarity index 100% rename from trains/community/sonarr/1.0.18/questions.yaml rename to trains/community/sonarr/1.0.19/questions.yaml diff --git a/trains/community/sonarr/1.0.18/templates/docker-compose.yaml b/trains/community/sonarr/1.0.19/templates/docker-compose.yaml similarity index 100% rename from trains/community/sonarr/1.0.18/templates/docker-compose.yaml rename to trains/community/sonarr/1.0.19/templates/docker-compose.yaml diff --git a/trains/community/sonarr/1.0.18/templates/library/base_v1_1_3/__init__.py b/trains/community/sonarr/1.0.19/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/sonarr/1.0.18/templates/library/base_v1_1_3/__init__.py rename to trains/community/sonarr/1.0.19/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/sonarr/1.0.18/templates/library/base_v1_1_3/environment.py b/trains/community/sonarr/1.0.19/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/sonarr/1.0.18/templates/library/base_v1_1_3/environment.py rename to trains/community/sonarr/1.0.19/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/sonarr/1.0.19/templates/library/base_v1_1_4/healthchecks.py b/trains/community/sonarr/1.0.19/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/community/sonarr/1.0.19/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/sonarr/1.0.18/templates/library/base_v1_1_3/mariadb.py b/trains/community/sonarr/1.0.19/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/sonarr/1.0.18/templates/library/base_v1_1_3/mariadb.py rename to trains/community/sonarr/1.0.19/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/sonarr/1.0.18/templates/library/base_v1_1_3/metadata.py b/trains/community/sonarr/1.0.19/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/sonarr/1.0.18/templates/library/base_v1_1_3/metadata.py rename to trains/community/sonarr/1.0.19/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/sonarr/1.0.18/templates/library/base_v1_1_3/network.py b/trains/community/sonarr/1.0.19/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/sonarr/1.0.18/templates/library/base_v1_1_3/network.py rename to trains/community/sonarr/1.0.19/templates/library/base_v1_1_4/network.py diff --git a/trains/community/sonarr/1.0.19/templates/library/base_v1_1_4/permissions.py b/trains/community/sonarr/1.0.19/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/community/sonarr/1.0.19/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/community/sonarr/1.0.18/templates/library/base_v1_1_3/ports.py b/trains/community/sonarr/1.0.19/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/sonarr/1.0.18/templates/library/base_v1_1_3/ports.py rename to trains/community/sonarr/1.0.19/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/sonarr/1.0.18/templates/library/base_v1_1_3/postgres.py b/trains/community/sonarr/1.0.19/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/sonarr/1.0.18/templates/library/base_v1_1_3/postgres.py rename to trains/community/sonarr/1.0.19/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/sonarr/1.0.18/templates/library/base_v1_1_3/redis.py b/trains/community/sonarr/1.0.19/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/sonarr/1.0.18/templates/library/base_v1_1_3/redis.py rename to trains/community/sonarr/1.0.19/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/sonarr/1.0.18/templates/library/base_v1_1_3/resources.py b/trains/community/sonarr/1.0.19/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/sonarr/1.0.18/templates/library/base_v1_1_3/resources.py rename to trains/community/sonarr/1.0.19/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/sonarr/1.0.18/templates/library/base_v1_1_3/security.py b/trains/community/sonarr/1.0.19/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/sonarr/1.0.18/templates/library/base_v1_1_3/security.py rename to trains/community/sonarr/1.0.19/templates/library/base_v1_1_4/security.py diff --git a/trains/community/sonarr/1.0.18/templates/library/base_v1_1_3/storage.py b/trains/community/sonarr/1.0.19/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/sonarr/1.0.18/templates/library/base_v1_1_3/storage.py rename to trains/community/sonarr/1.0.19/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/sonarr/1.0.18/templates/library/base_v1_1_3/utils.py b/trains/community/sonarr/1.0.19/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/sonarr/1.0.18/templates/library/base_v1_1_3/utils.py rename to trains/community/sonarr/1.0.19/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/sonarr/1.0.18/templates/test_values/basic-values.yaml b/trains/community/sonarr/1.0.19/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/sonarr/1.0.18/templates/test_values/basic-values.yaml rename to trains/community/sonarr/1.0.19/templates/test_values/basic-values.yaml diff --git a/trains/community/tailscale/1.1.14/templates/library/base_v1_1_3/healthchecks.py b/trains/community/tailscale/1.1.14/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/community/tailscale/1.1.14/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/tailscale/1.1.14/templates/library/base_v1_1_3/permissions.py b/trains/community/tailscale/1.1.14/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/community/tailscale/1.1.14/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/community/tailscale/1.1.14/README.md b/trains/community/tailscale/1.1.15/README.md similarity index 100% rename from trains/community/tailscale/1.1.14/README.md rename to trains/community/tailscale/1.1.15/README.md diff --git a/trains/community/tailscale/1.1.14/app.yaml b/trains/community/tailscale/1.1.15/app.yaml similarity index 90% rename from trains/community/tailscale/1.1.14/app.yaml rename to trains/community/tailscale/1.1.15/app.yaml index e208c56025..eb27eee6bc 100644 --- a/trains/community/tailscale/1.1.14/app.yaml +++ b/trains/community/tailscale/1.1.15/app.yaml @@ -23,8 +23,8 @@ icon: https://media.sys.truenas.net/apps/tailscale/icons/icon.png keywords: - vpn - tailscale -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -42,4 +42,4 @@ sources: - https://hub.docker.com/r/tailscale/tailscale title: Tailscale train: community -version: 1.1.14 +version: 1.1.15 diff --git a/trains/community/tailscale/1.1.14/ix_values.yaml b/trains/community/tailscale/1.1.15/ix_values.yaml similarity index 100% rename from trains/community/tailscale/1.1.14/ix_values.yaml rename to trains/community/tailscale/1.1.15/ix_values.yaml diff --git a/trains/community/tailscale/1.1.14/migrations/migrate_from_kubernetes b/trains/community/tailscale/1.1.15/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/tailscale/1.1.14/migrations/migrate_from_kubernetes rename to trains/community/tailscale/1.1.15/migrations/migrate_from_kubernetes diff --git a/trains/community/tailscale/1.1.14/migrations/migration_helpers/__init__.py b/trains/community/tailscale/1.1.15/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/tailscale/1.1.14/migrations/migration_helpers/__init__.py rename to trains/community/tailscale/1.1.15/migrations/migration_helpers/__init__.py diff --git a/trains/community/tailscale/1.1.14/migrations/migration_helpers/cpu.py b/trains/community/tailscale/1.1.15/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/tailscale/1.1.14/migrations/migration_helpers/cpu.py rename to trains/community/tailscale/1.1.15/migrations/migration_helpers/cpu.py diff --git a/trains/community/tailscale/1.1.14/migrations/migration_helpers/dns_config.py b/trains/community/tailscale/1.1.15/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/tailscale/1.1.14/migrations/migration_helpers/dns_config.py rename to trains/community/tailscale/1.1.15/migrations/migration_helpers/dns_config.py diff --git a/trains/community/tailscale/1.1.14/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/tailscale/1.1.15/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/tailscale/1.1.14/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/tailscale/1.1.15/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/tailscale/1.1.14/migrations/migration_helpers/memory.py b/trains/community/tailscale/1.1.15/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/tailscale/1.1.14/migrations/migration_helpers/memory.py rename to trains/community/tailscale/1.1.15/migrations/migration_helpers/memory.py diff --git a/trains/community/tailscale/1.1.14/migrations/migration_helpers/resources.py b/trains/community/tailscale/1.1.15/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/tailscale/1.1.14/migrations/migration_helpers/resources.py rename to trains/community/tailscale/1.1.15/migrations/migration_helpers/resources.py diff --git a/trains/community/tailscale/1.1.14/migrations/migration_helpers/storage.py b/trains/community/tailscale/1.1.15/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/tailscale/1.1.14/migrations/migration_helpers/storage.py rename to trains/community/tailscale/1.1.15/migrations/migration_helpers/storage.py diff --git a/trains/community/tailscale/1.1.14/questions.yaml b/trains/community/tailscale/1.1.15/questions.yaml similarity index 100% rename from trains/community/tailscale/1.1.14/questions.yaml rename to trains/community/tailscale/1.1.15/questions.yaml diff --git a/trains/community/tailscale/1.1.14/templates/docker-compose.yaml b/trains/community/tailscale/1.1.15/templates/docker-compose.yaml similarity index 100% rename from trains/community/tailscale/1.1.14/templates/docker-compose.yaml rename to trains/community/tailscale/1.1.15/templates/docker-compose.yaml diff --git a/trains/community/tailscale/1.1.14/templates/library/base_v1_1_3/__init__.py b/trains/community/tailscale/1.1.15/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/tailscale/1.1.14/templates/library/base_v1_1_3/__init__.py rename to trains/community/tailscale/1.1.15/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/tailscale/1.1.14/templates/library/base_v1_1_3/environment.py b/trains/community/tailscale/1.1.15/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/tailscale/1.1.14/templates/library/base_v1_1_3/environment.py rename to trains/community/tailscale/1.1.15/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/tailscale/1.1.15/templates/library/base_v1_1_4/healthchecks.py b/trains/community/tailscale/1.1.15/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/community/tailscale/1.1.15/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/tailscale/1.1.14/templates/library/base_v1_1_3/mariadb.py b/trains/community/tailscale/1.1.15/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/tailscale/1.1.14/templates/library/base_v1_1_3/mariadb.py rename to trains/community/tailscale/1.1.15/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/tailscale/1.1.14/templates/library/base_v1_1_3/metadata.py b/trains/community/tailscale/1.1.15/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/tailscale/1.1.14/templates/library/base_v1_1_3/metadata.py rename to trains/community/tailscale/1.1.15/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/tailscale/1.1.14/templates/library/base_v1_1_3/network.py b/trains/community/tailscale/1.1.15/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/tailscale/1.1.14/templates/library/base_v1_1_3/network.py rename to trains/community/tailscale/1.1.15/templates/library/base_v1_1_4/network.py diff --git a/trains/community/tailscale/1.1.15/templates/library/base_v1_1_4/permissions.py b/trains/community/tailscale/1.1.15/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/community/tailscale/1.1.15/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/community/tailscale/1.1.14/templates/library/base_v1_1_3/ports.py b/trains/community/tailscale/1.1.15/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/tailscale/1.1.14/templates/library/base_v1_1_3/ports.py rename to trains/community/tailscale/1.1.15/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/tailscale/1.1.14/templates/library/base_v1_1_3/postgres.py b/trains/community/tailscale/1.1.15/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/tailscale/1.1.14/templates/library/base_v1_1_3/postgres.py rename to trains/community/tailscale/1.1.15/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/tailscale/1.1.14/templates/library/base_v1_1_3/redis.py b/trains/community/tailscale/1.1.15/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/tailscale/1.1.14/templates/library/base_v1_1_3/redis.py rename to trains/community/tailscale/1.1.15/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/tailscale/1.1.14/templates/library/base_v1_1_3/resources.py b/trains/community/tailscale/1.1.15/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/tailscale/1.1.14/templates/library/base_v1_1_3/resources.py rename to trains/community/tailscale/1.1.15/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/tailscale/1.1.14/templates/library/base_v1_1_3/security.py b/trains/community/tailscale/1.1.15/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/tailscale/1.1.14/templates/library/base_v1_1_3/security.py rename to trains/community/tailscale/1.1.15/templates/library/base_v1_1_4/security.py diff --git a/trains/community/tailscale/1.1.14/templates/library/base_v1_1_3/storage.py b/trains/community/tailscale/1.1.15/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/tailscale/1.1.14/templates/library/base_v1_1_3/storage.py rename to trains/community/tailscale/1.1.15/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/tailscale/1.1.14/templates/library/base_v1_1_3/utils.py b/trains/community/tailscale/1.1.15/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/tailscale/1.1.14/templates/library/base_v1_1_3/utils.py rename to trains/community/tailscale/1.1.15/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/tailscale/1.1.14/templates/library/community/tailscale/v1_1_14/util.py b/trains/community/tailscale/1.1.15/templates/library/community/tailscale/v1_1_15/util.py similarity index 93% rename from trains/community/tailscale/1.1.14/templates/library/community/tailscale/v1_1_14/util.py rename to trains/community/tailscale/1.1.15/templates/library/community/tailscale/v1_1_15/util.py index 505f3e72fc..c0ce1e2517 100644 --- a/trains/community/tailscale/1.1.14/templates/library/community/tailscale/v1_1_14/util.py +++ b/trains/community/tailscale/1.1.15/templates/library/community/tailscale/v1_1_15/util.py @@ -1,4 +1,4 @@ -from base_v1_1_3 import utils +from base_v1_1_4 import utils def get_args(data): diff --git a/trains/community/tailscale/1.1.14/templates/test_values/basic-values.yaml b/trains/community/tailscale/1.1.15/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/tailscale/1.1.14/templates/test_values/basic-values.yaml rename to trains/community/tailscale/1.1.15/templates/test_values/basic-values.yaml diff --git a/trains/community/tautulli/1.0.20/templates/library/base_v1_1_3/healthchecks.py b/trains/community/tautulli/1.0.20/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/community/tautulli/1.0.20/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/tautulli/1.0.20/templates/library/base_v1_1_3/permissions.py b/trains/community/tautulli/1.0.20/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/community/tautulli/1.0.20/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/community/tautulli/1.0.20/README.md b/trains/community/tautulli/1.0.21/README.md similarity index 100% rename from trains/community/tautulli/1.0.20/README.md rename to trains/community/tautulli/1.0.21/README.md diff --git a/trains/community/tautulli/1.0.20/app.yaml b/trains/community/tautulli/1.0.21/app.yaml similarity index 89% rename from trains/community/tautulli/1.0.20/app.yaml rename to trains/community/tautulli/1.0.21/app.yaml index 6129e268d9..a82e67cd97 100644 --- a/trains/community/tautulli/1.0.20/app.yaml +++ b/trains/community/tautulli/1.0.21/app.yaml @@ -11,8 +11,8 @@ keywords: - media - analytics - notifications -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -34,4 +34,4 @@ sources: - https://github.com/Tautulli/Tautulli title: Tautulli train: community -version: 1.0.20 +version: 1.0.21 diff --git a/trains/community/tautulli/1.0.20/ix_values.yaml b/trains/community/tautulli/1.0.21/ix_values.yaml similarity index 100% rename from trains/community/tautulli/1.0.20/ix_values.yaml rename to trains/community/tautulli/1.0.21/ix_values.yaml diff --git a/trains/community/tautulli/1.0.20/migrations/migrate_from_kubernetes b/trains/community/tautulli/1.0.21/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/tautulli/1.0.20/migrations/migrate_from_kubernetes rename to trains/community/tautulli/1.0.21/migrations/migrate_from_kubernetes diff --git a/trains/community/tautulli/1.0.20/migrations/migration_helpers/__init__.py b/trains/community/tautulli/1.0.21/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/tautulli/1.0.20/migrations/migration_helpers/__init__.py rename to trains/community/tautulli/1.0.21/migrations/migration_helpers/__init__.py diff --git a/trains/community/tautulli/1.0.20/migrations/migration_helpers/cpu.py b/trains/community/tautulli/1.0.21/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/tautulli/1.0.20/migrations/migration_helpers/cpu.py rename to trains/community/tautulli/1.0.21/migrations/migration_helpers/cpu.py diff --git a/trains/community/tautulli/1.0.20/migrations/migration_helpers/dns_config.py b/trains/community/tautulli/1.0.21/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/tautulli/1.0.20/migrations/migration_helpers/dns_config.py rename to trains/community/tautulli/1.0.21/migrations/migration_helpers/dns_config.py diff --git a/trains/community/tautulli/1.0.20/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/tautulli/1.0.21/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/tautulli/1.0.20/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/tautulli/1.0.21/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/tautulli/1.0.20/migrations/migration_helpers/memory.py b/trains/community/tautulli/1.0.21/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/tautulli/1.0.20/migrations/migration_helpers/memory.py rename to trains/community/tautulli/1.0.21/migrations/migration_helpers/memory.py diff --git a/trains/community/tautulli/1.0.20/migrations/migration_helpers/resources.py b/trains/community/tautulli/1.0.21/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/tautulli/1.0.20/migrations/migration_helpers/resources.py rename to trains/community/tautulli/1.0.21/migrations/migration_helpers/resources.py diff --git a/trains/community/tautulli/1.0.20/migrations/migration_helpers/storage.py b/trains/community/tautulli/1.0.21/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/tautulli/1.0.20/migrations/migration_helpers/storage.py rename to trains/community/tautulli/1.0.21/migrations/migration_helpers/storage.py diff --git a/trains/community/tautulli/1.0.20/questions.yaml b/trains/community/tautulli/1.0.21/questions.yaml similarity index 100% rename from trains/community/tautulli/1.0.20/questions.yaml rename to trains/community/tautulli/1.0.21/questions.yaml diff --git a/trains/community/tautulli/1.0.20/templates/docker-compose.yaml b/trains/community/tautulli/1.0.21/templates/docker-compose.yaml similarity index 100% rename from trains/community/tautulli/1.0.20/templates/docker-compose.yaml rename to trains/community/tautulli/1.0.21/templates/docker-compose.yaml diff --git a/trains/community/tautulli/1.0.20/templates/library/base_v1_1_3/__init__.py b/trains/community/tautulli/1.0.21/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/tautulli/1.0.20/templates/library/base_v1_1_3/__init__.py rename to trains/community/tautulli/1.0.21/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/tautulli/1.0.20/templates/library/base_v1_1_3/environment.py b/trains/community/tautulli/1.0.21/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/tautulli/1.0.20/templates/library/base_v1_1_3/environment.py rename to trains/community/tautulli/1.0.21/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/tautulli/1.0.21/templates/library/base_v1_1_4/healthchecks.py b/trains/community/tautulli/1.0.21/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/community/tautulli/1.0.21/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/tautulli/1.0.20/templates/library/base_v1_1_3/mariadb.py b/trains/community/tautulli/1.0.21/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/tautulli/1.0.20/templates/library/base_v1_1_3/mariadb.py rename to trains/community/tautulli/1.0.21/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/tautulli/1.0.20/templates/library/base_v1_1_3/metadata.py b/trains/community/tautulli/1.0.21/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/tautulli/1.0.20/templates/library/base_v1_1_3/metadata.py rename to trains/community/tautulli/1.0.21/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/tautulli/1.0.20/templates/library/base_v1_1_3/network.py b/trains/community/tautulli/1.0.21/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/tautulli/1.0.20/templates/library/base_v1_1_3/network.py rename to trains/community/tautulli/1.0.21/templates/library/base_v1_1_4/network.py diff --git a/trains/community/tautulli/1.0.21/templates/library/base_v1_1_4/permissions.py b/trains/community/tautulli/1.0.21/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/community/tautulli/1.0.21/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/community/tautulli/1.0.20/templates/library/base_v1_1_3/ports.py b/trains/community/tautulli/1.0.21/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/tautulli/1.0.20/templates/library/base_v1_1_3/ports.py rename to trains/community/tautulli/1.0.21/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/tautulli/1.0.20/templates/library/base_v1_1_3/postgres.py b/trains/community/tautulli/1.0.21/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/tautulli/1.0.20/templates/library/base_v1_1_3/postgres.py rename to trains/community/tautulli/1.0.21/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/tautulli/1.0.20/templates/library/base_v1_1_3/redis.py b/trains/community/tautulli/1.0.21/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/tautulli/1.0.20/templates/library/base_v1_1_3/redis.py rename to trains/community/tautulli/1.0.21/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/tautulli/1.0.20/templates/library/base_v1_1_3/resources.py b/trains/community/tautulli/1.0.21/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/tautulli/1.0.20/templates/library/base_v1_1_3/resources.py rename to trains/community/tautulli/1.0.21/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/tautulli/1.0.20/templates/library/base_v1_1_3/security.py b/trains/community/tautulli/1.0.21/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/tautulli/1.0.20/templates/library/base_v1_1_3/security.py rename to trains/community/tautulli/1.0.21/templates/library/base_v1_1_4/security.py diff --git a/trains/community/tautulli/1.0.20/templates/library/base_v1_1_3/storage.py b/trains/community/tautulli/1.0.21/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/tautulli/1.0.20/templates/library/base_v1_1_3/storage.py rename to trains/community/tautulli/1.0.21/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/tautulli/1.0.20/templates/library/base_v1_1_3/utils.py b/trains/community/tautulli/1.0.21/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/tautulli/1.0.20/templates/library/base_v1_1_3/utils.py rename to trains/community/tautulli/1.0.21/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/tautulli/1.0.20/templates/test_values/basic-values.yaml b/trains/community/tautulli/1.0.21/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/tautulli/1.0.20/templates/test_values/basic-values.yaml rename to trains/community/tautulli/1.0.21/templates/test_values/basic-values.yaml diff --git a/trains/community/tdarr/1.0.8/templates/library/base_v1_1_3/healthchecks.py b/trains/community/tdarr/1.0.8/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/community/tdarr/1.0.8/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/tdarr/1.0.8/templates/library/base_v1_1_3/permissions.py b/trains/community/tdarr/1.0.8/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/community/tdarr/1.0.8/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/community/tdarr/1.0.8/README.md b/trains/community/tdarr/1.0.9/README.md similarity index 100% rename from trains/community/tdarr/1.0.8/README.md rename to trains/community/tdarr/1.0.9/README.md diff --git a/trains/community/tdarr/1.0.8/app.yaml b/trains/community/tdarr/1.0.9/app.yaml similarity index 90% rename from trains/community/tdarr/1.0.8/app.yaml rename to trains/community/tdarr/1.0.9/app.yaml index ee056c546c..6112678eec 100644 --- a/trains/community/tdarr/1.0.8/app.yaml +++ b/trains/community/tdarr/1.0.9/app.yaml @@ -18,8 +18,8 @@ icon: https://media.sys.truenas.net/apps/tdarr/icons/icon.png keywords: - encode - transcode -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -40,4 +40,4 @@ sources: - https://docs.tdarr.io/docs title: Tdarr train: community -version: 1.0.8 +version: 1.0.9 diff --git a/trains/community/tdarr/1.0.8/ix_values.yaml b/trains/community/tdarr/1.0.9/ix_values.yaml similarity index 100% rename from trains/community/tdarr/1.0.8/ix_values.yaml rename to trains/community/tdarr/1.0.9/ix_values.yaml diff --git a/trains/community/tdarr/1.0.8/migrations/migrate_from_kubernetes b/trains/community/tdarr/1.0.9/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/tdarr/1.0.8/migrations/migrate_from_kubernetes rename to trains/community/tdarr/1.0.9/migrations/migrate_from_kubernetes diff --git a/trains/community/tdarr/1.0.8/migrations/migration_helpers/__init__.py b/trains/community/tdarr/1.0.9/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/tdarr/1.0.8/migrations/migration_helpers/__init__.py rename to trains/community/tdarr/1.0.9/migrations/migration_helpers/__init__.py diff --git a/trains/community/tdarr/1.0.8/migrations/migration_helpers/cpu.py b/trains/community/tdarr/1.0.9/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/tdarr/1.0.8/migrations/migration_helpers/cpu.py rename to trains/community/tdarr/1.0.9/migrations/migration_helpers/cpu.py diff --git a/trains/community/tdarr/1.0.8/migrations/migration_helpers/dns_config.py b/trains/community/tdarr/1.0.9/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/tdarr/1.0.8/migrations/migration_helpers/dns_config.py rename to trains/community/tdarr/1.0.9/migrations/migration_helpers/dns_config.py diff --git a/trains/community/tdarr/1.0.8/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/tdarr/1.0.9/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/tdarr/1.0.8/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/tdarr/1.0.9/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/tdarr/1.0.8/migrations/migration_helpers/memory.py b/trains/community/tdarr/1.0.9/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/tdarr/1.0.8/migrations/migration_helpers/memory.py rename to trains/community/tdarr/1.0.9/migrations/migration_helpers/memory.py diff --git a/trains/community/tdarr/1.0.8/migrations/migration_helpers/resources.py b/trains/community/tdarr/1.0.9/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/tdarr/1.0.8/migrations/migration_helpers/resources.py rename to trains/community/tdarr/1.0.9/migrations/migration_helpers/resources.py diff --git a/trains/community/tdarr/1.0.8/migrations/migration_helpers/storage.py b/trains/community/tdarr/1.0.9/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/tdarr/1.0.8/migrations/migration_helpers/storage.py rename to trains/community/tdarr/1.0.9/migrations/migration_helpers/storage.py diff --git a/trains/community/tdarr/1.0.8/questions.yaml b/trains/community/tdarr/1.0.9/questions.yaml similarity index 100% rename from trains/community/tdarr/1.0.8/questions.yaml rename to trains/community/tdarr/1.0.9/questions.yaml diff --git a/trains/community/tdarr/1.0.8/templates/docker-compose.yaml b/trains/community/tdarr/1.0.9/templates/docker-compose.yaml similarity index 100% rename from trains/community/tdarr/1.0.8/templates/docker-compose.yaml rename to trains/community/tdarr/1.0.9/templates/docker-compose.yaml diff --git a/trains/community/tdarr/1.0.8/templates/library/base_v1_1_3/__init__.py b/trains/community/tdarr/1.0.9/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/tdarr/1.0.8/templates/library/base_v1_1_3/__init__.py rename to trains/community/tdarr/1.0.9/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/tdarr/1.0.8/templates/library/base_v1_1_3/environment.py b/trains/community/tdarr/1.0.9/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/tdarr/1.0.8/templates/library/base_v1_1_3/environment.py rename to trains/community/tdarr/1.0.9/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/tdarr/1.0.9/templates/library/base_v1_1_4/healthchecks.py b/trains/community/tdarr/1.0.9/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/community/tdarr/1.0.9/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/tdarr/1.0.8/templates/library/base_v1_1_3/mariadb.py b/trains/community/tdarr/1.0.9/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/tdarr/1.0.8/templates/library/base_v1_1_3/mariadb.py rename to trains/community/tdarr/1.0.9/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/tdarr/1.0.8/templates/library/base_v1_1_3/metadata.py b/trains/community/tdarr/1.0.9/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/tdarr/1.0.8/templates/library/base_v1_1_3/metadata.py rename to trains/community/tdarr/1.0.9/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/tdarr/1.0.8/templates/library/base_v1_1_3/network.py b/trains/community/tdarr/1.0.9/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/tdarr/1.0.8/templates/library/base_v1_1_3/network.py rename to trains/community/tdarr/1.0.9/templates/library/base_v1_1_4/network.py diff --git a/trains/community/tdarr/1.0.9/templates/library/base_v1_1_4/permissions.py b/trains/community/tdarr/1.0.9/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/community/tdarr/1.0.9/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/community/tdarr/1.0.8/templates/library/base_v1_1_3/ports.py b/trains/community/tdarr/1.0.9/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/tdarr/1.0.8/templates/library/base_v1_1_3/ports.py rename to trains/community/tdarr/1.0.9/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/tdarr/1.0.8/templates/library/base_v1_1_3/postgres.py b/trains/community/tdarr/1.0.9/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/tdarr/1.0.8/templates/library/base_v1_1_3/postgres.py rename to trains/community/tdarr/1.0.9/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/tdarr/1.0.8/templates/library/base_v1_1_3/redis.py b/trains/community/tdarr/1.0.9/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/tdarr/1.0.8/templates/library/base_v1_1_3/redis.py rename to trains/community/tdarr/1.0.9/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/tdarr/1.0.8/templates/library/base_v1_1_3/resources.py b/trains/community/tdarr/1.0.9/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/tdarr/1.0.8/templates/library/base_v1_1_3/resources.py rename to trains/community/tdarr/1.0.9/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/tdarr/1.0.8/templates/library/base_v1_1_3/security.py b/trains/community/tdarr/1.0.9/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/tdarr/1.0.8/templates/library/base_v1_1_3/security.py rename to trains/community/tdarr/1.0.9/templates/library/base_v1_1_4/security.py diff --git a/trains/community/tdarr/1.0.8/templates/library/base_v1_1_3/storage.py b/trains/community/tdarr/1.0.9/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/tdarr/1.0.8/templates/library/base_v1_1_3/storage.py rename to trains/community/tdarr/1.0.9/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/tdarr/1.0.8/templates/library/base_v1_1_3/utils.py b/trains/community/tdarr/1.0.9/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/tdarr/1.0.8/templates/library/base_v1_1_3/utils.py rename to trains/community/tdarr/1.0.9/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/tdarr/1.0.8/templates/test_values/basic-values.yaml b/trains/community/tdarr/1.0.9/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/tdarr/1.0.8/templates/test_values/basic-values.yaml rename to trains/community/tdarr/1.0.9/templates/test_values/basic-values.yaml diff --git a/trains/community/terraria/1.0.5/templates/library/base_v1_1_3/healthchecks.py b/trains/community/terraria/1.0.5/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/community/terraria/1.0.5/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/terraria/1.0.5/templates/library/base_v1_1_3/permissions.py b/trains/community/terraria/1.0.5/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/community/terraria/1.0.5/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/community/terraria/1.0.5/README.md b/trains/community/terraria/1.0.6/README.md similarity index 100% rename from trains/community/terraria/1.0.5/README.md rename to trains/community/terraria/1.0.6/README.md diff --git a/trains/community/terraria/1.0.5/app.yaml b/trains/community/terraria/1.0.6/app.yaml similarity index 85% rename from trains/community/terraria/1.0.5/app.yaml rename to trains/community/terraria/1.0.6/app.yaml index 95bbaea7f2..96ba4c00ad 100644 --- a/trains/community/terraria/1.0.5/app.yaml +++ b/trains/community/terraria/1.0.6/app.yaml @@ -13,8 +13,8 @@ keywords: - game - terraria - world -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -32,4 +32,4 @@ sources: - https://github.com/ryansheehan/terraria title: Terraria train: community -version: 1.0.5 +version: 1.0.6 diff --git a/trains/community/terraria/1.0.5/ix_values.yaml b/trains/community/terraria/1.0.6/ix_values.yaml similarity index 100% rename from trains/community/terraria/1.0.5/ix_values.yaml rename to trains/community/terraria/1.0.6/ix_values.yaml diff --git a/trains/community/terraria/1.0.5/migrations/migrate_from_kubernetes b/trains/community/terraria/1.0.6/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/terraria/1.0.5/migrations/migrate_from_kubernetes rename to trains/community/terraria/1.0.6/migrations/migrate_from_kubernetes diff --git a/trains/community/terraria/1.0.5/migrations/migration_helpers/__init__.py b/trains/community/terraria/1.0.6/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/terraria/1.0.5/migrations/migration_helpers/__init__.py rename to trains/community/terraria/1.0.6/migrations/migration_helpers/__init__.py diff --git a/trains/community/terraria/1.0.5/migrations/migration_helpers/cpu.py b/trains/community/terraria/1.0.6/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/terraria/1.0.5/migrations/migration_helpers/cpu.py rename to trains/community/terraria/1.0.6/migrations/migration_helpers/cpu.py diff --git a/trains/community/terraria/1.0.5/migrations/migration_helpers/dns_config.py b/trains/community/terraria/1.0.6/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/terraria/1.0.5/migrations/migration_helpers/dns_config.py rename to trains/community/terraria/1.0.6/migrations/migration_helpers/dns_config.py diff --git a/trains/community/terraria/1.0.5/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/terraria/1.0.6/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/terraria/1.0.5/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/terraria/1.0.6/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/terraria/1.0.5/migrations/migration_helpers/memory.py b/trains/community/terraria/1.0.6/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/terraria/1.0.5/migrations/migration_helpers/memory.py rename to trains/community/terraria/1.0.6/migrations/migration_helpers/memory.py diff --git a/trains/community/terraria/1.0.5/migrations/migration_helpers/resources.py b/trains/community/terraria/1.0.6/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/terraria/1.0.5/migrations/migration_helpers/resources.py rename to trains/community/terraria/1.0.6/migrations/migration_helpers/resources.py diff --git a/trains/community/terraria/1.0.5/migrations/migration_helpers/storage.py b/trains/community/terraria/1.0.6/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/terraria/1.0.5/migrations/migration_helpers/storage.py rename to trains/community/terraria/1.0.6/migrations/migration_helpers/storage.py diff --git a/trains/community/terraria/1.0.5/questions.yaml b/trains/community/terraria/1.0.6/questions.yaml similarity index 100% rename from trains/community/terraria/1.0.5/questions.yaml rename to trains/community/terraria/1.0.6/questions.yaml diff --git a/trains/community/terraria/1.0.5/templates/docker-compose.yaml b/trains/community/terraria/1.0.6/templates/docker-compose.yaml similarity index 100% rename from trains/community/terraria/1.0.5/templates/docker-compose.yaml rename to trains/community/terraria/1.0.6/templates/docker-compose.yaml diff --git a/trains/community/terraria/1.0.5/templates/library/base_v1_1_3/__init__.py b/trains/community/terraria/1.0.6/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/terraria/1.0.5/templates/library/base_v1_1_3/__init__.py rename to trains/community/terraria/1.0.6/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/terraria/1.0.5/templates/library/base_v1_1_3/environment.py b/trains/community/terraria/1.0.6/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/terraria/1.0.5/templates/library/base_v1_1_3/environment.py rename to trains/community/terraria/1.0.6/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/terraria/1.0.6/templates/library/base_v1_1_4/healthchecks.py b/trains/community/terraria/1.0.6/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/community/terraria/1.0.6/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/terraria/1.0.5/templates/library/base_v1_1_3/mariadb.py b/trains/community/terraria/1.0.6/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/terraria/1.0.5/templates/library/base_v1_1_3/mariadb.py rename to trains/community/terraria/1.0.6/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/terraria/1.0.5/templates/library/base_v1_1_3/metadata.py b/trains/community/terraria/1.0.6/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/terraria/1.0.5/templates/library/base_v1_1_3/metadata.py rename to trains/community/terraria/1.0.6/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/terraria/1.0.5/templates/library/base_v1_1_3/network.py b/trains/community/terraria/1.0.6/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/terraria/1.0.5/templates/library/base_v1_1_3/network.py rename to trains/community/terraria/1.0.6/templates/library/base_v1_1_4/network.py diff --git a/trains/community/terraria/1.0.6/templates/library/base_v1_1_4/permissions.py b/trains/community/terraria/1.0.6/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/community/terraria/1.0.6/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/community/terraria/1.0.5/templates/library/base_v1_1_3/ports.py b/trains/community/terraria/1.0.6/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/terraria/1.0.5/templates/library/base_v1_1_3/ports.py rename to trains/community/terraria/1.0.6/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/terraria/1.0.5/templates/library/base_v1_1_3/postgres.py b/trains/community/terraria/1.0.6/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/terraria/1.0.5/templates/library/base_v1_1_3/postgres.py rename to trains/community/terraria/1.0.6/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/terraria/1.0.5/templates/library/base_v1_1_3/redis.py b/trains/community/terraria/1.0.6/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/terraria/1.0.5/templates/library/base_v1_1_3/redis.py rename to trains/community/terraria/1.0.6/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/terraria/1.0.5/templates/library/base_v1_1_3/resources.py b/trains/community/terraria/1.0.6/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/terraria/1.0.5/templates/library/base_v1_1_3/resources.py rename to trains/community/terraria/1.0.6/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/terraria/1.0.5/templates/library/base_v1_1_3/security.py b/trains/community/terraria/1.0.6/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/terraria/1.0.5/templates/library/base_v1_1_3/security.py rename to trains/community/terraria/1.0.6/templates/library/base_v1_1_4/security.py diff --git a/trains/community/terraria/1.0.5/templates/library/base_v1_1_3/storage.py b/trains/community/terraria/1.0.6/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/terraria/1.0.5/templates/library/base_v1_1_3/storage.py rename to trains/community/terraria/1.0.6/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/terraria/1.0.5/templates/library/base_v1_1_3/utils.py b/trains/community/terraria/1.0.6/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/terraria/1.0.5/templates/library/base_v1_1_3/utils.py rename to trains/community/terraria/1.0.6/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/terraria/1.0.5/templates/test_values/basic-values.yaml b/trains/community/terraria/1.0.6/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/terraria/1.0.5/templates/test_values/basic-values.yaml rename to trains/community/terraria/1.0.6/templates/test_values/basic-values.yaml diff --git a/trains/community/terraria/1.0.5/templates/test_values/password-values.yaml b/trains/community/terraria/1.0.6/templates/test_values/password-values.yaml similarity index 100% rename from trains/community/terraria/1.0.5/templates/test_values/password-values.yaml rename to trains/community/terraria/1.0.6/templates/test_values/password-values.yaml diff --git a/trains/community/terraria/1.0.5/templates/test_values/vanilla-values.yaml b/trains/community/terraria/1.0.6/templates/test_values/vanilla-values.yaml similarity index 100% rename from trains/community/terraria/1.0.5/templates/test_values/vanilla-values.yaml rename to trains/community/terraria/1.0.6/templates/test_values/vanilla-values.yaml diff --git a/trains/community/tftpd-hpa/1.0.9/README.md b/trains/community/tftpd-hpa/1.0.10/README.md similarity index 100% rename from trains/community/tftpd-hpa/1.0.9/README.md rename to trains/community/tftpd-hpa/1.0.10/README.md diff --git a/trains/community/tftpd-hpa/1.0.9/app.yaml b/trains/community/tftpd-hpa/1.0.10/app.yaml similarity index 90% rename from trains/community/tftpd-hpa/1.0.9/app.yaml rename to trains/community/tftpd-hpa/1.0.10/app.yaml index 9a91c6d91d..7735985c93 100644 --- a/trains/community/tftpd-hpa/1.0.9/app.yaml +++ b/trains/community/tftpd-hpa/1.0.10/app.yaml @@ -17,8 +17,8 @@ icon: https://media.sys.truenas.net/apps/tftpd-hpa/icons/icon.png keywords: - tftp - netboot -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -36,4 +36,4 @@ sources: - https://hub.docker.com/r/ixsystems/tftpd-hpa title: TFTP Server train: community -version: 1.0.9 +version: 1.0.10 diff --git a/trains/community/tftpd-hpa/1.0.9/ix_values.yaml b/trains/community/tftpd-hpa/1.0.10/ix_values.yaml similarity index 100% rename from trains/community/tftpd-hpa/1.0.9/ix_values.yaml rename to trains/community/tftpd-hpa/1.0.10/ix_values.yaml diff --git a/trains/community/tftpd-hpa/1.0.9/migrations/migrate_from_kubernetes b/trains/community/tftpd-hpa/1.0.10/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/tftpd-hpa/1.0.9/migrations/migrate_from_kubernetes rename to trains/community/tftpd-hpa/1.0.10/migrations/migrate_from_kubernetes diff --git a/trains/community/tftpd-hpa/1.0.9/migrations/migration_helpers/__init__.py b/trains/community/tftpd-hpa/1.0.10/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/tftpd-hpa/1.0.9/migrations/migration_helpers/__init__.py rename to trains/community/tftpd-hpa/1.0.10/migrations/migration_helpers/__init__.py diff --git a/trains/community/tftpd-hpa/1.0.9/migrations/migration_helpers/cpu.py b/trains/community/tftpd-hpa/1.0.10/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/tftpd-hpa/1.0.9/migrations/migration_helpers/cpu.py rename to trains/community/tftpd-hpa/1.0.10/migrations/migration_helpers/cpu.py diff --git a/trains/community/tftpd-hpa/1.0.9/migrations/migration_helpers/dns_config.py b/trains/community/tftpd-hpa/1.0.10/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/tftpd-hpa/1.0.9/migrations/migration_helpers/dns_config.py rename to trains/community/tftpd-hpa/1.0.10/migrations/migration_helpers/dns_config.py diff --git a/trains/community/tftpd-hpa/1.0.9/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/tftpd-hpa/1.0.10/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/tftpd-hpa/1.0.9/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/tftpd-hpa/1.0.10/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/tftpd-hpa/1.0.9/migrations/migration_helpers/memory.py b/trains/community/tftpd-hpa/1.0.10/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/tftpd-hpa/1.0.9/migrations/migration_helpers/memory.py rename to trains/community/tftpd-hpa/1.0.10/migrations/migration_helpers/memory.py diff --git a/trains/community/tftpd-hpa/1.0.9/migrations/migration_helpers/resources.py b/trains/community/tftpd-hpa/1.0.10/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/tftpd-hpa/1.0.9/migrations/migration_helpers/resources.py rename to trains/community/tftpd-hpa/1.0.10/migrations/migration_helpers/resources.py diff --git a/trains/community/tftpd-hpa/1.0.9/migrations/migration_helpers/storage.py b/trains/community/tftpd-hpa/1.0.10/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/tftpd-hpa/1.0.9/migrations/migration_helpers/storage.py rename to trains/community/tftpd-hpa/1.0.10/migrations/migration_helpers/storage.py diff --git a/trains/community/tftpd-hpa/1.0.9/questions.yaml b/trains/community/tftpd-hpa/1.0.10/questions.yaml similarity index 100% rename from trains/community/tftpd-hpa/1.0.9/questions.yaml rename to trains/community/tftpd-hpa/1.0.10/questions.yaml diff --git a/trains/community/tftpd-hpa/1.0.9/templates/docker-compose.yaml b/trains/community/tftpd-hpa/1.0.10/templates/docker-compose.yaml similarity index 100% rename from trains/community/tftpd-hpa/1.0.9/templates/docker-compose.yaml rename to trains/community/tftpd-hpa/1.0.10/templates/docker-compose.yaml diff --git a/trains/community/tftpd-hpa/1.0.9/templates/library/base_v1_1_3/__init__.py b/trains/community/tftpd-hpa/1.0.10/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/tftpd-hpa/1.0.9/templates/library/base_v1_1_3/__init__.py rename to trains/community/tftpd-hpa/1.0.10/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/tftpd-hpa/1.0.9/templates/library/base_v1_1_3/environment.py b/trains/community/tftpd-hpa/1.0.10/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/tftpd-hpa/1.0.9/templates/library/base_v1_1_3/environment.py rename to trains/community/tftpd-hpa/1.0.10/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/tftpd-hpa/1.0.10/templates/library/base_v1_1_4/healthchecks.py b/trains/community/tftpd-hpa/1.0.10/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/community/tftpd-hpa/1.0.10/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/tftpd-hpa/1.0.9/templates/library/base_v1_1_3/mariadb.py b/trains/community/tftpd-hpa/1.0.10/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/tftpd-hpa/1.0.9/templates/library/base_v1_1_3/mariadb.py rename to trains/community/tftpd-hpa/1.0.10/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/tftpd-hpa/1.0.9/templates/library/base_v1_1_3/metadata.py b/trains/community/tftpd-hpa/1.0.10/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/tftpd-hpa/1.0.9/templates/library/base_v1_1_3/metadata.py rename to trains/community/tftpd-hpa/1.0.10/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/tftpd-hpa/1.0.9/templates/library/base_v1_1_3/network.py b/trains/community/tftpd-hpa/1.0.10/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/tftpd-hpa/1.0.9/templates/library/base_v1_1_3/network.py rename to trains/community/tftpd-hpa/1.0.10/templates/library/base_v1_1_4/network.py diff --git a/trains/community/tftpd-hpa/1.0.10/templates/library/base_v1_1_4/permissions.py b/trains/community/tftpd-hpa/1.0.10/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/community/tftpd-hpa/1.0.10/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/community/tftpd-hpa/1.0.9/templates/library/base_v1_1_3/ports.py b/trains/community/tftpd-hpa/1.0.10/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/tftpd-hpa/1.0.9/templates/library/base_v1_1_3/ports.py rename to trains/community/tftpd-hpa/1.0.10/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/tftpd-hpa/1.0.9/templates/library/base_v1_1_3/postgres.py b/trains/community/tftpd-hpa/1.0.10/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/tftpd-hpa/1.0.9/templates/library/base_v1_1_3/postgres.py rename to trains/community/tftpd-hpa/1.0.10/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/tftpd-hpa/1.0.9/templates/library/base_v1_1_3/redis.py b/trains/community/tftpd-hpa/1.0.10/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/tftpd-hpa/1.0.9/templates/library/base_v1_1_3/redis.py rename to trains/community/tftpd-hpa/1.0.10/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/tftpd-hpa/1.0.9/templates/library/base_v1_1_3/resources.py b/trains/community/tftpd-hpa/1.0.10/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/tftpd-hpa/1.0.9/templates/library/base_v1_1_3/resources.py rename to trains/community/tftpd-hpa/1.0.10/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/tftpd-hpa/1.0.9/templates/library/base_v1_1_3/security.py b/trains/community/tftpd-hpa/1.0.10/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/tftpd-hpa/1.0.9/templates/library/base_v1_1_3/security.py rename to trains/community/tftpd-hpa/1.0.10/templates/library/base_v1_1_4/security.py diff --git a/trains/community/tftpd-hpa/1.0.9/templates/library/base_v1_1_3/storage.py b/trains/community/tftpd-hpa/1.0.10/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/tftpd-hpa/1.0.9/templates/library/base_v1_1_3/storage.py rename to trains/community/tftpd-hpa/1.0.10/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/tftpd-hpa/1.0.9/templates/library/base_v1_1_3/utils.py b/trains/community/tftpd-hpa/1.0.10/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/tftpd-hpa/1.0.9/templates/library/base_v1_1_3/utils.py rename to trains/community/tftpd-hpa/1.0.10/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/tftpd-hpa/1.0.9/templates/test_values/create-values.yaml b/trains/community/tftpd-hpa/1.0.10/templates/test_values/create-values.yaml similarity index 100% rename from trains/community/tftpd-hpa/1.0.9/templates/test_values/create-values.yaml rename to trains/community/tftpd-hpa/1.0.10/templates/test_values/create-values.yaml diff --git a/trains/community/tftpd-hpa/1.0.9/templates/test_values/readonly-values.yaml b/trains/community/tftpd-hpa/1.0.10/templates/test_values/readonly-values.yaml similarity index 100% rename from trains/community/tftpd-hpa/1.0.9/templates/test_values/readonly-values.yaml rename to trains/community/tftpd-hpa/1.0.10/templates/test_values/readonly-values.yaml diff --git a/trains/community/tftpd-hpa/1.0.9/templates/library/base_v1_1_3/healthchecks.py b/trains/community/tftpd-hpa/1.0.9/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/community/tftpd-hpa/1.0.9/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/tftpd-hpa/1.0.9/templates/library/base_v1_1_3/permissions.py b/trains/community/tftpd-hpa/1.0.9/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/community/tftpd-hpa/1.0.9/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/community/tiny-media-manager/1.0.5/templates/library/base_v1_1_3/healthchecks.py b/trains/community/tiny-media-manager/1.0.5/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/community/tiny-media-manager/1.0.5/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/tiny-media-manager/1.0.5/templates/library/base_v1_1_3/permissions.py b/trains/community/tiny-media-manager/1.0.5/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/community/tiny-media-manager/1.0.5/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/community/tiny-media-manager/1.0.5/README.md b/trains/community/tiny-media-manager/1.0.6/README.md similarity index 100% rename from trains/community/tiny-media-manager/1.0.5/README.md rename to trains/community/tiny-media-manager/1.0.6/README.md diff --git a/trains/community/tiny-media-manager/1.0.5/app.yaml b/trains/community/tiny-media-manager/1.0.6/app.yaml similarity index 91% rename from trains/community/tiny-media-manager/1.0.5/app.yaml rename to trains/community/tiny-media-manager/1.0.6/app.yaml index f08a32df5c..03e89d2f35 100644 --- a/trains/community/tiny-media-manager/1.0.5/app.yaml +++ b/trains/community/tiny-media-manager/1.0.6/app.yaml @@ -16,8 +16,8 @@ keywords: - media - tv-shows - movies -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -39,4 +39,4 @@ sources: - https://hub.docker.com/r/tinymediamanager/tinymediamanager title: Tiny Media Manager train: community -version: 1.0.5 +version: 1.0.6 diff --git a/trains/community/tiny-media-manager/1.0.5/ix_values.yaml b/trains/community/tiny-media-manager/1.0.6/ix_values.yaml similarity index 100% rename from trains/community/tiny-media-manager/1.0.5/ix_values.yaml rename to trains/community/tiny-media-manager/1.0.6/ix_values.yaml diff --git a/trains/community/tiny-media-manager/1.0.5/migrations/migrate_from_kubernetes b/trains/community/tiny-media-manager/1.0.6/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/tiny-media-manager/1.0.5/migrations/migrate_from_kubernetes rename to trains/community/tiny-media-manager/1.0.6/migrations/migrate_from_kubernetes diff --git a/trains/community/tiny-media-manager/1.0.5/migrations/migration_helpers/__init__.py b/trains/community/tiny-media-manager/1.0.6/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/tiny-media-manager/1.0.5/migrations/migration_helpers/__init__.py rename to trains/community/tiny-media-manager/1.0.6/migrations/migration_helpers/__init__.py diff --git a/trains/community/tiny-media-manager/1.0.5/migrations/migration_helpers/cpu.py b/trains/community/tiny-media-manager/1.0.6/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/tiny-media-manager/1.0.5/migrations/migration_helpers/cpu.py rename to trains/community/tiny-media-manager/1.0.6/migrations/migration_helpers/cpu.py diff --git a/trains/community/tiny-media-manager/1.0.5/migrations/migration_helpers/dns_config.py b/trains/community/tiny-media-manager/1.0.6/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/tiny-media-manager/1.0.5/migrations/migration_helpers/dns_config.py rename to trains/community/tiny-media-manager/1.0.6/migrations/migration_helpers/dns_config.py diff --git a/trains/community/tiny-media-manager/1.0.5/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/tiny-media-manager/1.0.6/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/tiny-media-manager/1.0.5/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/tiny-media-manager/1.0.6/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/tiny-media-manager/1.0.5/migrations/migration_helpers/memory.py b/trains/community/tiny-media-manager/1.0.6/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/tiny-media-manager/1.0.5/migrations/migration_helpers/memory.py rename to trains/community/tiny-media-manager/1.0.6/migrations/migration_helpers/memory.py diff --git a/trains/community/tiny-media-manager/1.0.5/migrations/migration_helpers/resources.py b/trains/community/tiny-media-manager/1.0.6/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/tiny-media-manager/1.0.5/migrations/migration_helpers/resources.py rename to trains/community/tiny-media-manager/1.0.6/migrations/migration_helpers/resources.py diff --git a/trains/community/tiny-media-manager/1.0.5/migrations/migration_helpers/storage.py b/trains/community/tiny-media-manager/1.0.6/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/tiny-media-manager/1.0.5/migrations/migration_helpers/storage.py rename to trains/community/tiny-media-manager/1.0.6/migrations/migration_helpers/storage.py diff --git a/trains/community/tiny-media-manager/1.0.5/questions.yaml b/trains/community/tiny-media-manager/1.0.6/questions.yaml similarity index 100% rename from trains/community/tiny-media-manager/1.0.5/questions.yaml rename to trains/community/tiny-media-manager/1.0.6/questions.yaml diff --git a/trains/community/tiny-media-manager/1.0.5/templates/docker-compose.yaml b/trains/community/tiny-media-manager/1.0.6/templates/docker-compose.yaml similarity index 100% rename from trains/community/tiny-media-manager/1.0.5/templates/docker-compose.yaml rename to trains/community/tiny-media-manager/1.0.6/templates/docker-compose.yaml diff --git a/trains/community/tiny-media-manager/1.0.5/templates/library/base_v1_1_3/__init__.py b/trains/community/tiny-media-manager/1.0.6/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/tiny-media-manager/1.0.5/templates/library/base_v1_1_3/__init__.py rename to trains/community/tiny-media-manager/1.0.6/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/tiny-media-manager/1.0.5/templates/library/base_v1_1_3/environment.py b/trains/community/tiny-media-manager/1.0.6/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/tiny-media-manager/1.0.5/templates/library/base_v1_1_3/environment.py rename to trains/community/tiny-media-manager/1.0.6/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/tiny-media-manager/1.0.6/templates/library/base_v1_1_4/healthchecks.py b/trains/community/tiny-media-manager/1.0.6/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/community/tiny-media-manager/1.0.6/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/tiny-media-manager/1.0.5/templates/library/base_v1_1_3/mariadb.py b/trains/community/tiny-media-manager/1.0.6/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/tiny-media-manager/1.0.5/templates/library/base_v1_1_3/mariadb.py rename to trains/community/tiny-media-manager/1.0.6/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/tiny-media-manager/1.0.5/templates/library/base_v1_1_3/metadata.py b/trains/community/tiny-media-manager/1.0.6/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/tiny-media-manager/1.0.5/templates/library/base_v1_1_3/metadata.py rename to trains/community/tiny-media-manager/1.0.6/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/tiny-media-manager/1.0.5/templates/library/base_v1_1_3/network.py b/trains/community/tiny-media-manager/1.0.6/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/tiny-media-manager/1.0.5/templates/library/base_v1_1_3/network.py rename to trains/community/tiny-media-manager/1.0.6/templates/library/base_v1_1_4/network.py diff --git a/trains/community/tiny-media-manager/1.0.6/templates/library/base_v1_1_4/permissions.py b/trains/community/tiny-media-manager/1.0.6/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/community/tiny-media-manager/1.0.6/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/community/tiny-media-manager/1.0.5/templates/library/base_v1_1_3/ports.py b/trains/community/tiny-media-manager/1.0.6/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/tiny-media-manager/1.0.5/templates/library/base_v1_1_3/ports.py rename to trains/community/tiny-media-manager/1.0.6/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/tiny-media-manager/1.0.5/templates/library/base_v1_1_3/postgres.py b/trains/community/tiny-media-manager/1.0.6/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/tiny-media-manager/1.0.5/templates/library/base_v1_1_3/postgres.py rename to trains/community/tiny-media-manager/1.0.6/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/tiny-media-manager/1.0.5/templates/library/base_v1_1_3/redis.py b/trains/community/tiny-media-manager/1.0.6/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/tiny-media-manager/1.0.5/templates/library/base_v1_1_3/redis.py rename to trains/community/tiny-media-manager/1.0.6/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/tiny-media-manager/1.0.5/templates/library/base_v1_1_3/resources.py b/trains/community/tiny-media-manager/1.0.6/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/tiny-media-manager/1.0.5/templates/library/base_v1_1_3/resources.py rename to trains/community/tiny-media-manager/1.0.6/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/tiny-media-manager/1.0.5/templates/library/base_v1_1_3/security.py b/trains/community/tiny-media-manager/1.0.6/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/tiny-media-manager/1.0.5/templates/library/base_v1_1_3/security.py rename to trains/community/tiny-media-manager/1.0.6/templates/library/base_v1_1_4/security.py diff --git a/trains/community/tiny-media-manager/1.0.5/templates/library/base_v1_1_3/storage.py b/trains/community/tiny-media-manager/1.0.6/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/tiny-media-manager/1.0.5/templates/library/base_v1_1_3/storage.py rename to trains/community/tiny-media-manager/1.0.6/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/tiny-media-manager/1.0.5/templates/library/base_v1_1_3/utils.py b/trains/community/tiny-media-manager/1.0.6/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/tiny-media-manager/1.0.5/templates/library/base_v1_1_3/utils.py rename to trains/community/tiny-media-manager/1.0.6/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/tiny-media-manager/1.0.5/templates/test_values/basic-values.yaml b/trains/community/tiny-media-manager/1.0.6/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/tiny-media-manager/1.0.5/templates/test_values/basic-values.yaml rename to trains/community/tiny-media-manager/1.0.6/templates/test_values/basic-values.yaml diff --git a/trains/community/transmission/1.0.5/templates/library/base_v1_1_3/healthchecks.py b/trains/community/transmission/1.0.5/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/community/transmission/1.0.5/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/transmission/1.0.5/templates/library/base_v1_1_3/permissions.py b/trains/community/transmission/1.0.5/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/community/transmission/1.0.5/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/community/transmission/1.0.5/README.md b/trains/community/transmission/1.0.6/README.md similarity index 100% rename from trains/community/transmission/1.0.5/README.md rename to trains/community/transmission/1.0.6/README.md diff --git a/trains/community/transmission/1.0.5/app.yaml b/trains/community/transmission/1.0.6/app.yaml similarity index 84% rename from trains/community/transmission/1.0.5/app.yaml rename to trains/community/transmission/1.0.6/app.yaml index 5cc2c11e75..e83bb36bbd 100644 --- a/trains/community/transmission/1.0.5/app.yaml +++ b/trains/community/transmission/1.0.6/app.yaml @@ -10,8 +10,8 @@ keywords: - media - torrent - download -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -29,4 +29,4 @@ sources: - https://transmissionbt.com/ title: Transmission train: community -version: 1.0.5 +version: 1.0.6 diff --git a/trains/community/transmission/1.0.5/ix_values.yaml b/trains/community/transmission/1.0.6/ix_values.yaml similarity index 100% rename from trains/community/transmission/1.0.5/ix_values.yaml rename to trains/community/transmission/1.0.6/ix_values.yaml diff --git a/trains/community/transmission/1.0.5/migrations/migrate_from_kubernetes b/trains/community/transmission/1.0.6/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/transmission/1.0.5/migrations/migrate_from_kubernetes rename to trains/community/transmission/1.0.6/migrations/migrate_from_kubernetes diff --git a/trains/community/transmission/1.0.5/migrations/migration_helpers/__init__.py b/trains/community/transmission/1.0.6/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/transmission/1.0.5/migrations/migration_helpers/__init__.py rename to trains/community/transmission/1.0.6/migrations/migration_helpers/__init__.py diff --git a/trains/community/transmission/1.0.5/migrations/migration_helpers/cpu.py b/trains/community/transmission/1.0.6/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/transmission/1.0.5/migrations/migration_helpers/cpu.py rename to trains/community/transmission/1.0.6/migrations/migration_helpers/cpu.py diff --git a/trains/community/transmission/1.0.5/migrations/migration_helpers/dns_config.py b/trains/community/transmission/1.0.6/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/transmission/1.0.5/migrations/migration_helpers/dns_config.py rename to trains/community/transmission/1.0.6/migrations/migration_helpers/dns_config.py diff --git a/trains/community/transmission/1.0.5/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/transmission/1.0.6/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/transmission/1.0.5/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/transmission/1.0.6/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/transmission/1.0.5/migrations/migration_helpers/memory.py b/trains/community/transmission/1.0.6/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/transmission/1.0.5/migrations/migration_helpers/memory.py rename to trains/community/transmission/1.0.6/migrations/migration_helpers/memory.py diff --git a/trains/community/transmission/1.0.5/migrations/migration_helpers/resources.py b/trains/community/transmission/1.0.6/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/transmission/1.0.5/migrations/migration_helpers/resources.py rename to trains/community/transmission/1.0.6/migrations/migration_helpers/resources.py diff --git a/trains/community/transmission/1.0.5/migrations/migration_helpers/storage.py b/trains/community/transmission/1.0.6/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/transmission/1.0.5/migrations/migration_helpers/storage.py rename to trains/community/transmission/1.0.6/migrations/migration_helpers/storage.py diff --git a/trains/community/transmission/1.0.5/questions.yaml b/trains/community/transmission/1.0.6/questions.yaml similarity index 100% rename from trains/community/transmission/1.0.5/questions.yaml rename to trains/community/transmission/1.0.6/questions.yaml diff --git a/trains/community/transmission/1.0.5/templates/docker-compose.yaml b/trains/community/transmission/1.0.6/templates/docker-compose.yaml similarity index 100% rename from trains/community/transmission/1.0.5/templates/docker-compose.yaml rename to trains/community/transmission/1.0.6/templates/docker-compose.yaml diff --git a/trains/community/transmission/1.0.5/templates/library/base_v1_1_3/__init__.py b/trains/community/transmission/1.0.6/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/transmission/1.0.5/templates/library/base_v1_1_3/__init__.py rename to trains/community/transmission/1.0.6/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/transmission/1.0.5/templates/library/base_v1_1_3/environment.py b/trains/community/transmission/1.0.6/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/transmission/1.0.5/templates/library/base_v1_1_3/environment.py rename to trains/community/transmission/1.0.6/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/transmission/1.0.6/templates/library/base_v1_1_4/healthchecks.py b/trains/community/transmission/1.0.6/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/community/transmission/1.0.6/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/transmission/1.0.5/templates/library/base_v1_1_3/mariadb.py b/trains/community/transmission/1.0.6/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/transmission/1.0.5/templates/library/base_v1_1_3/mariadb.py rename to trains/community/transmission/1.0.6/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/transmission/1.0.5/templates/library/base_v1_1_3/metadata.py b/trains/community/transmission/1.0.6/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/transmission/1.0.5/templates/library/base_v1_1_3/metadata.py rename to trains/community/transmission/1.0.6/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/transmission/1.0.5/templates/library/base_v1_1_3/network.py b/trains/community/transmission/1.0.6/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/transmission/1.0.5/templates/library/base_v1_1_3/network.py rename to trains/community/transmission/1.0.6/templates/library/base_v1_1_4/network.py diff --git a/trains/community/transmission/1.0.6/templates/library/base_v1_1_4/permissions.py b/trains/community/transmission/1.0.6/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/community/transmission/1.0.6/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/community/transmission/1.0.5/templates/library/base_v1_1_3/ports.py b/trains/community/transmission/1.0.6/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/transmission/1.0.5/templates/library/base_v1_1_3/ports.py rename to trains/community/transmission/1.0.6/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/transmission/1.0.5/templates/library/base_v1_1_3/postgres.py b/trains/community/transmission/1.0.6/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/transmission/1.0.5/templates/library/base_v1_1_3/postgres.py rename to trains/community/transmission/1.0.6/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/transmission/1.0.5/templates/library/base_v1_1_3/redis.py b/trains/community/transmission/1.0.6/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/transmission/1.0.5/templates/library/base_v1_1_3/redis.py rename to trains/community/transmission/1.0.6/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/transmission/1.0.5/templates/library/base_v1_1_3/resources.py b/trains/community/transmission/1.0.6/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/transmission/1.0.5/templates/library/base_v1_1_3/resources.py rename to trains/community/transmission/1.0.6/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/transmission/1.0.5/templates/library/base_v1_1_3/security.py b/trains/community/transmission/1.0.6/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/transmission/1.0.5/templates/library/base_v1_1_3/security.py rename to trains/community/transmission/1.0.6/templates/library/base_v1_1_4/security.py diff --git a/trains/community/transmission/1.0.5/templates/library/base_v1_1_3/storage.py b/trains/community/transmission/1.0.6/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/transmission/1.0.5/templates/library/base_v1_1_3/storage.py rename to trains/community/transmission/1.0.6/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/transmission/1.0.5/templates/library/base_v1_1_3/utils.py b/trains/community/transmission/1.0.6/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/transmission/1.0.5/templates/library/base_v1_1_3/utils.py rename to trains/community/transmission/1.0.6/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/transmission/1.0.5/templates/macros/setup.sh b/trains/community/transmission/1.0.6/templates/macros/setup.sh similarity index 100% rename from trains/community/transmission/1.0.5/templates/macros/setup.sh rename to trains/community/transmission/1.0.6/templates/macros/setup.sh diff --git a/trains/community/transmission/1.0.5/templates/test_values/basic-values.yaml b/trains/community/transmission/1.0.6/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/transmission/1.0.5/templates/test_values/basic-values.yaml rename to trains/community/transmission/1.0.6/templates/test_values/basic-values.yaml diff --git a/trains/community/twofactor-auth/1.0.6/templates/library/base_v1_1_3/healthchecks.py b/trains/community/twofactor-auth/1.0.6/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/community/twofactor-auth/1.0.6/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/twofactor-auth/1.0.6/templates/library/base_v1_1_3/permissions.py b/trains/community/twofactor-auth/1.0.6/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/community/twofactor-auth/1.0.6/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/community/twofactor-auth/1.0.6/README.md b/trains/community/twofactor-auth/1.0.7/README.md similarity index 100% rename from trains/community/twofactor-auth/1.0.6/README.md rename to trains/community/twofactor-auth/1.0.7/README.md diff --git a/trains/community/twofactor-auth/1.0.6/app.yaml b/trains/community/twofactor-auth/1.0.7/app.yaml similarity index 87% rename from trains/community/twofactor-auth/1.0.6/app.yaml rename to trains/community/twofactor-auth/1.0.7/app.yaml index d193f416d4..17b4c6ca7e 100644 --- a/trains/community/twofactor-auth/1.0.6/app.yaml +++ b/trains/community/twofactor-auth/1.0.7/app.yaml @@ -11,8 +11,8 @@ keywords: - security - 2fa - otp -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -31,4 +31,4 @@ sources: - https://hub.docker.com/r/2fauth/2fauth/ title: 2FAuth train: community -version: 1.0.6 +version: 1.0.7 diff --git a/trains/community/twofactor-auth/1.0.6/ix_values.yaml b/trains/community/twofactor-auth/1.0.7/ix_values.yaml similarity index 100% rename from trains/community/twofactor-auth/1.0.6/ix_values.yaml rename to trains/community/twofactor-auth/1.0.7/ix_values.yaml diff --git a/trains/community/twofactor-auth/1.0.6/migrations/migrate_from_kubernetes b/trains/community/twofactor-auth/1.0.7/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/twofactor-auth/1.0.6/migrations/migrate_from_kubernetes rename to trains/community/twofactor-auth/1.0.7/migrations/migrate_from_kubernetes diff --git a/trains/community/twofactor-auth/1.0.6/migrations/migration_helpers/__init__.py b/trains/community/twofactor-auth/1.0.7/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/twofactor-auth/1.0.6/migrations/migration_helpers/__init__.py rename to trains/community/twofactor-auth/1.0.7/migrations/migration_helpers/__init__.py diff --git a/trains/community/twofactor-auth/1.0.6/migrations/migration_helpers/cpu.py b/trains/community/twofactor-auth/1.0.7/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/twofactor-auth/1.0.6/migrations/migration_helpers/cpu.py rename to trains/community/twofactor-auth/1.0.7/migrations/migration_helpers/cpu.py diff --git a/trains/community/twofactor-auth/1.0.6/migrations/migration_helpers/dns_config.py b/trains/community/twofactor-auth/1.0.7/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/twofactor-auth/1.0.6/migrations/migration_helpers/dns_config.py rename to trains/community/twofactor-auth/1.0.7/migrations/migration_helpers/dns_config.py diff --git a/trains/community/twofactor-auth/1.0.6/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/twofactor-auth/1.0.7/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/twofactor-auth/1.0.6/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/twofactor-auth/1.0.7/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/twofactor-auth/1.0.6/migrations/migration_helpers/memory.py b/trains/community/twofactor-auth/1.0.7/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/twofactor-auth/1.0.6/migrations/migration_helpers/memory.py rename to trains/community/twofactor-auth/1.0.7/migrations/migration_helpers/memory.py diff --git a/trains/community/twofactor-auth/1.0.6/migrations/migration_helpers/resources.py b/trains/community/twofactor-auth/1.0.7/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/twofactor-auth/1.0.6/migrations/migration_helpers/resources.py rename to trains/community/twofactor-auth/1.0.7/migrations/migration_helpers/resources.py diff --git a/trains/community/twofactor-auth/1.0.6/migrations/migration_helpers/storage.py b/trains/community/twofactor-auth/1.0.7/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/twofactor-auth/1.0.6/migrations/migration_helpers/storage.py rename to trains/community/twofactor-auth/1.0.7/migrations/migration_helpers/storage.py diff --git a/trains/community/twofactor-auth/1.0.6/questions.yaml b/trains/community/twofactor-auth/1.0.7/questions.yaml similarity index 100% rename from trains/community/twofactor-auth/1.0.6/questions.yaml rename to trains/community/twofactor-auth/1.0.7/questions.yaml diff --git a/trains/community/twofactor-auth/1.0.6/templates/docker-compose.yaml b/trains/community/twofactor-auth/1.0.7/templates/docker-compose.yaml similarity index 100% rename from trains/community/twofactor-auth/1.0.6/templates/docker-compose.yaml rename to trains/community/twofactor-auth/1.0.7/templates/docker-compose.yaml diff --git a/trains/community/twofactor-auth/1.0.6/templates/library/base_v1_1_3/__init__.py b/trains/community/twofactor-auth/1.0.7/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/twofactor-auth/1.0.6/templates/library/base_v1_1_3/__init__.py rename to trains/community/twofactor-auth/1.0.7/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/twofactor-auth/1.0.6/templates/library/base_v1_1_3/environment.py b/trains/community/twofactor-auth/1.0.7/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/twofactor-auth/1.0.6/templates/library/base_v1_1_3/environment.py rename to trains/community/twofactor-auth/1.0.7/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/twofactor-auth/1.0.7/templates/library/base_v1_1_4/healthchecks.py b/trains/community/twofactor-auth/1.0.7/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/community/twofactor-auth/1.0.7/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/twofactor-auth/1.0.6/templates/library/base_v1_1_3/mariadb.py b/trains/community/twofactor-auth/1.0.7/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/twofactor-auth/1.0.6/templates/library/base_v1_1_3/mariadb.py rename to trains/community/twofactor-auth/1.0.7/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/twofactor-auth/1.0.6/templates/library/base_v1_1_3/metadata.py b/trains/community/twofactor-auth/1.0.7/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/twofactor-auth/1.0.6/templates/library/base_v1_1_3/metadata.py rename to trains/community/twofactor-auth/1.0.7/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/twofactor-auth/1.0.6/templates/library/base_v1_1_3/network.py b/trains/community/twofactor-auth/1.0.7/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/twofactor-auth/1.0.6/templates/library/base_v1_1_3/network.py rename to trains/community/twofactor-auth/1.0.7/templates/library/base_v1_1_4/network.py diff --git a/trains/community/twofactor-auth/1.0.7/templates/library/base_v1_1_4/permissions.py b/trains/community/twofactor-auth/1.0.7/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/community/twofactor-auth/1.0.7/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/community/twofactor-auth/1.0.6/templates/library/base_v1_1_3/ports.py b/trains/community/twofactor-auth/1.0.7/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/twofactor-auth/1.0.6/templates/library/base_v1_1_3/ports.py rename to trains/community/twofactor-auth/1.0.7/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/twofactor-auth/1.0.6/templates/library/base_v1_1_3/postgres.py b/trains/community/twofactor-auth/1.0.7/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/twofactor-auth/1.0.6/templates/library/base_v1_1_3/postgres.py rename to trains/community/twofactor-auth/1.0.7/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/twofactor-auth/1.0.6/templates/library/base_v1_1_3/redis.py b/trains/community/twofactor-auth/1.0.7/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/twofactor-auth/1.0.6/templates/library/base_v1_1_3/redis.py rename to trains/community/twofactor-auth/1.0.7/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/twofactor-auth/1.0.6/templates/library/base_v1_1_3/resources.py b/trains/community/twofactor-auth/1.0.7/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/twofactor-auth/1.0.6/templates/library/base_v1_1_3/resources.py rename to trains/community/twofactor-auth/1.0.7/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/twofactor-auth/1.0.6/templates/library/base_v1_1_3/security.py b/trains/community/twofactor-auth/1.0.7/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/twofactor-auth/1.0.6/templates/library/base_v1_1_3/security.py rename to trains/community/twofactor-auth/1.0.7/templates/library/base_v1_1_4/security.py diff --git a/trains/community/twofactor-auth/1.0.6/templates/library/base_v1_1_3/storage.py b/trains/community/twofactor-auth/1.0.7/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/twofactor-auth/1.0.6/templates/library/base_v1_1_3/storage.py rename to trains/community/twofactor-auth/1.0.7/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/twofactor-auth/1.0.6/templates/library/base_v1_1_3/utils.py b/trains/community/twofactor-auth/1.0.7/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/twofactor-auth/1.0.6/templates/library/base_v1_1_3/utils.py rename to trains/community/twofactor-auth/1.0.7/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/twofactor-auth/1.0.6/templates/test_values/basic-values.yaml b/trains/community/twofactor-auth/1.0.7/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/twofactor-auth/1.0.6/templates/test_values/basic-values.yaml rename to trains/community/twofactor-auth/1.0.7/templates/test_values/basic-values.yaml diff --git a/trains/community/twofactor-auth/1.0.6/templates/test_values/reverse-proxy-guard-values.yaml b/trains/community/twofactor-auth/1.0.7/templates/test_values/reverse-proxy-guard-values.yaml similarity index 100% rename from trains/community/twofactor-auth/1.0.6/templates/test_values/reverse-proxy-guard-values.yaml rename to trains/community/twofactor-auth/1.0.7/templates/test_values/reverse-proxy-guard-values.yaml diff --git a/trains/community/unifi-controller/1.2.10/templates/library/base_v1_1_3/healthchecks.py b/trains/community/unifi-controller/1.2.10/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/community/unifi-controller/1.2.10/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/unifi-controller/1.2.10/templates/library/base_v1_1_3/permissions.py b/trains/community/unifi-controller/1.2.10/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/community/unifi-controller/1.2.10/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/community/unifi-controller/1.2.10/README.md b/trains/community/unifi-controller/1.2.11/README.md similarity index 100% rename from trains/community/unifi-controller/1.2.10/README.md rename to trains/community/unifi-controller/1.2.11/README.md diff --git a/trains/community/unifi-controller/1.2.10/app.yaml b/trains/community/unifi-controller/1.2.11/app.yaml similarity index 87% rename from trains/community/unifi-controller/1.2.10/app.yaml rename to trains/community/unifi-controller/1.2.11/app.yaml index 4a513498d7..3667f07b51 100644 --- a/trains/community/unifi-controller/1.2.10/app.yaml +++ b/trains/community/unifi-controller/1.2.11/app.yaml @@ -10,8 +10,8 @@ keywords: - controller - unifi - network -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -30,4 +30,4 @@ sources: - https://hub.docker.com/r/goofball222/unifi title: Unifi Controller train: community -version: 1.2.10 +version: 1.2.11 diff --git a/trains/community/unifi-controller/1.2.10/ix_values.yaml b/trains/community/unifi-controller/1.2.11/ix_values.yaml similarity index 100% rename from trains/community/unifi-controller/1.2.10/ix_values.yaml rename to trains/community/unifi-controller/1.2.11/ix_values.yaml diff --git a/trains/community/unifi-controller/1.2.10/migrations/migrate_from_kubernetes b/trains/community/unifi-controller/1.2.11/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/unifi-controller/1.2.10/migrations/migrate_from_kubernetes rename to trains/community/unifi-controller/1.2.11/migrations/migrate_from_kubernetes diff --git a/trains/community/unifi-controller/1.2.10/migrations/migration_helpers/__init__.py b/trains/community/unifi-controller/1.2.11/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/unifi-controller/1.2.10/migrations/migration_helpers/__init__.py rename to trains/community/unifi-controller/1.2.11/migrations/migration_helpers/__init__.py diff --git a/trains/community/unifi-controller/1.2.10/migrations/migration_helpers/cpu.py b/trains/community/unifi-controller/1.2.11/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/unifi-controller/1.2.10/migrations/migration_helpers/cpu.py rename to trains/community/unifi-controller/1.2.11/migrations/migration_helpers/cpu.py diff --git a/trains/community/unifi-controller/1.2.10/migrations/migration_helpers/dns_config.py b/trains/community/unifi-controller/1.2.11/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/unifi-controller/1.2.10/migrations/migration_helpers/dns_config.py rename to trains/community/unifi-controller/1.2.11/migrations/migration_helpers/dns_config.py diff --git a/trains/community/unifi-controller/1.2.10/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/unifi-controller/1.2.11/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/unifi-controller/1.2.10/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/unifi-controller/1.2.11/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/unifi-controller/1.2.10/migrations/migration_helpers/memory.py b/trains/community/unifi-controller/1.2.11/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/unifi-controller/1.2.10/migrations/migration_helpers/memory.py rename to trains/community/unifi-controller/1.2.11/migrations/migration_helpers/memory.py diff --git a/trains/community/unifi-controller/1.2.10/migrations/migration_helpers/resources.py b/trains/community/unifi-controller/1.2.11/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/unifi-controller/1.2.10/migrations/migration_helpers/resources.py rename to trains/community/unifi-controller/1.2.11/migrations/migration_helpers/resources.py diff --git a/trains/community/unifi-controller/1.2.10/migrations/migration_helpers/storage.py b/trains/community/unifi-controller/1.2.11/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/unifi-controller/1.2.10/migrations/migration_helpers/storage.py rename to trains/community/unifi-controller/1.2.11/migrations/migration_helpers/storage.py diff --git a/trains/community/unifi-controller/1.2.10/questions.yaml b/trains/community/unifi-controller/1.2.11/questions.yaml similarity index 100% rename from trains/community/unifi-controller/1.2.10/questions.yaml rename to trains/community/unifi-controller/1.2.11/questions.yaml diff --git a/trains/community/unifi-controller/1.2.10/templates/docker-compose.yaml b/trains/community/unifi-controller/1.2.11/templates/docker-compose.yaml similarity index 100% rename from trains/community/unifi-controller/1.2.10/templates/docker-compose.yaml rename to trains/community/unifi-controller/1.2.11/templates/docker-compose.yaml diff --git a/trains/community/unifi-controller/1.2.10/templates/library/base_v1_1_3/__init__.py b/trains/community/unifi-controller/1.2.11/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/unifi-controller/1.2.10/templates/library/base_v1_1_3/__init__.py rename to trains/community/unifi-controller/1.2.11/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/unifi-controller/1.2.10/templates/library/base_v1_1_3/environment.py b/trains/community/unifi-controller/1.2.11/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/unifi-controller/1.2.10/templates/library/base_v1_1_3/environment.py rename to trains/community/unifi-controller/1.2.11/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/unifi-controller/1.2.11/templates/library/base_v1_1_4/healthchecks.py b/trains/community/unifi-controller/1.2.11/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/community/unifi-controller/1.2.11/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/unifi-controller/1.2.10/templates/library/base_v1_1_3/mariadb.py b/trains/community/unifi-controller/1.2.11/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/unifi-controller/1.2.10/templates/library/base_v1_1_3/mariadb.py rename to trains/community/unifi-controller/1.2.11/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/unifi-controller/1.2.10/templates/library/base_v1_1_3/metadata.py b/trains/community/unifi-controller/1.2.11/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/unifi-controller/1.2.10/templates/library/base_v1_1_3/metadata.py rename to trains/community/unifi-controller/1.2.11/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/unifi-controller/1.2.10/templates/library/base_v1_1_3/network.py b/trains/community/unifi-controller/1.2.11/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/unifi-controller/1.2.10/templates/library/base_v1_1_3/network.py rename to trains/community/unifi-controller/1.2.11/templates/library/base_v1_1_4/network.py diff --git a/trains/community/unifi-controller/1.2.11/templates/library/base_v1_1_4/permissions.py b/trains/community/unifi-controller/1.2.11/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/community/unifi-controller/1.2.11/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/community/unifi-controller/1.2.10/templates/library/base_v1_1_3/ports.py b/trains/community/unifi-controller/1.2.11/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/unifi-controller/1.2.10/templates/library/base_v1_1_3/ports.py rename to trains/community/unifi-controller/1.2.11/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/unifi-controller/1.2.10/templates/library/base_v1_1_3/postgres.py b/trains/community/unifi-controller/1.2.11/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/unifi-controller/1.2.10/templates/library/base_v1_1_3/postgres.py rename to trains/community/unifi-controller/1.2.11/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/unifi-controller/1.2.10/templates/library/base_v1_1_3/redis.py b/trains/community/unifi-controller/1.2.11/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/unifi-controller/1.2.10/templates/library/base_v1_1_3/redis.py rename to trains/community/unifi-controller/1.2.11/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/unifi-controller/1.2.10/templates/library/base_v1_1_3/resources.py b/trains/community/unifi-controller/1.2.11/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/unifi-controller/1.2.10/templates/library/base_v1_1_3/resources.py rename to trains/community/unifi-controller/1.2.11/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/unifi-controller/1.2.10/templates/library/base_v1_1_3/security.py b/trains/community/unifi-controller/1.2.11/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/unifi-controller/1.2.10/templates/library/base_v1_1_3/security.py rename to trains/community/unifi-controller/1.2.11/templates/library/base_v1_1_4/security.py diff --git a/trains/community/unifi-controller/1.2.10/templates/library/base_v1_1_3/storage.py b/trains/community/unifi-controller/1.2.11/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/unifi-controller/1.2.10/templates/library/base_v1_1_3/storage.py rename to trains/community/unifi-controller/1.2.11/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/unifi-controller/1.2.10/templates/library/base_v1_1_3/utils.py b/trains/community/unifi-controller/1.2.11/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/unifi-controller/1.2.10/templates/library/base_v1_1_3/utils.py rename to trains/community/unifi-controller/1.2.11/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/unifi-controller/1.2.10/templates/test_values/basic-values.yaml b/trains/community/unifi-controller/1.2.11/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/unifi-controller/1.2.10/templates/test_values/basic-values.yaml rename to trains/community/unifi-controller/1.2.11/templates/test_values/basic-values.yaml diff --git a/trains/community/unifi-controller/1.2.10/templates/test_values/https-values.yaml b/trains/community/unifi-controller/1.2.11/templates/test_values/https-values.yaml similarity index 100% rename from trains/community/unifi-controller/1.2.10/templates/test_values/https-values.yaml rename to trains/community/unifi-controller/1.2.11/templates/test_values/https-values.yaml diff --git a/trains/community/unifi-protect-backup/1.0.16/templates/library/base_v1_1_3/healthchecks.py b/trains/community/unifi-protect-backup/1.0.16/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/community/unifi-protect-backup/1.0.16/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/unifi-protect-backup/1.0.16/templates/library/base_v1_1_3/permissions.py b/trains/community/unifi-protect-backup/1.0.16/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/community/unifi-protect-backup/1.0.16/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/community/unifi-protect-backup/1.0.16/README.md b/trains/community/unifi-protect-backup/1.0.17/README.md similarity index 100% rename from trains/community/unifi-protect-backup/1.0.16/README.md rename to trains/community/unifi-protect-backup/1.0.17/README.md diff --git a/trains/community/unifi-protect-backup/1.0.16/app.yaml b/trains/community/unifi-protect-backup/1.0.17/app.yaml similarity index 90% rename from trains/community/unifi-protect-backup/1.0.16/app.yaml rename to trains/community/unifi-protect-backup/1.0.17/app.yaml index efad761ca1..5e95f9953d 100644 --- a/trains/community/unifi-protect-backup/1.0.16/app.yaml +++ b/trains/community/unifi-protect-backup/1.0.17/app.yaml @@ -18,8 +18,8 @@ icon: https://media.sys.truenas.net/apps/unifi-protect-backup/icons/icon.svg keywords: - backup - unifi-protect -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -37,4 +37,4 @@ sources: - https://github.com/ep1cman/unifi-protect-backup/pkgs/container/unifi-protect-backup title: Unifi Protect Backup train: community -version: 1.0.16 +version: 1.0.17 diff --git a/trains/community/unifi-protect-backup/1.0.16/ix_values.yaml b/trains/community/unifi-protect-backup/1.0.17/ix_values.yaml similarity index 100% rename from trains/community/unifi-protect-backup/1.0.16/ix_values.yaml rename to trains/community/unifi-protect-backup/1.0.17/ix_values.yaml diff --git a/trains/community/unifi-protect-backup/1.0.16/migrations/migrate_from_kubernetes b/trains/community/unifi-protect-backup/1.0.17/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/unifi-protect-backup/1.0.16/migrations/migrate_from_kubernetes rename to trains/community/unifi-protect-backup/1.0.17/migrations/migrate_from_kubernetes diff --git a/trains/community/unifi-protect-backup/1.0.16/migrations/migration_helpers/__init__.py b/trains/community/unifi-protect-backup/1.0.17/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/unifi-protect-backup/1.0.16/migrations/migration_helpers/__init__.py rename to trains/community/unifi-protect-backup/1.0.17/migrations/migration_helpers/__init__.py diff --git a/trains/community/unifi-protect-backup/1.0.16/migrations/migration_helpers/cpu.py b/trains/community/unifi-protect-backup/1.0.17/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/unifi-protect-backup/1.0.16/migrations/migration_helpers/cpu.py rename to trains/community/unifi-protect-backup/1.0.17/migrations/migration_helpers/cpu.py diff --git a/trains/community/unifi-protect-backup/1.0.16/migrations/migration_helpers/dns_config.py b/trains/community/unifi-protect-backup/1.0.17/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/unifi-protect-backup/1.0.16/migrations/migration_helpers/dns_config.py rename to trains/community/unifi-protect-backup/1.0.17/migrations/migration_helpers/dns_config.py diff --git a/trains/community/unifi-protect-backup/1.0.16/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/unifi-protect-backup/1.0.17/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/unifi-protect-backup/1.0.16/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/unifi-protect-backup/1.0.17/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/unifi-protect-backup/1.0.16/migrations/migration_helpers/memory.py b/trains/community/unifi-protect-backup/1.0.17/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/unifi-protect-backup/1.0.16/migrations/migration_helpers/memory.py rename to trains/community/unifi-protect-backup/1.0.17/migrations/migration_helpers/memory.py diff --git a/trains/community/unifi-protect-backup/1.0.16/migrations/migration_helpers/resources.py b/trains/community/unifi-protect-backup/1.0.17/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/unifi-protect-backup/1.0.16/migrations/migration_helpers/resources.py rename to trains/community/unifi-protect-backup/1.0.17/migrations/migration_helpers/resources.py diff --git a/trains/community/unifi-protect-backup/1.0.16/migrations/migration_helpers/storage.py b/trains/community/unifi-protect-backup/1.0.17/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/unifi-protect-backup/1.0.16/migrations/migration_helpers/storage.py rename to trains/community/unifi-protect-backup/1.0.17/migrations/migration_helpers/storage.py diff --git a/trains/community/unifi-protect-backup/1.0.16/questions.yaml b/trains/community/unifi-protect-backup/1.0.17/questions.yaml similarity index 100% rename from trains/community/unifi-protect-backup/1.0.16/questions.yaml rename to trains/community/unifi-protect-backup/1.0.17/questions.yaml diff --git a/trains/community/unifi-protect-backup/1.0.16/templates/docker-compose.yaml b/trains/community/unifi-protect-backup/1.0.17/templates/docker-compose.yaml similarity index 100% rename from trains/community/unifi-protect-backup/1.0.16/templates/docker-compose.yaml rename to trains/community/unifi-protect-backup/1.0.17/templates/docker-compose.yaml diff --git a/trains/community/unifi-protect-backup/1.0.16/templates/library/base_v1_1_3/__init__.py b/trains/community/unifi-protect-backup/1.0.17/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/unifi-protect-backup/1.0.16/templates/library/base_v1_1_3/__init__.py rename to trains/community/unifi-protect-backup/1.0.17/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/unifi-protect-backup/1.0.16/templates/library/base_v1_1_3/environment.py b/trains/community/unifi-protect-backup/1.0.17/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/unifi-protect-backup/1.0.16/templates/library/base_v1_1_3/environment.py rename to trains/community/unifi-protect-backup/1.0.17/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/unifi-protect-backup/1.0.17/templates/library/base_v1_1_4/healthchecks.py b/trains/community/unifi-protect-backup/1.0.17/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/community/unifi-protect-backup/1.0.17/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/unifi-protect-backup/1.0.16/templates/library/base_v1_1_3/mariadb.py b/trains/community/unifi-protect-backup/1.0.17/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/unifi-protect-backup/1.0.16/templates/library/base_v1_1_3/mariadb.py rename to trains/community/unifi-protect-backup/1.0.17/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/unifi-protect-backup/1.0.16/templates/library/base_v1_1_3/metadata.py b/trains/community/unifi-protect-backup/1.0.17/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/unifi-protect-backup/1.0.16/templates/library/base_v1_1_3/metadata.py rename to trains/community/unifi-protect-backup/1.0.17/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/unifi-protect-backup/1.0.16/templates/library/base_v1_1_3/network.py b/trains/community/unifi-protect-backup/1.0.17/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/unifi-protect-backup/1.0.16/templates/library/base_v1_1_3/network.py rename to trains/community/unifi-protect-backup/1.0.17/templates/library/base_v1_1_4/network.py diff --git a/trains/community/unifi-protect-backup/1.0.17/templates/library/base_v1_1_4/permissions.py b/trains/community/unifi-protect-backup/1.0.17/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/community/unifi-protect-backup/1.0.17/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/community/unifi-protect-backup/1.0.16/templates/library/base_v1_1_3/ports.py b/trains/community/unifi-protect-backup/1.0.17/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/unifi-protect-backup/1.0.16/templates/library/base_v1_1_3/ports.py rename to trains/community/unifi-protect-backup/1.0.17/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/unifi-protect-backup/1.0.16/templates/library/base_v1_1_3/postgres.py b/trains/community/unifi-protect-backup/1.0.17/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/unifi-protect-backup/1.0.16/templates/library/base_v1_1_3/postgres.py rename to trains/community/unifi-protect-backup/1.0.17/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/unifi-protect-backup/1.0.16/templates/library/base_v1_1_3/redis.py b/trains/community/unifi-protect-backup/1.0.17/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/unifi-protect-backup/1.0.16/templates/library/base_v1_1_3/redis.py rename to trains/community/unifi-protect-backup/1.0.17/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/unifi-protect-backup/1.0.16/templates/library/base_v1_1_3/resources.py b/trains/community/unifi-protect-backup/1.0.17/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/unifi-protect-backup/1.0.16/templates/library/base_v1_1_3/resources.py rename to trains/community/unifi-protect-backup/1.0.17/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/unifi-protect-backup/1.0.16/templates/library/base_v1_1_3/security.py b/trains/community/unifi-protect-backup/1.0.17/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/unifi-protect-backup/1.0.16/templates/library/base_v1_1_3/security.py rename to trains/community/unifi-protect-backup/1.0.17/templates/library/base_v1_1_4/security.py diff --git a/trains/community/unifi-protect-backup/1.0.16/templates/library/base_v1_1_3/storage.py b/trains/community/unifi-protect-backup/1.0.17/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/unifi-protect-backup/1.0.16/templates/library/base_v1_1_3/storage.py rename to trains/community/unifi-protect-backup/1.0.17/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/unifi-protect-backup/1.0.16/templates/library/base_v1_1_3/utils.py b/trains/community/unifi-protect-backup/1.0.17/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/unifi-protect-backup/1.0.16/templates/library/base_v1_1_3/utils.py rename to trains/community/unifi-protect-backup/1.0.17/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/unifi-protect-backup/1.0.16/templates/test_values/basic-values.yaml b/trains/community/unifi-protect-backup/1.0.17/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/unifi-protect-backup/1.0.16/templates/test_values/basic-values.yaml rename to trains/community/unifi-protect-backup/1.0.17/templates/test_values/basic-values.yaml diff --git a/trains/community/vaultwarden/1.0.6/templates/library/base_v1_1_3/healthchecks.py b/trains/community/vaultwarden/1.0.6/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/community/vaultwarden/1.0.6/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/vaultwarden/1.0.6/templates/library/base_v1_1_3/permissions.py b/trains/community/vaultwarden/1.0.6/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/community/vaultwarden/1.0.6/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/community/vaultwarden/1.0.6/README.md b/trains/community/vaultwarden/1.0.7/README.md similarity index 100% rename from trains/community/vaultwarden/1.0.6/README.md rename to trains/community/vaultwarden/1.0.7/README.md diff --git a/trains/community/vaultwarden/1.0.6/app.yaml b/trains/community/vaultwarden/1.0.7/app.yaml similarity index 88% rename from trains/community/vaultwarden/1.0.6/app.yaml rename to trains/community/vaultwarden/1.0.7/app.yaml index 5b7de00253..a5abd79800 100644 --- a/trains/community/vaultwarden/1.0.6/app.yaml +++ b/trains/community/vaultwarden/1.0.7/app.yaml @@ -10,8 +10,8 @@ icon: https://media.sys.truenas.net/apps/vaultwarden/icons/icon.png keywords: - password - manager -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -34,4 +34,4 @@ sources: - https://github.com/dani-garcia/vaultwarden title: Vaultwarden train: community -version: 1.0.6 +version: 1.0.7 diff --git a/trains/community/vaultwarden/1.0.6/ix_values.yaml b/trains/community/vaultwarden/1.0.7/ix_values.yaml similarity index 100% rename from trains/community/vaultwarden/1.0.6/ix_values.yaml rename to trains/community/vaultwarden/1.0.7/ix_values.yaml diff --git a/trains/community/vaultwarden/1.0.6/migrations/migrate_from_kubernetes b/trains/community/vaultwarden/1.0.7/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/vaultwarden/1.0.6/migrations/migrate_from_kubernetes rename to trains/community/vaultwarden/1.0.7/migrations/migrate_from_kubernetes diff --git a/trains/community/vaultwarden/1.0.6/migrations/migration_helpers/__init__.py b/trains/community/vaultwarden/1.0.7/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/vaultwarden/1.0.6/migrations/migration_helpers/__init__.py rename to trains/community/vaultwarden/1.0.7/migrations/migration_helpers/__init__.py diff --git a/trains/community/vaultwarden/1.0.6/migrations/migration_helpers/cpu.py b/trains/community/vaultwarden/1.0.7/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/vaultwarden/1.0.6/migrations/migration_helpers/cpu.py rename to trains/community/vaultwarden/1.0.7/migrations/migration_helpers/cpu.py diff --git a/trains/community/vaultwarden/1.0.6/migrations/migration_helpers/dns_config.py b/trains/community/vaultwarden/1.0.7/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/vaultwarden/1.0.6/migrations/migration_helpers/dns_config.py rename to trains/community/vaultwarden/1.0.7/migrations/migration_helpers/dns_config.py diff --git a/trains/community/vaultwarden/1.0.6/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/vaultwarden/1.0.7/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/vaultwarden/1.0.6/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/vaultwarden/1.0.7/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/vaultwarden/1.0.6/migrations/migration_helpers/memory.py b/trains/community/vaultwarden/1.0.7/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/vaultwarden/1.0.6/migrations/migration_helpers/memory.py rename to trains/community/vaultwarden/1.0.7/migrations/migration_helpers/memory.py diff --git a/trains/community/vaultwarden/1.0.6/migrations/migration_helpers/resources.py b/trains/community/vaultwarden/1.0.7/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/vaultwarden/1.0.6/migrations/migration_helpers/resources.py rename to trains/community/vaultwarden/1.0.7/migrations/migration_helpers/resources.py diff --git a/trains/community/vaultwarden/1.0.6/migrations/migration_helpers/storage.py b/trains/community/vaultwarden/1.0.7/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/vaultwarden/1.0.6/migrations/migration_helpers/storage.py rename to trains/community/vaultwarden/1.0.7/migrations/migration_helpers/storage.py diff --git a/trains/community/vaultwarden/1.0.6/questions.yaml b/trains/community/vaultwarden/1.0.7/questions.yaml similarity index 100% rename from trains/community/vaultwarden/1.0.6/questions.yaml rename to trains/community/vaultwarden/1.0.7/questions.yaml diff --git a/trains/community/vaultwarden/1.0.6/templates/docker-compose.yaml b/trains/community/vaultwarden/1.0.7/templates/docker-compose.yaml similarity index 100% rename from trains/community/vaultwarden/1.0.6/templates/docker-compose.yaml rename to trains/community/vaultwarden/1.0.7/templates/docker-compose.yaml diff --git a/trains/community/vaultwarden/1.0.6/templates/library/base_v1_1_3/__init__.py b/trains/community/vaultwarden/1.0.7/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/vaultwarden/1.0.6/templates/library/base_v1_1_3/__init__.py rename to trains/community/vaultwarden/1.0.7/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/vaultwarden/1.0.6/templates/library/base_v1_1_3/environment.py b/trains/community/vaultwarden/1.0.7/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/vaultwarden/1.0.6/templates/library/base_v1_1_3/environment.py rename to trains/community/vaultwarden/1.0.7/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/vaultwarden/1.0.7/templates/library/base_v1_1_4/healthchecks.py b/trains/community/vaultwarden/1.0.7/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/community/vaultwarden/1.0.7/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/vaultwarden/1.0.6/templates/library/base_v1_1_3/mariadb.py b/trains/community/vaultwarden/1.0.7/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/vaultwarden/1.0.6/templates/library/base_v1_1_3/mariadb.py rename to trains/community/vaultwarden/1.0.7/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/vaultwarden/1.0.6/templates/library/base_v1_1_3/metadata.py b/trains/community/vaultwarden/1.0.7/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/vaultwarden/1.0.6/templates/library/base_v1_1_3/metadata.py rename to trains/community/vaultwarden/1.0.7/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/vaultwarden/1.0.6/templates/library/base_v1_1_3/network.py b/trains/community/vaultwarden/1.0.7/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/vaultwarden/1.0.6/templates/library/base_v1_1_3/network.py rename to trains/community/vaultwarden/1.0.7/templates/library/base_v1_1_4/network.py diff --git a/trains/community/vaultwarden/1.0.7/templates/library/base_v1_1_4/permissions.py b/trains/community/vaultwarden/1.0.7/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/community/vaultwarden/1.0.7/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/community/vaultwarden/1.0.6/templates/library/base_v1_1_3/ports.py b/trains/community/vaultwarden/1.0.7/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/vaultwarden/1.0.6/templates/library/base_v1_1_3/ports.py rename to trains/community/vaultwarden/1.0.7/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/vaultwarden/1.0.6/templates/library/base_v1_1_3/postgres.py b/trains/community/vaultwarden/1.0.7/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/vaultwarden/1.0.6/templates/library/base_v1_1_3/postgres.py rename to trains/community/vaultwarden/1.0.7/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/vaultwarden/1.0.6/templates/library/base_v1_1_3/redis.py b/trains/community/vaultwarden/1.0.7/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/vaultwarden/1.0.6/templates/library/base_v1_1_3/redis.py rename to trains/community/vaultwarden/1.0.7/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/vaultwarden/1.0.6/templates/library/base_v1_1_3/resources.py b/trains/community/vaultwarden/1.0.7/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/vaultwarden/1.0.6/templates/library/base_v1_1_3/resources.py rename to trains/community/vaultwarden/1.0.7/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/vaultwarden/1.0.6/templates/library/base_v1_1_3/security.py b/trains/community/vaultwarden/1.0.7/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/vaultwarden/1.0.6/templates/library/base_v1_1_3/security.py rename to trains/community/vaultwarden/1.0.7/templates/library/base_v1_1_4/security.py diff --git a/trains/community/vaultwarden/1.0.6/templates/library/base_v1_1_3/storage.py b/trains/community/vaultwarden/1.0.7/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/vaultwarden/1.0.6/templates/library/base_v1_1_3/storage.py rename to trains/community/vaultwarden/1.0.7/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/vaultwarden/1.0.6/templates/library/base_v1_1_3/utils.py b/trains/community/vaultwarden/1.0.7/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/vaultwarden/1.0.6/templates/library/base_v1_1_3/utils.py rename to trains/community/vaultwarden/1.0.7/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/vaultwarden/1.0.6/templates/test_values/basic-values.yaml b/trains/community/vaultwarden/1.0.7/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/vaultwarden/1.0.6/templates/test_values/basic-values.yaml rename to trains/community/vaultwarden/1.0.7/templates/test_values/basic-values.yaml diff --git a/trains/community/vaultwarden/1.0.6/templates/test_values/https-values.yaml b/trains/community/vaultwarden/1.0.7/templates/test_values/https-values.yaml similarity index 100% rename from trains/community/vaultwarden/1.0.6/templates/test_values/https-values.yaml rename to trains/community/vaultwarden/1.0.7/templates/test_values/https-values.yaml diff --git a/trains/community/vaultwarden/1.0.6/templates/test_values/no-admin-values.yaml b/trains/community/vaultwarden/1.0.7/templates/test_values/no-admin-values.yaml similarity index 100% rename from trains/community/vaultwarden/1.0.6/templates/test_values/no-admin-values.yaml rename to trains/community/vaultwarden/1.0.7/templates/test_values/no-admin-values.yaml diff --git a/trains/community/vaultwarden/1.0.6/templates/test_values/no-ws-values.yaml b/trains/community/vaultwarden/1.0.7/templates/test_values/no-ws-values.yaml similarity index 100% rename from trains/community/vaultwarden/1.0.6/templates/test_values/no-ws-values.yaml rename to trains/community/vaultwarden/1.0.7/templates/test_values/no-ws-values.yaml diff --git a/trains/community/vikunja/1.2.13/templates/library/base_v1_1_3/healthchecks.py b/trains/community/vikunja/1.2.13/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/community/vikunja/1.2.13/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/vikunja/1.2.13/templates/library/base_v1_1_3/permissions.py b/trains/community/vikunja/1.2.13/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/community/vikunja/1.2.13/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/community/vikunja/1.2.13/README.md b/trains/community/vikunja/1.2.14/README.md similarity index 100% rename from trains/community/vikunja/1.2.13/README.md rename to trains/community/vikunja/1.2.14/README.md diff --git a/trains/community/vikunja/1.2.13/app.yaml b/trains/community/vikunja/1.2.14/app.yaml similarity index 92% rename from trains/community/vikunja/1.2.13/app.yaml rename to trains/community/vikunja/1.2.14/app.yaml index 93f4cb6303..b6f2b7551d 100644 --- a/trains/community/vikunja/1.2.13/app.yaml +++ b/trains/community/vikunja/1.2.14/app.yaml @@ -8,8 +8,8 @@ host_mounts: [] icon: https://media.sys.truenas.net/apps/vikunja/icons/icon.png keywords: - todo -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -46,4 +46,4 @@ sources: - https://vikunja.io/ title: Vikunja train: community -version: 1.2.13 +version: 1.2.14 diff --git a/trains/community/vikunja/1.2.13/ix_values.yaml b/trains/community/vikunja/1.2.14/ix_values.yaml similarity index 100% rename from trains/community/vikunja/1.2.13/ix_values.yaml rename to trains/community/vikunja/1.2.14/ix_values.yaml diff --git a/trains/community/vikunja/1.2.13/migrations/migrate_from_kubernetes b/trains/community/vikunja/1.2.14/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/vikunja/1.2.13/migrations/migrate_from_kubernetes rename to trains/community/vikunja/1.2.14/migrations/migrate_from_kubernetes diff --git a/trains/community/vikunja/1.2.13/migrations/migration_helpers/__init__.py b/trains/community/vikunja/1.2.14/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/vikunja/1.2.13/migrations/migration_helpers/__init__.py rename to trains/community/vikunja/1.2.14/migrations/migration_helpers/__init__.py diff --git a/trains/community/vikunja/1.2.13/migrations/migration_helpers/cpu.py b/trains/community/vikunja/1.2.14/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/vikunja/1.2.13/migrations/migration_helpers/cpu.py rename to trains/community/vikunja/1.2.14/migrations/migration_helpers/cpu.py diff --git a/trains/community/vikunja/1.2.13/migrations/migration_helpers/dns_config.py b/trains/community/vikunja/1.2.14/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/vikunja/1.2.13/migrations/migration_helpers/dns_config.py rename to trains/community/vikunja/1.2.14/migrations/migration_helpers/dns_config.py diff --git a/trains/community/vikunja/1.2.13/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/vikunja/1.2.14/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/vikunja/1.2.13/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/vikunja/1.2.14/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/vikunja/1.2.13/migrations/migration_helpers/memory.py b/trains/community/vikunja/1.2.14/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/vikunja/1.2.13/migrations/migration_helpers/memory.py rename to trains/community/vikunja/1.2.14/migrations/migration_helpers/memory.py diff --git a/trains/community/vikunja/1.2.13/migrations/migration_helpers/resources.py b/trains/community/vikunja/1.2.14/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/vikunja/1.2.13/migrations/migration_helpers/resources.py rename to trains/community/vikunja/1.2.14/migrations/migration_helpers/resources.py diff --git a/trains/community/vikunja/1.2.13/migrations/migration_helpers/storage.py b/trains/community/vikunja/1.2.14/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/vikunja/1.2.13/migrations/migration_helpers/storage.py rename to trains/community/vikunja/1.2.14/migrations/migration_helpers/storage.py diff --git a/trains/community/vikunja/1.2.13/questions.yaml b/trains/community/vikunja/1.2.14/questions.yaml similarity index 100% rename from trains/community/vikunja/1.2.13/questions.yaml rename to trains/community/vikunja/1.2.14/questions.yaml diff --git a/trains/community/vikunja/1.2.13/templates/docker-compose.yaml b/trains/community/vikunja/1.2.14/templates/docker-compose.yaml similarity index 100% rename from trains/community/vikunja/1.2.13/templates/docker-compose.yaml rename to trains/community/vikunja/1.2.14/templates/docker-compose.yaml diff --git a/trains/community/vikunja/1.2.13/templates/library/base_v1_1_3/__init__.py b/trains/community/vikunja/1.2.14/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/vikunja/1.2.13/templates/library/base_v1_1_3/__init__.py rename to trains/community/vikunja/1.2.14/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/vikunja/1.2.13/templates/library/base_v1_1_3/environment.py b/trains/community/vikunja/1.2.14/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/vikunja/1.2.13/templates/library/base_v1_1_3/environment.py rename to trains/community/vikunja/1.2.14/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/vikunja/1.2.14/templates/library/base_v1_1_4/healthchecks.py b/trains/community/vikunja/1.2.14/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/community/vikunja/1.2.14/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/vikunja/1.2.13/templates/library/base_v1_1_3/mariadb.py b/trains/community/vikunja/1.2.14/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/vikunja/1.2.13/templates/library/base_v1_1_3/mariadb.py rename to trains/community/vikunja/1.2.14/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/vikunja/1.2.13/templates/library/base_v1_1_3/metadata.py b/trains/community/vikunja/1.2.14/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/vikunja/1.2.13/templates/library/base_v1_1_3/metadata.py rename to trains/community/vikunja/1.2.14/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/vikunja/1.2.13/templates/library/base_v1_1_3/network.py b/trains/community/vikunja/1.2.14/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/vikunja/1.2.13/templates/library/base_v1_1_3/network.py rename to trains/community/vikunja/1.2.14/templates/library/base_v1_1_4/network.py diff --git a/trains/community/vikunja/1.2.14/templates/library/base_v1_1_4/permissions.py b/trains/community/vikunja/1.2.14/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/community/vikunja/1.2.14/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/community/vikunja/1.2.13/templates/library/base_v1_1_3/ports.py b/trains/community/vikunja/1.2.14/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/vikunja/1.2.13/templates/library/base_v1_1_3/ports.py rename to trains/community/vikunja/1.2.14/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/vikunja/1.2.13/templates/library/base_v1_1_3/postgres.py b/trains/community/vikunja/1.2.14/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/vikunja/1.2.13/templates/library/base_v1_1_3/postgres.py rename to trains/community/vikunja/1.2.14/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/vikunja/1.2.13/templates/library/base_v1_1_3/redis.py b/trains/community/vikunja/1.2.14/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/vikunja/1.2.13/templates/library/base_v1_1_3/redis.py rename to trains/community/vikunja/1.2.14/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/vikunja/1.2.13/templates/library/base_v1_1_3/resources.py b/trains/community/vikunja/1.2.14/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/vikunja/1.2.13/templates/library/base_v1_1_3/resources.py rename to trains/community/vikunja/1.2.14/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/vikunja/1.2.13/templates/library/base_v1_1_3/security.py b/trains/community/vikunja/1.2.14/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/vikunja/1.2.13/templates/library/base_v1_1_3/security.py rename to trains/community/vikunja/1.2.14/templates/library/base_v1_1_4/security.py diff --git a/trains/community/vikunja/1.2.13/templates/library/base_v1_1_3/storage.py b/trains/community/vikunja/1.2.14/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/vikunja/1.2.13/templates/library/base_v1_1_3/storage.py rename to trains/community/vikunja/1.2.14/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/vikunja/1.2.13/templates/library/base_v1_1_3/utils.py b/trains/community/vikunja/1.2.14/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/vikunja/1.2.13/templates/library/base_v1_1_3/utils.py rename to trains/community/vikunja/1.2.14/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/vikunja/1.2.13/templates/test_values/basic-values.yaml b/trains/community/vikunja/1.2.14/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/vikunja/1.2.13/templates/test_values/basic-values.yaml rename to trains/community/vikunja/1.2.14/templates/test_values/basic-values.yaml diff --git a/trains/community/webdav/1.0.12/templates/library/base_v1_1_3/healthchecks.py b/trains/community/webdav/1.0.12/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/community/webdav/1.0.12/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/webdav/1.0.12/templates/library/base_v1_1_3/permissions.py b/trains/community/webdav/1.0.12/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/community/webdav/1.0.12/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/community/webdav/1.0.12/README.md b/trains/community/webdav/1.0.13/README.md similarity index 100% rename from trains/community/webdav/1.0.12/README.md rename to trains/community/webdav/1.0.13/README.md diff --git a/trains/community/webdav/1.0.12/app.yaml b/trains/community/webdav/1.0.13/app.yaml similarity index 84% rename from trains/community/webdav/1.0.12/app.yaml rename to trains/community/webdav/1.0.13/app.yaml index e39604df33..7e1ec57bfa 100644 --- a/trains/community/webdav/1.0.12/app.yaml +++ b/trains/community/webdav/1.0.13/app.yaml @@ -10,8 +10,8 @@ icon: https://media.sys.truenas.net/apps/webdav/icons/icon.png keywords: - webdav - file-sharing -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -28,4 +28,4 @@ sources: - http://www.webdav.org/ title: WebDAV train: community -version: 1.0.12 +version: 1.0.13 diff --git a/trains/community/webdav/1.0.12/ix_values.yaml b/trains/community/webdav/1.0.13/ix_values.yaml similarity index 100% rename from trains/community/webdav/1.0.12/ix_values.yaml rename to trains/community/webdav/1.0.13/ix_values.yaml diff --git a/trains/community/webdav/1.0.12/migrations/migrate_from_kubernetes b/trains/community/webdav/1.0.13/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/webdav/1.0.12/migrations/migrate_from_kubernetes rename to trains/community/webdav/1.0.13/migrations/migrate_from_kubernetes diff --git a/trains/community/webdav/1.0.12/migrations/migration_helpers/__init__.py b/trains/community/webdav/1.0.13/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/webdav/1.0.12/migrations/migration_helpers/__init__.py rename to trains/community/webdav/1.0.13/migrations/migration_helpers/__init__.py diff --git a/trains/community/webdav/1.0.12/migrations/migration_helpers/cpu.py b/trains/community/webdav/1.0.13/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/webdav/1.0.12/migrations/migration_helpers/cpu.py rename to trains/community/webdav/1.0.13/migrations/migration_helpers/cpu.py diff --git a/trains/community/webdav/1.0.12/migrations/migration_helpers/dns_config.py b/trains/community/webdav/1.0.13/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/webdav/1.0.12/migrations/migration_helpers/dns_config.py rename to trains/community/webdav/1.0.13/migrations/migration_helpers/dns_config.py diff --git a/trains/community/webdav/1.0.12/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/webdav/1.0.13/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/webdav/1.0.12/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/webdav/1.0.13/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/webdav/1.0.12/migrations/migration_helpers/memory.py b/trains/community/webdav/1.0.13/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/webdav/1.0.12/migrations/migration_helpers/memory.py rename to trains/community/webdav/1.0.13/migrations/migration_helpers/memory.py diff --git a/trains/community/webdav/1.0.12/migrations/migration_helpers/resources.py b/trains/community/webdav/1.0.13/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/webdav/1.0.12/migrations/migration_helpers/resources.py rename to trains/community/webdav/1.0.13/migrations/migration_helpers/resources.py diff --git a/trains/community/webdav/1.0.12/migrations/migration_helpers/storage.py b/trains/community/webdav/1.0.13/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/webdav/1.0.12/migrations/migration_helpers/storage.py rename to trains/community/webdav/1.0.13/migrations/migration_helpers/storage.py diff --git a/trains/community/webdav/1.0.12/questions.yaml b/trains/community/webdav/1.0.13/questions.yaml similarity index 100% rename from trains/community/webdav/1.0.12/questions.yaml rename to trains/community/webdav/1.0.13/questions.yaml diff --git a/trains/community/webdav/1.0.12/templates/docker-compose.yaml b/trains/community/webdav/1.0.13/templates/docker-compose.yaml similarity index 100% rename from trains/community/webdav/1.0.12/templates/docker-compose.yaml rename to trains/community/webdav/1.0.13/templates/docker-compose.yaml diff --git a/trains/community/webdav/1.0.12/templates/library/base_v1_1_3/__init__.py b/trains/community/webdav/1.0.13/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/webdav/1.0.12/templates/library/base_v1_1_3/__init__.py rename to trains/community/webdav/1.0.13/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/webdav/1.0.12/templates/library/base_v1_1_3/environment.py b/trains/community/webdav/1.0.13/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/webdav/1.0.12/templates/library/base_v1_1_3/environment.py rename to trains/community/webdav/1.0.13/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/webdav/1.0.13/templates/library/base_v1_1_4/healthchecks.py b/trains/community/webdav/1.0.13/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/community/webdav/1.0.13/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/webdav/1.0.12/templates/library/base_v1_1_3/mariadb.py b/trains/community/webdav/1.0.13/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/webdav/1.0.12/templates/library/base_v1_1_3/mariadb.py rename to trains/community/webdav/1.0.13/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/webdav/1.0.12/templates/library/base_v1_1_3/metadata.py b/trains/community/webdav/1.0.13/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/webdav/1.0.12/templates/library/base_v1_1_3/metadata.py rename to trains/community/webdav/1.0.13/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/webdav/1.0.12/templates/library/base_v1_1_3/network.py b/trains/community/webdav/1.0.13/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/webdav/1.0.12/templates/library/base_v1_1_3/network.py rename to trains/community/webdav/1.0.13/templates/library/base_v1_1_4/network.py diff --git a/trains/community/webdav/1.0.13/templates/library/base_v1_1_4/permissions.py b/trains/community/webdav/1.0.13/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/community/webdav/1.0.13/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/community/webdav/1.0.12/templates/library/base_v1_1_3/ports.py b/trains/community/webdav/1.0.13/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/webdav/1.0.12/templates/library/base_v1_1_3/ports.py rename to trains/community/webdav/1.0.13/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/webdav/1.0.12/templates/library/base_v1_1_3/postgres.py b/trains/community/webdav/1.0.13/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/webdav/1.0.12/templates/library/base_v1_1_3/postgres.py rename to trains/community/webdav/1.0.13/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/webdav/1.0.12/templates/library/base_v1_1_3/redis.py b/trains/community/webdav/1.0.13/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/webdav/1.0.12/templates/library/base_v1_1_3/redis.py rename to trains/community/webdav/1.0.13/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/webdav/1.0.12/templates/library/base_v1_1_3/resources.py b/trains/community/webdav/1.0.13/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/webdav/1.0.12/templates/library/base_v1_1_3/resources.py rename to trains/community/webdav/1.0.13/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/webdav/1.0.12/templates/library/base_v1_1_3/security.py b/trains/community/webdav/1.0.13/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/webdav/1.0.12/templates/library/base_v1_1_3/security.py rename to trains/community/webdav/1.0.13/templates/library/base_v1_1_4/security.py diff --git a/trains/community/webdav/1.0.12/templates/library/base_v1_1_3/storage.py b/trains/community/webdav/1.0.13/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/webdav/1.0.12/templates/library/base_v1_1_3/storage.py rename to trains/community/webdav/1.0.13/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/webdav/1.0.12/templates/library/base_v1_1_3/utils.py b/trains/community/webdav/1.0.13/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/webdav/1.0.12/templates/library/base_v1_1_3/utils.py rename to trains/community/webdav/1.0.13/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/webdav/1.0.12/templates/test_values/extra-values.yaml b/trains/community/webdav/1.0.13/templates/test_values/extra-values.yaml similarity index 100% rename from trains/community/webdav/1.0.12/templates/test_values/extra-values.yaml rename to trains/community/webdav/1.0.13/templates/test_values/extra-values.yaml diff --git a/trains/community/webdav/1.0.12/templates/test_values/http-basicauth-other-user-values.yaml b/trains/community/webdav/1.0.13/templates/test_values/http-basicauth-other-user-values.yaml similarity index 100% rename from trains/community/webdav/1.0.12/templates/test_values/http-basicauth-other-user-values.yaml rename to trains/community/webdav/1.0.13/templates/test_values/http-basicauth-other-user-values.yaml diff --git a/trains/community/webdav/1.0.12/templates/test_values/http-basicauth-values.yaml b/trains/community/webdav/1.0.13/templates/test_values/http-basicauth-values.yaml similarity index 100% rename from trains/community/webdav/1.0.12/templates/test_values/http-basicauth-values.yaml rename to trains/community/webdav/1.0.13/templates/test_values/http-basicauth-values.yaml diff --git a/trains/community/webdav/1.0.12/templates/test_values/http-https-basicauth-other-user-values.yaml b/trains/community/webdav/1.0.13/templates/test_values/http-https-basicauth-other-user-values.yaml similarity index 100% rename from trains/community/webdav/1.0.12/templates/test_values/http-https-basicauth-other-user-values.yaml rename to trains/community/webdav/1.0.13/templates/test_values/http-https-basicauth-other-user-values.yaml diff --git a/trains/community/webdav/1.0.12/templates/test_values/http-https-basicauth-values.yaml b/trains/community/webdav/1.0.13/templates/test_values/http-https-basicauth-values.yaml similarity index 100% rename from trains/community/webdav/1.0.12/templates/test_values/http-https-basicauth-values.yaml rename to trains/community/webdav/1.0.13/templates/test_values/http-https-basicauth-values.yaml diff --git a/trains/community/webdav/1.0.12/templates/test_values/http-https-noauth-other-user-values.yaml b/trains/community/webdav/1.0.13/templates/test_values/http-https-noauth-other-user-values.yaml similarity index 100% rename from trains/community/webdav/1.0.12/templates/test_values/http-https-noauth-other-user-values.yaml rename to trains/community/webdav/1.0.13/templates/test_values/http-https-noauth-other-user-values.yaml diff --git a/trains/community/webdav/1.0.12/templates/test_values/http-https-noauth-values.yaml b/trains/community/webdav/1.0.13/templates/test_values/http-https-noauth-values.yaml similarity index 100% rename from trains/community/webdav/1.0.12/templates/test_values/http-https-noauth-values.yaml rename to trains/community/webdav/1.0.13/templates/test_values/http-https-noauth-values.yaml diff --git a/trains/community/webdav/1.0.12/templates/test_values/http-noauth-other-user-values.yaml b/trains/community/webdav/1.0.13/templates/test_values/http-noauth-other-user-values.yaml similarity index 100% rename from trains/community/webdav/1.0.12/templates/test_values/http-noauth-other-user-values.yaml rename to trains/community/webdav/1.0.13/templates/test_values/http-noauth-other-user-values.yaml diff --git a/trains/community/webdav/1.0.12/templates/test_values/http-noauth-values.yaml b/trains/community/webdav/1.0.13/templates/test_values/http-noauth-values.yaml similarity index 100% rename from trains/community/webdav/1.0.12/templates/test_values/http-noauth-values.yaml rename to trains/community/webdav/1.0.13/templates/test_values/http-noauth-values.yaml diff --git a/trains/community/webdav/1.0.12/templates/test_values/https-basicauth-other-user-values.yaml b/trains/community/webdav/1.0.13/templates/test_values/https-basicauth-other-user-values.yaml similarity index 100% rename from trains/community/webdav/1.0.12/templates/test_values/https-basicauth-other-user-values.yaml rename to trains/community/webdav/1.0.13/templates/test_values/https-basicauth-other-user-values.yaml diff --git a/trains/community/webdav/1.0.12/templates/test_values/https-basicauth-values.yaml b/trains/community/webdav/1.0.13/templates/test_values/https-basicauth-values.yaml similarity index 100% rename from trains/community/webdav/1.0.12/templates/test_values/https-basicauth-values.yaml rename to trains/community/webdav/1.0.13/templates/test_values/https-basicauth-values.yaml diff --git a/trains/community/webdav/1.0.12/templates/webdav_macros/httpd.conf b/trains/community/webdav/1.0.13/templates/webdav_macros/httpd.conf similarity index 100% rename from trains/community/webdav/1.0.12/templates/webdav_macros/httpd.conf rename to trains/community/webdav/1.0.13/templates/webdav_macros/httpd.conf diff --git a/trains/community/webdav/1.0.12/templates/webdav_macros/webdav_core.conf b/trains/community/webdav/1.0.13/templates/webdav_macros/webdav_core.conf similarity index 100% rename from trains/community/webdav/1.0.12/templates/webdav_macros/webdav_core.conf rename to trains/community/webdav/1.0.13/templates/webdav_macros/webdav_core.conf diff --git a/trains/community/webdav/1.0.12/templates/webdav_macros/webdav_http.conf b/trains/community/webdav/1.0.13/templates/webdav_macros/webdav_http.conf similarity index 100% rename from trains/community/webdav/1.0.12/templates/webdav_macros/webdav_http.conf rename to trains/community/webdav/1.0.13/templates/webdav_macros/webdav_http.conf diff --git a/trains/community/webdav/1.0.12/templates/webdav_macros/webdav_https.conf b/trains/community/webdav/1.0.13/templates/webdav_macros/webdav_https.conf similarity index 100% rename from trains/community/webdav/1.0.12/templates/webdav_macros/webdav_https.conf rename to trains/community/webdav/1.0.13/templates/webdav_macros/webdav_https.conf diff --git a/trains/community/whoogle/1.0.19/templates/library/base_v1_1_3/healthchecks.py b/trains/community/whoogle/1.0.19/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/community/whoogle/1.0.19/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/whoogle/1.0.19/templates/library/base_v1_1_3/permissions.py b/trains/community/whoogle/1.0.19/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/community/whoogle/1.0.19/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/community/whoogle/1.0.19/README.md b/trains/community/whoogle/1.0.20/README.md similarity index 100% rename from trains/community/whoogle/1.0.19/README.md rename to trains/community/whoogle/1.0.20/README.md diff --git a/trains/community/whoogle/1.0.19/app.yaml b/trains/community/whoogle/1.0.20/app.yaml similarity index 87% rename from trains/community/whoogle/1.0.19/app.yaml rename to trains/community/whoogle/1.0.20/app.yaml index 3e17812c4f..1610b886db 100644 --- a/trains/community/whoogle/1.0.19/app.yaml +++ b/trains/community/whoogle/1.0.20/app.yaml @@ -9,8 +9,8 @@ icon: https://media.sys.truenas.net/apps/whoogle/icons/icon.png keywords: - search - engine -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -30,4 +30,4 @@ sources: - https://hub.docker.com/r/benbusby/whoogle-search title: Whoogle train: community -version: 1.0.19 +version: 1.0.20 diff --git a/trains/community/whoogle/1.0.19/ix_values.yaml b/trains/community/whoogle/1.0.20/ix_values.yaml similarity index 100% rename from trains/community/whoogle/1.0.19/ix_values.yaml rename to trains/community/whoogle/1.0.20/ix_values.yaml diff --git a/trains/community/whoogle/1.0.19/migrations/migrate_from_kubernetes b/trains/community/whoogle/1.0.20/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/whoogle/1.0.19/migrations/migrate_from_kubernetes rename to trains/community/whoogle/1.0.20/migrations/migrate_from_kubernetes diff --git a/trains/community/whoogle/1.0.19/migrations/migration_helpers/__init__.py b/trains/community/whoogle/1.0.20/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/whoogle/1.0.19/migrations/migration_helpers/__init__.py rename to trains/community/whoogle/1.0.20/migrations/migration_helpers/__init__.py diff --git a/trains/community/whoogle/1.0.19/migrations/migration_helpers/cpu.py b/trains/community/whoogle/1.0.20/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/whoogle/1.0.19/migrations/migration_helpers/cpu.py rename to trains/community/whoogle/1.0.20/migrations/migration_helpers/cpu.py diff --git a/trains/community/whoogle/1.0.19/migrations/migration_helpers/dns_config.py b/trains/community/whoogle/1.0.20/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/whoogle/1.0.19/migrations/migration_helpers/dns_config.py rename to trains/community/whoogle/1.0.20/migrations/migration_helpers/dns_config.py diff --git a/trains/community/whoogle/1.0.19/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/whoogle/1.0.20/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/whoogle/1.0.19/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/whoogle/1.0.20/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/whoogle/1.0.19/migrations/migration_helpers/memory.py b/trains/community/whoogle/1.0.20/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/whoogle/1.0.19/migrations/migration_helpers/memory.py rename to trains/community/whoogle/1.0.20/migrations/migration_helpers/memory.py diff --git a/trains/community/whoogle/1.0.19/migrations/migration_helpers/resources.py b/trains/community/whoogle/1.0.20/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/whoogle/1.0.19/migrations/migration_helpers/resources.py rename to trains/community/whoogle/1.0.20/migrations/migration_helpers/resources.py diff --git a/trains/community/whoogle/1.0.19/migrations/migration_helpers/storage.py b/trains/community/whoogle/1.0.20/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/whoogle/1.0.19/migrations/migration_helpers/storage.py rename to trains/community/whoogle/1.0.20/migrations/migration_helpers/storage.py diff --git a/trains/community/whoogle/1.0.19/questions.yaml b/trains/community/whoogle/1.0.20/questions.yaml similarity index 100% rename from trains/community/whoogle/1.0.19/questions.yaml rename to trains/community/whoogle/1.0.20/questions.yaml diff --git a/trains/community/whoogle/1.0.19/templates/docker-compose.yaml b/trains/community/whoogle/1.0.20/templates/docker-compose.yaml similarity index 100% rename from trains/community/whoogle/1.0.19/templates/docker-compose.yaml rename to trains/community/whoogle/1.0.20/templates/docker-compose.yaml diff --git a/trains/community/whoogle/1.0.19/templates/library/base_v1_1_3/__init__.py b/trains/community/whoogle/1.0.20/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/whoogle/1.0.19/templates/library/base_v1_1_3/__init__.py rename to trains/community/whoogle/1.0.20/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/whoogle/1.0.19/templates/library/base_v1_1_3/environment.py b/trains/community/whoogle/1.0.20/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/whoogle/1.0.19/templates/library/base_v1_1_3/environment.py rename to trains/community/whoogle/1.0.20/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/whoogle/1.0.20/templates/library/base_v1_1_4/healthchecks.py b/trains/community/whoogle/1.0.20/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/community/whoogle/1.0.20/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/whoogle/1.0.19/templates/library/base_v1_1_3/mariadb.py b/trains/community/whoogle/1.0.20/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/whoogle/1.0.19/templates/library/base_v1_1_3/mariadb.py rename to trains/community/whoogle/1.0.20/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/whoogle/1.0.19/templates/library/base_v1_1_3/metadata.py b/trains/community/whoogle/1.0.20/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/whoogle/1.0.19/templates/library/base_v1_1_3/metadata.py rename to trains/community/whoogle/1.0.20/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/whoogle/1.0.19/templates/library/base_v1_1_3/network.py b/trains/community/whoogle/1.0.20/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/whoogle/1.0.19/templates/library/base_v1_1_3/network.py rename to trains/community/whoogle/1.0.20/templates/library/base_v1_1_4/network.py diff --git a/trains/community/whoogle/1.0.20/templates/library/base_v1_1_4/permissions.py b/trains/community/whoogle/1.0.20/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/community/whoogle/1.0.20/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/community/whoogle/1.0.19/templates/library/base_v1_1_3/ports.py b/trains/community/whoogle/1.0.20/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/whoogle/1.0.19/templates/library/base_v1_1_3/ports.py rename to trains/community/whoogle/1.0.20/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/whoogle/1.0.19/templates/library/base_v1_1_3/postgres.py b/trains/community/whoogle/1.0.20/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/whoogle/1.0.19/templates/library/base_v1_1_3/postgres.py rename to trains/community/whoogle/1.0.20/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/whoogle/1.0.19/templates/library/base_v1_1_3/redis.py b/trains/community/whoogle/1.0.20/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/whoogle/1.0.19/templates/library/base_v1_1_3/redis.py rename to trains/community/whoogle/1.0.20/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/whoogle/1.0.19/templates/library/base_v1_1_3/resources.py b/trains/community/whoogle/1.0.20/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/whoogle/1.0.19/templates/library/base_v1_1_3/resources.py rename to trains/community/whoogle/1.0.20/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/whoogle/1.0.19/templates/library/base_v1_1_3/security.py b/trains/community/whoogle/1.0.20/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/whoogle/1.0.19/templates/library/base_v1_1_3/security.py rename to trains/community/whoogle/1.0.20/templates/library/base_v1_1_4/security.py diff --git a/trains/community/whoogle/1.0.19/templates/library/base_v1_1_3/storage.py b/trains/community/whoogle/1.0.20/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/whoogle/1.0.19/templates/library/base_v1_1_3/storage.py rename to trains/community/whoogle/1.0.20/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/whoogle/1.0.19/templates/library/base_v1_1_3/utils.py b/trains/community/whoogle/1.0.20/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/whoogle/1.0.19/templates/library/base_v1_1_3/utils.py rename to trains/community/whoogle/1.0.20/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/whoogle/1.0.19/templates/test_values/basic-values.yaml b/trains/community/whoogle/1.0.20/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/whoogle/1.0.19/templates/test_values/basic-values.yaml rename to trains/community/whoogle/1.0.20/templates/test_values/basic-values.yaml diff --git a/trains/community/wordpress/1.0.6/templates/library/base_v1_1_3/healthchecks.py b/trains/community/wordpress/1.0.6/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/community/wordpress/1.0.6/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/wordpress/1.0.6/templates/library/base_v1_1_3/permissions.py b/trains/community/wordpress/1.0.6/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/community/wordpress/1.0.6/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/community/wordpress/1.0.6/README.md b/trains/community/wordpress/1.0.7/README.md similarity index 100% rename from trains/community/wordpress/1.0.6/README.md rename to trains/community/wordpress/1.0.7/README.md diff --git a/trains/community/wordpress/1.0.6/app.yaml b/trains/community/wordpress/1.0.7/app.yaml similarity index 90% rename from trains/community/wordpress/1.0.6/app.yaml rename to trains/community/wordpress/1.0.7/app.yaml index bae03916c3..8a5cb1bebc 100644 --- a/trains/community/wordpress/1.0.6/app.yaml +++ b/trains/community/wordpress/1.0.7/app.yaml @@ -11,8 +11,8 @@ icon: https://media.sys.truenas.net/apps/wordpress/icons/icon.png keywords: - cms - blog -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -38,4 +38,4 @@ sources: - https://hub.docker.com/_/wordpress title: Wordpress train: community -version: 1.0.6 +version: 1.0.7 diff --git a/trains/community/wordpress/1.0.6/ix_values.yaml b/trains/community/wordpress/1.0.7/ix_values.yaml similarity index 100% rename from trains/community/wordpress/1.0.6/ix_values.yaml rename to trains/community/wordpress/1.0.7/ix_values.yaml diff --git a/trains/community/wordpress/1.0.6/migrations/migrate_from_kubernetes b/trains/community/wordpress/1.0.7/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/wordpress/1.0.6/migrations/migrate_from_kubernetes rename to trains/community/wordpress/1.0.7/migrations/migrate_from_kubernetes diff --git a/trains/community/wordpress/1.0.6/migrations/migration_helpers/__init__.py b/trains/community/wordpress/1.0.7/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/wordpress/1.0.6/migrations/migration_helpers/__init__.py rename to trains/community/wordpress/1.0.7/migrations/migration_helpers/__init__.py diff --git a/trains/community/wordpress/1.0.6/migrations/migration_helpers/cpu.py b/trains/community/wordpress/1.0.7/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/wordpress/1.0.6/migrations/migration_helpers/cpu.py rename to trains/community/wordpress/1.0.7/migrations/migration_helpers/cpu.py diff --git a/trains/community/wordpress/1.0.6/migrations/migration_helpers/dns_config.py b/trains/community/wordpress/1.0.7/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/wordpress/1.0.6/migrations/migration_helpers/dns_config.py rename to trains/community/wordpress/1.0.7/migrations/migration_helpers/dns_config.py diff --git a/trains/community/wordpress/1.0.6/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/wordpress/1.0.7/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/wordpress/1.0.6/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/wordpress/1.0.7/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/wordpress/1.0.6/migrations/migration_helpers/memory.py b/trains/community/wordpress/1.0.7/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/wordpress/1.0.6/migrations/migration_helpers/memory.py rename to trains/community/wordpress/1.0.7/migrations/migration_helpers/memory.py diff --git a/trains/community/wordpress/1.0.6/migrations/migration_helpers/resources.py b/trains/community/wordpress/1.0.7/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/wordpress/1.0.6/migrations/migration_helpers/resources.py rename to trains/community/wordpress/1.0.7/migrations/migration_helpers/resources.py diff --git a/trains/community/wordpress/1.0.6/migrations/migration_helpers/storage.py b/trains/community/wordpress/1.0.7/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/wordpress/1.0.6/migrations/migration_helpers/storage.py rename to trains/community/wordpress/1.0.7/migrations/migration_helpers/storage.py diff --git a/trains/community/wordpress/1.0.6/questions.yaml b/trains/community/wordpress/1.0.7/questions.yaml similarity index 100% rename from trains/community/wordpress/1.0.6/questions.yaml rename to trains/community/wordpress/1.0.7/questions.yaml diff --git a/trains/community/wordpress/1.0.6/templates/docker-compose.yaml b/trains/community/wordpress/1.0.7/templates/docker-compose.yaml similarity index 100% rename from trains/community/wordpress/1.0.6/templates/docker-compose.yaml rename to trains/community/wordpress/1.0.7/templates/docker-compose.yaml diff --git a/trains/community/wordpress/1.0.6/templates/library/base_v1_1_3/__init__.py b/trains/community/wordpress/1.0.7/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/wordpress/1.0.6/templates/library/base_v1_1_3/__init__.py rename to trains/community/wordpress/1.0.7/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/wordpress/1.0.6/templates/library/base_v1_1_3/environment.py b/trains/community/wordpress/1.0.7/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/wordpress/1.0.6/templates/library/base_v1_1_3/environment.py rename to trains/community/wordpress/1.0.7/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/wordpress/1.0.7/templates/library/base_v1_1_4/healthchecks.py b/trains/community/wordpress/1.0.7/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/community/wordpress/1.0.7/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/wordpress/1.0.6/templates/library/base_v1_1_3/mariadb.py b/trains/community/wordpress/1.0.7/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/wordpress/1.0.6/templates/library/base_v1_1_3/mariadb.py rename to trains/community/wordpress/1.0.7/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/wordpress/1.0.6/templates/library/base_v1_1_3/metadata.py b/trains/community/wordpress/1.0.7/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/wordpress/1.0.6/templates/library/base_v1_1_3/metadata.py rename to trains/community/wordpress/1.0.7/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/wordpress/1.0.6/templates/library/base_v1_1_3/network.py b/trains/community/wordpress/1.0.7/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/wordpress/1.0.6/templates/library/base_v1_1_3/network.py rename to trains/community/wordpress/1.0.7/templates/library/base_v1_1_4/network.py diff --git a/trains/community/wordpress/1.0.7/templates/library/base_v1_1_4/permissions.py b/trains/community/wordpress/1.0.7/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/community/wordpress/1.0.7/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/community/wordpress/1.0.6/templates/library/base_v1_1_3/ports.py b/trains/community/wordpress/1.0.7/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/wordpress/1.0.6/templates/library/base_v1_1_3/ports.py rename to trains/community/wordpress/1.0.7/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/wordpress/1.0.6/templates/library/base_v1_1_3/postgres.py b/trains/community/wordpress/1.0.7/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/wordpress/1.0.6/templates/library/base_v1_1_3/postgres.py rename to trains/community/wordpress/1.0.7/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/wordpress/1.0.6/templates/library/base_v1_1_3/redis.py b/trains/community/wordpress/1.0.7/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/wordpress/1.0.6/templates/library/base_v1_1_3/redis.py rename to trains/community/wordpress/1.0.7/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/wordpress/1.0.6/templates/library/base_v1_1_3/resources.py b/trains/community/wordpress/1.0.7/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/wordpress/1.0.6/templates/library/base_v1_1_3/resources.py rename to trains/community/wordpress/1.0.7/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/wordpress/1.0.6/templates/library/base_v1_1_3/security.py b/trains/community/wordpress/1.0.7/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/wordpress/1.0.6/templates/library/base_v1_1_3/security.py rename to trains/community/wordpress/1.0.7/templates/library/base_v1_1_4/security.py diff --git a/trains/community/wordpress/1.0.6/templates/library/base_v1_1_3/storage.py b/trains/community/wordpress/1.0.7/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/wordpress/1.0.6/templates/library/base_v1_1_3/storage.py rename to trains/community/wordpress/1.0.7/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/wordpress/1.0.6/templates/library/base_v1_1_3/utils.py b/trains/community/wordpress/1.0.7/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/wordpress/1.0.6/templates/library/base_v1_1_3/utils.py rename to trains/community/wordpress/1.0.7/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/wordpress/1.0.6/templates/test_values/basic-values.yaml b/trains/community/wordpress/1.0.7/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/wordpress/1.0.6/templates/test_values/basic-values.yaml rename to trains/community/wordpress/1.0.7/templates/test_values/basic-values.yaml diff --git a/trains/community/zerotier/1.0.18/templates/library/base_v1_1_3/healthchecks.py b/trains/community/zerotier/1.0.18/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/community/zerotier/1.0.18/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/zerotier/1.0.18/templates/library/base_v1_1_3/permissions.py b/trains/community/zerotier/1.0.18/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/community/zerotier/1.0.18/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/community/zerotier/1.0.18/README.md b/trains/community/zerotier/1.0.19/README.md similarity index 100% rename from trains/community/zerotier/1.0.18/README.md rename to trains/community/zerotier/1.0.19/README.md diff --git a/trains/community/zerotier/1.0.18/app.yaml b/trains/community/zerotier/1.0.19/app.yaml similarity index 93% rename from trains/community/zerotier/1.0.18/app.yaml rename to trains/community/zerotier/1.0.19/app.yaml index 2f3fa64d7e..f1fc2ec6de 100644 --- a/trains/community/zerotier/1.0.18/app.yaml +++ b/trains/community/zerotier/1.0.19/app.yaml @@ -34,8 +34,8 @@ icon: https://media.sys.truenas.net/apps/zerotier/icons/icon.png keywords: - vpn - zerotier -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -53,4 +53,4 @@ sources: - https://hub.docker.com/r/zerotier/zerotier title: Zerotier train: community -version: 1.0.18 +version: 1.0.19 diff --git a/trains/community/zerotier/1.0.18/ix_values.yaml b/trains/community/zerotier/1.0.19/ix_values.yaml similarity index 100% rename from trains/community/zerotier/1.0.18/ix_values.yaml rename to trains/community/zerotier/1.0.19/ix_values.yaml diff --git a/trains/community/zerotier/1.0.18/migrations/migrate_from_kubernetes b/trains/community/zerotier/1.0.19/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/zerotier/1.0.18/migrations/migrate_from_kubernetes rename to trains/community/zerotier/1.0.19/migrations/migrate_from_kubernetes diff --git a/trains/community/zerotier/1.0.18/migrations/migration_helpers/__init__.py b/trains/community/zerotier/1.0.19/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/zerotier/1.0.18/migrations/migration_helpers/__init__.py rename to trains/community/zerotier/1.0.19/migrations/migration_helpers/__init__.py diff --git a/trains/community/zerotier/1.0.18/migrations/migration_helpers/cpu.py b/trains/community/zerotier/1.0.19/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/zerotier/1.0.18/migrations/migration_helpers/cpu.py rename to trains/community/zerotier/1.0.19/migrations/migration_helpers/cpu.py diff --git a/trains/community/zerotier/1.0.18/migrations/migration_helpers/dns_config.py b/trains/community/zerotier/1.0.19/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/zerotier/1.0.18/migrations/migration_helpers/dns_config.py rename to trains/community/zerotier/1.0.19/migrations/migration_helpers/dns_config.py diff --git a/trains/community/zerotier/1.0.18/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/zerotier/1.0.19/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/zerotier/1.0.18/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/zerotier/1.0.19/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/zerotier/1.0.18/migrations/migration_helpers/memory.py b/trains/community/zerotier/1.0.19/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/zerotier/1.0.18/migrations/migration_helpers/memory.py rename to trains/community/zerotier/1.0.19/migrations/migration_helpers/memory.py diff --git a/trains/community/zerotier/1.0.18/migrations/migration_helpers/resources.py b/trains/community/zerotier/1.0.19/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/zerotier/1.0.18/migrations/migration_helpers/resources.py rename to trains/community/zerotier/1.0.19/migrations/migration_helpers/resources.py diff --git a/trains/community/zerotier/1.0.18/migrations/migration_helpers/storage.py b/trains/community/zerotier/1.0.19/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/zerotier/1.0.18/migrations/migration_helpers/storage.py rename to trains/community/zerotier/1.0.19/migrations/migration_helpers/storage.py diff --git a/trains/community/zerotier/1.0.18/questions.yaml b/trains/community/zerotier/1.0.19/questions.yaml similarity index 100% rename from trains/community/zerotier/1.0.18/questions.yaml rename to trains/community/zerotier/1.0.19/questions.yaml diff --git a/trains/community/zerotier/1.0.18/templates/docker-compose.yaml b/trains/community/zerotier/1.0.19/templates/docker-compose.yaml similarity index 100% rename from trains/community/zerotier/1.0.18/templates/docker-compose.yaml rename to trains/community/zerotier/1.0.19/templates/docker-compose.yaml diff --git a/trains/community/zerotier/1.0.18/templates/library/base_v1_1_3/__init__.py b/trains/community/zerotier/1.0.19/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/zerotier/1.0.18/templates/library/base_v1_1_3/__init__.py rename to trains/community/zerotier/1.0.19/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/zerotier/1.0.18/templates/library/base_v1_1_3/environment.py b/trains/community/zerotier/1.0.19/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/zerotier/1.0.18/templates/library/base_v1_1_3/environment.py rename to trains/community/zerotier/1.0.19/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/zerotier/1.0.19/templates/library/base_v1_1_4/healthchecks.py b/trains/community/zerotier/1.0.19/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/community/zerotier/1.0.19/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/community/zerotier/1.0.18/templates/library/base_v1_1_3/mariadb.py b/trains/community/zerotier/1.0.19/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/zerotier/1.0.18/templates/library/base_v1_1_3/mariadb.py rename to trains/community/zerotier/1.0.19/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/zerotier/1.0.18/templates/library/base_v1_1_3/metadata.py b/trains/community/zerotier/1.0.19/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/zerotier/1.0.18/templates/library/base_v1_1_3/metadata.py rename to trains/community/zerotier/1.0.19/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/zerotier/1.0.18/templates/library/base_v1_1_3/network.py b/trains/community/zerotier/1.0.19/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/zerotier/1.0.18/templates/library/base_v1_1_3/network.py rename to trains/community/zerotier/1.0.19/templates/library/base_v1_1_4/network.py diff --git a/trains/community/zerotier/1.0.19/templates/library/base_v1_1_4/permissions.py b/trains/community/zerotier/1.0.19/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/community/zerotier/1.0.19/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/community/zerotier/1.0.18/templates/library/base_v1_1_3/ports.py b/trains/community/zerotier/1.0.19/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/zerotier/1.0.18/templates/library/base_v1_1_3/ports.py rename to trains/community/zerotier/1.0.19/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/zerotier/1.0.18/templates/library/base_v1_1_3/postgres.py b/trains/community/zerotier/1.0.19/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/zerotier/1.0.18/templates/library/base_v1_1_3/postgres.py rename to trains/community/zerotier/1.0.19/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/zerotier/1.0.18/templates/library/base_v1_1_3/redis.py b/trains/community/zerotier/1.0.19/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/zerotier/1.0.18/templates/library/base_v1_1_3/redis.py rename to trains/community/zerotier/1.0.19/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/zerotier/1.0.18/templates/library/base_v1_1_3/resources.py b/trains/community/zerotier/1.0.19/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/zerotier/1.0.18/templates/library/base_v1_1_3/resources.py rename to trains/community/zerotier/1.0.19/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/zerotier/1.0.18/templates/library/base_v1_1_3/security.py b/trains/community/zerotier/1.0.19/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/zerotier/1.0.18/templates/library/base_v1_1_3/security.py rename to trains/community/zerotier/1.0.19/templates/library/base_v1_1_4/security.py diff --git a/trains/community/zerotier/1.0.18/templates/library/base_v1_1_3/storage.py b/trains/community/zerotier/1.0.19/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/zerotier/1.0.18/templates/library/base_v1_1_3/storage.py rename to trains/community/zerotier/1.0.19/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/zerotier/1.0.18/templates/library/base_v1_1_3/utils.py b/trains/community/zerotier/1.0.19/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/zerotier/1.0.18/templates/library/base_v1_1_3/utils.py rename to trains/community/zerotier/1.0.19/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/zerotier/1.0.18/templates/test_values/basic-values.yaml b/trains/community/zerotier/1.0.19/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/zerotier/1.0.18/templates/test_values/basic-values.yaml rename to trains/community/zerotier/1.0.19/templates/test_values/basic-values.yaml diff --git a/trains/community/zerotier/1.0.18/templates/test_values/no-host-values.yaml b/trains/community/zerotier/1.0.19/templates/test_values/no-host-values.yaml similarity index 100% rename from trains/community/zerotier/1.0.18/templates/test_values/no-host-values.yaml rename to trains/community/zerotier/1.0.19/templates/test_values/no-host-values.yaml diff --git a/trains/enterprise/minio/1.1.6/templates/library/base_v1_1_3/healthchecks.py b/trains/enterprise/minio/1.1.6/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/enterprise/minio/1.1.6/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/enterprise/minio/1.1.6/templates/library/base_v1_1_3/permissions.py b/trains/enterprise/minio/1.1.6/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/enterprise/minio/1.1.6/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/enterprise/minio/1.1.6/README.md b/trains/enterprise/minio/1.1.7/README.md similarity index 100% rename from trains/enterprise/minio/1.1.6/README.md rename to trains/enterprise/minio/1.1.7/README.md diff --git a/trains/enterprise/minio/1.1.6/app.yaml b/trains/enterprise/minio/1.1.7/app.yaml similarity index 86% rename from trains/enterprise/minio/1.1.6/app.yaml rename to trains/enterprise/minio/1.1.7/app.yaml index aa8fd32df1..126acc727c 100644 --- a/trains/enterprise/minio/1.1.6/app.yaml +++ b/trains/enterprise/minio/1.1.7/app.yaml @@ -11,8 +11,8 @@ keywords: - minio - cloud - s3 -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -31,4 +31,4 @@ sources: - https://github.com/minio/minio title: MinIO train: enterprise -version: 1.1.6 +version: 1.1.7 diff --git a/trains/enterprise/minio/1.1.6/ix_values.yaml b/trains/enterprise/minio/1.1.7/ix_values.yaml similarity index 100% rename from trains/enterprise/minio/1.1.6/ix_values.yaml rename to trains/enterprise/minio/1.1.7/ix_values.yaml diff --git a/trains/enterprise/minio/1.1.6/migrations/migrate_from_kubernetes b/trains/enterprise/minio/1.1.7/migrations/migrate_from_kubernetes similarity index 100% rename from trains/enterprise/minio/1.1.6/migrations/migrate_from_kubernetes rename to trains/enterprise/minio/1.1.7/migrations/migrate_from_kubernetes diff --git a/trains/enterprise/minio/1.1.6/migrations/migration_helpers/__init__.py b/trains/enterprise/minio/1.1.7/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/enterprise/minio/1.1.6/migrations/migration_helpers/__init__.py rename to trains/enterprise/minio/1.1.7/migrations/migration_helpers/__init__.py diff --git a/trains/enterprise/minio/1.1.6/migrations/migration_helpers/cpu.py b/trains/enterprise/minio/1.1.7/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/enterprise/minio/1.1.6/migrations/migration_helpers/cpu.py rename to trains/enterprise/minio/1.1.7/migrations/migration_helpers/cpu.py diff --git a/trains/enterprise/minio/1.1.6/migrations/migration_helpers/dns_config.py b/trains/enterprise/minio/1.1.7/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/enterprise/minio/1.1.6/migrations/migration_helpers/dns_config.py rename to trains/enterprise/minio/1.1.7/migrations/migration_helpers/dns_config.py diff --git a/trains/enterprise/minio/1.1.6/migrations/migration_helpers/kubernetes_secrets.py b/trains/enterprise/minio/1.1.7/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/enterprise/minio/1.1.6/migrations/migration_helpers/kubernetes_secrets.py rename to trains/enterprise/minio/1.1.7/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/enterprise/minio/1.1.6/migrations/migration_helpers/memory.py b/trains/enterprise/minio/1.1.7/migrations/migration_helpers/memory.py similarity index 100% rename from trains/enterprise/minio/1.1.6/migrations/migration_helpers/memory.py rename to trains/enterprise/minio/1.1.7/migrations/migration_helpers/memory.py diff --git a/trains/enterprise/minio/1.1.6/migrations/migration_helpers/resources.py b/trains/enterprise/minio/1.1.7/migrations/migration_helpers/resources.py similarity index 100% rename from trains/enterprise/minio/1.1.6/migrations/migration_helpers/resources.py rename to trains/enterprise/minio/1.1.7/migrations/migration_helpers/resources.py diff --git a/trains/enterprise/minio/1.1.6/migrations/migration_helpers/storage.py b/trains/enterprise/minio/1.1.7/migrations/migration_helpers/storage.py similarity index 100% rename from trains/enterprise/minio/1.1.6/migrations/migration_helpers/storage.py rename to trains/enterprise/minio/1.1.7/migrations/migration_helpers/storage.py diff --git a/trains/enterprise/minio/1.1.6/questions.yaml b/trains/enterprise/minio/1.1.7/questions.yaml similarity index 100% rename from trains/enterprise/minio/1.1.6/questions.yaml rename to trains/enterprise/minio/1.1.7/questions.yaml diff --git a/trains/enterprise/minio/1.1.6/templates/docker-compose.yaml b/trains/enterprise/minio/1.1.7/templates/docker-compose.yaml similarity index 100% rename from trains/enterprise/minio/1.1.6/templates/docker-compose.yaml rename to trains/enterprise/minio/1.1.7/templates/docker-compose.yaml diff --git a/trains/enterprise/minio/1.1.6/templates/library/base_v1_1_3/__init__.py b/trains/enterprise/minio/1.1.7/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/enterprise/minio/1.1.6/templates/library/base_v1_1_3/__init__.py rename to trains/enterprise/minio/1.1.7/templates/library/base_v1_1_4/__init__.py diff --git a/trains/enterprise/minio/1.1.6/templates/library/base_v1_1_3/environment.py b/trains/enterprise/minio/1.1.7/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/enterprise/minio/1.1.6/templates/library/base_v1_1_3/environment.py rename to trains/enterprise/minio/1.1.7/templates/library/base_v1_1_4/environment.py diff --git a/trains/enterprise/minio/1.1.7/templates/library/base_v1_1_4/healthchecks.py b/trains/enterprise/minio/1.1.7/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/enterprise/minio/1.1.7/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/enterprise/minio/1.1.6/templates/library/base_v1_1_3/mariadb.py b/trains/enterprise/minio/1.1.7/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/enterprise/minio/1.1.6/templates/library/base_v1_1_3/mariadb.py rename to trains/enterprise/minio/1.1.7/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/enterprise/minio/1.1.6/templates/library/base_v1_1_3/metadata.py b/trains/enterprise/minio/1.1.7/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/enterprise/minio/1.1.6/templates/library/base_v1_1_3/metadata.py rename to trains/enterprise/minio/1.1.7/templates/library/base_v1_1_4/metadata.py diff --git a/trains/enterprise/minio/1.1.6/templates/library/base_v1_1_3/network.py b/trains/enterprise/minio/1.1.7/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/enterprise/minio/1.1.6/templates/library/base_v1_1_3/network.py rename to trains/enterprise/minio/1.1.7/templates/library/base_v1_1_4/network.py diff --git a/trains/enterprise/minio/1.1.7/templates/library/base_v1_1_4/permissions.py b/trains/enterprise/minio/1.1.7/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/enterprise/minio/1.1.7/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/enterprise/minio/1.1.6/templates/library/base_v1_1_3/ports.py b/trains/enterprise/minio/1.1.7/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/enterprise/minio/1.1.6/templates/library/base_v1_1_3/ports.py rename to trains/enterprise/minio/1.1.7/templates/library/base_v1_1_4/ports.py diff --git a/trains/enterprise/minio/1.1.6/templates/library/base_v1_1_3/postgres.py b/trains/enterprise/minio/1.1.7/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/enterprise/minio/1.1.6/templates/library/base_v1_1_3/postgres.py rename to trains/enterprise/minio/1.1.7/templates/library/base_v1_1_4/postgres.py diff --git a/trains/enterprise/minio/1.1.6/templates/library/base_v1_1_3/redis.py b/trains/enterprise/minio/1.1.7/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/enterprise/minio/1.1.6/templates/library/base_v1_1_3/redis.py rename to trains/enterprise/minio/1.1.7/templates/library/base_v1_1_4/redis.py diff --git a/trains/enterprise/minio/1.1.6/templates/library/base_v1_1_3/resources.py b/trains/enterprise/minio/1.1.7/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/enterprise/minio/1.1.6/templates/library/base_v1_1_3/resources.py rename to trains/enterprise/minio/1.1.7/templates/library/base_v1_1_4/resources.py diff --git a/trains/enterprise/minio/1.1.6/templates/library/base_v1_1_3/security.py b/trains/enterprise/minio/1.1.7/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/enterprise/minio/1.1.6/templates/library/base_v1_1_3/security.py rename to trains/enterprise/minio/1.1.7/templates/library/base_v1_1_4/security.py diff --git a/trains/enterprise/minio/1.1.6/templates/library/base_v1_1_3/storage.py b/trains/enterprise/minio/1.1.7/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/enterprise/minio/1.1.6/templates/library/base_v1_1_3/storage.py rename to trains/enterprise/minio/1.1.7/templates/library/base_v1_1_4/storage.py diff --git a/trains/enterprise/minio/1.1.6/templates/library/base_v1_1_3/utils.py b/trains/enterprise/minio/1.1.7/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/enterprise/minio/1.1.6/templates/library/base_v1_1_3/utils.py rename to trains/enterprise/minio/1.1.7/templates/library/base_v1_1_4/utils.py diff --git a/trains/enterprise/minio/1.1.6/templates/library/enterprise/minio/v1_1_6/__init__.py b/trains/enterprise/minio/1.1.7/templates/library/enterprise/minio/v1_1_7/__init__.py similarity index 100% rename from trains/enterprise/minio/1.1.6/templates/library/enterprise/minio/v1_1_6/__init__.py rename to trains/enterprise/minio/1.1.7/templates/library/enterprise/minio/v1_1_7/__init__.py diff --git a/trains/enterprise/minio/1.1.6/templates/library/enterprise/minio/v1_1_6/data.py b/trains/enterprise/minio/1.1.7/templates/library/enterprise/minio/v1_1_7/data.py similarity index 98% rename from trains/enterprise/minio/1.1.6/templates/library/enterprise/minio/v1_1_6/data.py rename to trains/enterprise/minio/1.1.7/templates/library/enterprise/minio/v1_1_7/data.py index 7553cddf67..a6e7fd07c4 100644 --- a/trains/enterprise/minio/1.1.6/templates/library/enterprise/minio/v1_1_6/data.py +++ b/trains/enterprise/minio/1.1.7/templates/library/enterprise/minio/v1_1_7/data.py @@ -1,4 +1,4 @@ -from base_v1_1_3 import utils +from base_v1_1_4 import utils def validate(data): diff --git a/trains/enterprise/minio/1.1.6/templates/test_values/basic-multi-mode-values.yaml b/trains/enterprise/minio/1.1.7/templates/test_values/basic-multi-mode-values.yaml similarity index 100% rename from trains/enterprise/minio/1.1.6/templates/test_values/basic-multi-mode-values.yaml rename to trains/enterprise/minio/1.1.7/templates/test_values/basic-multi-mode-values.yaml diff --git a/trains/enterprise/minio/1.1.6/templates/test_values/basic-values.yaml b/trains/enterprise/minio/1.1.7/templates/test_values/basic-values.yaml similarity index 100% rename from trains/enterprise/minio/1.1.6/templates/test_values/basic-values.yaml rename to trains/enterprise/minio/1.1.7/templates/test_values/basic-values.yaml diff --git a/trains/enterprise/minio/1.1.6/templates/test_values/https-values.yaml b/trains/enterprise/minio/1.1.7/templates/test_values/https-values.yaml similarity index 100% rename from trains/enterprise/minio/1.1.6/templates/test_values/https-values.yaml rename to trains/enterprise/minio/1.1.7/templates/test_values/https-values.yaml diff --git a/trains/enterprise/syncthing/1.0.14/templates/library/base_v1_1_3/healthchecks.py b/trains/enterprise/syncthing/1.0.14/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/enterprise/syncthing/1.0.14/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/enterprise/syncthing/1.0.14/templates/library/base_v1_1_3/permissions.py b/trains/enterprise/syncthing/1.0.14/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/enterprise/syncthing/1.0.14/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/enterprise/syncthing/1.0.14/README.md b/trains/enterprise/syncthing/1.0.15/README.md similarity index 100% rename from trains/enterprise/syncthing/1.0.14/README.md rename to trains/enterprise/syncthing/1.0.15/README.md diff --git a/trains/enterprise/syncthing/1.0.14/app.yaml b/trains/enterprise/syncthing/1.0.15/app.yaml similarity index 93% rename from trains/enterprise/syncthing/1.0.14/app.yaml rename to trains/enterprise/syncthing/1.0.15/app.yaml index ef0306a5e0..f97d2c51a5 100644 --- a/trains/enterprise/syncthing/1.0.14/app.yaml +++ b/trains/enterprise/syncthing/1.0.15/app.yaml @@ -25,8 +25,8 @@ icon: https://media.sys.truenas.net/apps/syncthing/icons/icon.svg keywords: - sync - file-sharing -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -49,4 +49,4 @@ sources: - https://hub.docker.com/r/syncthing/syncthing title: Syncthing train: enterprise -version: 1.0.14 +version: 1.0.15 diff --git a/trains/enterprise/syncthing/1.0.14/ix_values.yaml b/trains/enterprise/syncthing/1.0.15/ix_values.yaml similarity index 100% rename from trains/enterprise/syncthing/1.0.14/ix_values.yaml rename to trains/enterprise/syncthing/1.0.15/ix_values.yaml diff --git a/trains/enterprise/syncthing/1.0.14/migrations/migrate_from_kubernetes b/trains/enterprise/syncthing/1.0.15/migrations/migrate_from_kubernetes similarity index 100% rename from trains/enterprise/syncthing/1.0.14/migrations/migrate_from_kubernetes rename to trains/enterprise/syncthing/1.0.15/migrations/migrate_from_kubernetes diff --git a/trains/enterprise/syncthing/1.0.14/migrations/migration_helpers/__init__.py b/trains/enterprise/syncthing/1.0.15/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/enterprise/syncthing/1.0.14/migrations/migration_helpers/__init__.py rename to trains/enterprise/syncthing/1.0.15/migrations/migration_helpers/__init__.py diff --git a/trains/enterprise/syncthing/1.0.14/migrations/migration_helpers/cpu.py b/trains/enterprise/syncthing/1.0.15/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/enterprise/syncthing/1.0.14/migrations/migration_helpers/cpu.py rename to trains/enterprise/syncthing/1.0.15/migrations/migration_helpers/cpu.py diff --git a/trains/enterprise/syncthing/1.0.14/migrations/migration_helpers/dns_config.py b/trains/enterprise/syncthing/1.0.15/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/enterprise/syncthing/1.0.14/migrations/migration_helpers/dns_config.py rename to trains/enterprise/syncthing/1.0.15/migrations/migration_helpers/dns_config.py diff --git a/trains/enterprise/syncthing/1.0.14/migrations/migration_helpers/kubernetes_secrets.py b/trains/enterprise/syncthing/1.0.15/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/enterprise/syncthing/1.0.14/migrations/migration_helpers/kubernetes_secrets.py rename to trains/enterprise/syncthing/1.0.15/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/enterprise/syncthing/1.0.14/migrations/migration_helpers/memory.py b/trains/enterprise/syncthing/1.0.15/migrations/migration_helpers/memory.py similarity index 100% rename from trains/enterprise/syncthing/1.0.14/migrations/migration_helpers/memory.py rename to trains/enterprise/syncthing/1.0.15/migrations/migration_helpers/memory.py diff --git a/trains/enterprise/syncthing/1.0.14/migrations/migration_helpers/resources.py b/trains/enterprise/syncthing/1.0.15/migrations/migration_helpers/resources.py similarity index 100% rename from trains/enterprise/syncthing/1.0.14/migrations/migration_helpers/resources.py rename to trains/enterprise/syncthing/1.0.15/migrations/migration_helpers/resources.py diff --git a/trains/enterprise/syncthing/1.0.14/migrations/migration_helpers/storage.py b/trains/enterprise/syncthing/1.0.15/migrations/migration_helpers/storage.py similarity index 100% rename from trains/enterprise/syncthing/1.0.14/migrations/migration_helpers/storage.py rename to trains/enterprise/syncthing/1.0.15/migrations/migration_helpers/storage.py diff --git a/trains/enterprise/syncthing/1.0.14/questions.yaml b/trains/enterprise/syncthing/1.0.15/questions.yaml similarity index 100% rename from trains/enterprise/syncthing/1.0.14/questions.yaml rename to trains/enterprise/syncthing/1.0.15/questions.yaml diff --git a/trains/enterprise/syncthing/1.0.14/templates/docker-compose.yaml b/trains/enterprise/syncthing/1.0.15/templates/docker-compose.yaml similarity index 100% rename from trains/enterprise/syncthing/1.0.14/templates/docker-compose.yaml rename to trains/enterprise/syncthing/1.0.15/templates/docker-compose.yaml diff --git a/trains/enterprise/syncthing/1.0.14/templates/library/base_v1_1_3/__init__.py b/trains/enterprise/syncthing/1.0.15/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/enterprise/syncthing/1.0.14/templates/library/base_v1_1_3/__init__.py rename to trains/enterprise/syncthing/1.0.15/templates/library/base_v1_1_4/__init__.py diff --git a/trains/enterprise/syncthing/1.0.14/templates/library/base_v1_1_3/environment.py b/trains/enterprise/syncthing/1.0.15/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/enterprise/syncthing/1.0.14/templates/library/base_v1_1_3/environment.py rename to trains/enterprise/syncthing/1.0.15/templates/library/base_v1_1_4/environment.py diff --git a/trains/enterprise/syncthing/1.0.15/templates/library/base_v1_1_4/healthchecks.py b/trains/enterprise/syncthing/1.0.15/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/enterprise/syncthing/1.0.15/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/enterprise/syncthing/1.0.14/templates/library/base_v1_1_3/mariadb.py b/trains/enterprise/syncthing/1.0.15/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/enterprise/syncthing/1.0.14/templates/library/base_v1_1_3/mariadb.py rename to trains/enterprise/syncthing/1.0.15/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/enterprise/syncthing/1.0.14/templates/library/base_v1_1_3/metadata.py b/trains/enterprise/syncthing/1.0.15/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/enterprise/syncthing/1.0.14/templates/library/base_v1_1_3/metadata.py rename to trains/enterprise/syncthing/1.0.15/templates/library/base_v1_1_4/metadata.py diff --git a/trains/enterprise/syncthing/1.0.14/templates/library/base_v1_1_3/network.py b/trains/enterprise/syncthing/1.0.15/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/enterprise/syncthing/1.0.14/templates/library/base_v1_1_3/network.py rename to trains/enterprise/syncthing/1.0.15/templates/library/base_v1_1_4/network.py diff --git a/trains/enterprise/syncthing/1.0.15/templates/library/base_v1_1_4/permissions.py b/trains/enterprise/syncthing/1.0.15/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/enterprise/syncthing/1.0.15/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/enterprise/syncthing/1.0.14/templates/library/base_v1_1_3/ports.py b/trains/enterprise/syncthing/1.0.15/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/enterprise/syncthing/1.0.14/templates/library/base_v1_1_3/ports.py rename to trains/enterprise/syncthing/1.0.15/templates/library/base_v1_1_4/ports.py diff --git a/trains/enterprise/syncthing/1.0.14/templates/library/base_v1_1_3/postgres.py b/trains/enterprise/syncthing/1.0.15/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/enterprise/syncthing/1.0.14/templates/library/base_v1_1_3/postgres.py rename to trains/enterprise/syncthing/1.0.15/templates/library/base_v1_1_4/postgres.py diff --git a/trains/enterprise/syncthing/1.0.14/templates/library/base_v1_1_3/redis.py b/trains/enterprise/syncthing/1.0.15/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/enterprise/syncthing/1.0.14/templates/library/base_v1_1_3/redis.py rename to trains/enterprise/syncthing/1.0.15/templates/library/base_v1_1_4/redis.py diff --git a/trains/enterprise/syncthing/1.0.14/templates/library/base_v1_1_3/resources.py b/trains/enterprise/syncthing/1.0.15/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/enterprise/syncthing/1.0.14/templates/library/base_v1_1_3/resources.py rename to trains/enterprise/syncthing/1.0.15/templates/library/base_v1_1_4/resources.py diff --git a/trains/enterprise/syncthing/1.0.14/templates/library/base_v1_1_3/security.py b/trains/enterprise/syncthing/1.0.15/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/enterprise/syncthing/1.0.14/templates/library/base_v1_1_3/security.py rename to trains/enterprise/syncthing/1.0.15/templates/library/base_v1_1_4/security.py diff --git a/trains/enterprise/syncthing/1.0.14/templates/library/base_v1_1_3/storage.py b/trains/enterprise/syncthing/1.0.15/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/enterprise/syncthing/1.0.14/templates/library/base_v1_1_3/storage.py rename to trains/enterprise/syncthing/1.0.15/templates/library/base_v1_1_4/storage.py diff --git a/trains/enterprise/syncthing/1.0.14/templates/library/base_v1_1_3/utils.py b/trains/enterprise/syncthing/1.0.15/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/enterprise/syncthing/1.0.14/templates/library/base_v1_1_3/utils.py rename to trains/enterprise/syncthing/1.0.15/templates/library/base_v1_1_4/utils.py diff --git a/trains/enterprise/syncthing/1.0.14/templates/test_values/basic-values.yaml b/trains/enterprise/syncthing/1.0.15/templates/test_values/basic-values.yaml similarity index 100% rename from trains/enterprise/syncthing/1.0.14/templates/test_values/basic-values.yaml rename to trains/enterprise/syncthing/1.0.15/templates/test_values/basic-values.yaml diff --git a/trains/enterprise/syncthing/1.0.14/templates/test_values/https-values.yaml b/trains/enterprise/syncthing/1.0.15/templates/test_values/https-values.yaml similarity index 100% rename from trains/enterprise/syncthing/1.0.14/templates/test_values/https-values.yaml rename to trains/enterprise/syncthing/1.0.15/templates/test_values/https-values.yaml diff --git a/trains/stable/collabora/1.1.14/templates/library/base_v1_1_3/healthchecks.py b/trains/stable/collabora/1.1.14/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/stable/collabora/1.1.14/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/stable/collabora/1.1.14/templates/library/base_v1_1_3/permissions.py b/trains/stable/collabora/1.1.14/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/stable/collabora/1.1.14/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/stable/collabora/1.1.14/README.md b/trains/stable/collabora/1.1.15/README.md similarity index 100% rename from trains/stable/collabora/1.1.14/README.md rename to trains/stable/collabora/1.1.15/README.md diff --git a/trains/stable/collabora/1.1.14/app.yaml b/trains/stable/collabora/1.1.15/app.yaml similarity index 92% rename from trains/stable/collabora/1.1.14/app.yaml rename to trains/stable/collabora/1.1.15/app.yaml index 565b9e8372..f9c9a1372b 100644 --- a/trains/stable/collabora/1.1.14/app.yaml +++ b/trains/stable/collabora/1.1.15/app.yaml @@ -27,8 +27,8 @@ keywords: - office - documents - productivity -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -53,4 +53,4 @@ sources: - https://hub.docker.com/r/collabora/code title: Collabora train: stable -version: 1.1.14 +version: 1.1.15 diff --git a/trains/stable/collabora/1.1.14/ix_values.yaml b/trains/stable/collabora/1.1.15/ix_values.yaml similarity index 100% rename from trains/stable/collabora/1.1.14/ix_values.yaml rename to trains/stable/collabora/1.1.15/ix_values.yaml diff --git a/trains/stable/collabora/1.1.14/migrations/migrate_from_kubernetes b/trains/stable/collabora/1.1.15/migrations/migrate_from_kubernetes similarity index 100% rename from trains/stable/collabora/1.1.14/migrations/migrate_from_kubernetes rename to trains/stable/collabora/1.1.15/migrations/migrate_from_kubernetes diff --git a/trains/stable/collabora/1.1.14/migrations/migration_helpers/__init__.py b/trains/stable/collabora/1.1.15/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/stable/collabora/1.1.14/migrations/migration_helpers/__init__.py rename to trains/stable/collabora/1.1.15/migrations/migration_helpers/__init__.py diff --git a/trains/stable/collabora/1.1.14/migrations/migration_helpers/cpu.py b/trains/stable/collabora/1.1.15/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/stable/collabora/1.1.14/migrations/migration_helpers/cpu.py rename to trains/stable/collabora/1.1.15/migrations/migration_helpers/cpu.py diff --git a/trains/stable/collabora/1.1.14/migrations/migration_helpers/dns_config.py b/trains/stable/collabora/1.1.15/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/stable/collabora/1.1.14/migrations/migration_helpers/dns_config.py rename to trains/stable/collabora/1.1.15/migrations/migration_helpers/dns_config.py diff --git a/trains/stable/collabora/1.1.14/migrations/migration_helpers/kubernetes_secrets.py b/trains/stable/collabora/1.1.15/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/stable/collabora/1.1.14/migrations/migration_helpers/kubernetes_secrets.py rename to trains/stable/collabora/1.1.15/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/stable/collabora/1.1.14/migrations/migration_helpers/memory.py b/trains/stable/collabora/1.1.15/migrations/migration_helpers/memory.py similarity index 100% rename from trains/stable/collabora/1.1.14/migrations/migration_helpers/memory.py rename to trains/stable/collabora/1.1.15/migrations/migration_helpers/memory.py diff --git a/trains/stable/collabora/1.1.14/migrations/migration_helpers/resources.py b/trains/stable/collabora/1.1.15/migrations/migration_helpers/resources.py similarity index 100% rename from trains/stable/collabora/1.1.14/migrations/migration_helpers/resources.py rename to trains/stable/collabora/1.1.15/migrations/migration_helpers/resources.py diff --git a/trains/stable/collabora/1.1.14/migrations/migration_helpers/storage.py b/trains/stable/collabora/1.1.15/migrations/migration_helpers/storage.py similarity index 100% rename from trains/stable/collabora/1.1.14/migrations/migration_helpers/storage.py rename to trains/stable/collabora/1.1.15/migrations/migration_helpers/storage.py diff --git a/trains/stable/collabora/1.1.14/questions.yaml b/trains/stable/collabora/1.1.15/questions.yaml similarity index 100% rename from trains/stable/collabora/1.1.14/questions.yaml rename to trains/stable/collabora/1.1.15/questions.yaml diff --git a/trains/stable/collabora/1.1.14/templates/docker-compose.yaml b/trains/stable/collabora/1.1.15/templates/docker-compose.yaml similarity index 100% rename from trains/stable/collabora/1.1.14/templates/docker-compose.yaml rename to trains/stable/collabora/1.1.15/templates/docker-compose.yaml diff --git a/trains/stable/collabora/1.1.14/templates/library/base_v1_1_3/__init__.py b/trains/stable/collabora/1.1.15/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/stable/collabora/1.1.14/templates/library/base_v1_1_3/__init__.py rename to trains/stable/collabora/1.1.15/templates/library/base_v1_1_4/__init__.py diff --git a/trains/stable/collabora/1.1.14/templates/library/base_v1_1_3/environment.py b/trains/stable/collabora/1.1.15/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/stable/collabora/1.1.14/templates/library/base_v1_1_3/environment.py rename to trains/stable/collabora/1.1.15/templates/library/base_v1_1_4/environment.py diff --git a/trains/stable/collabora/1.1.15/templates/library/base_v1_1_4/healthchecks.py b/trains/stable/collabora/1.1.15/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/stable/collabora/1.1.15/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/stable/collabora/1.1.14/templates/library/base_v1_1_3/mariadb.py b/trains/stable/collabora/1.1.15/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/stable/collabora/1.1.14/templates/library/base_v1_1_3/mariadb.py rename to trains/stable/collabora/1.1.15/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/stable/collabora/1.1.14/templates/library/base_v1_1_3/metadata.py b/trains/stable/collabora/1.1.15/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/stable/collabora/1.1.14/templates/library/base_v1_1_3/metadata.py rename to trains/stable/collabora/1.1.15/templates/library/base_v1_1_4/metadata.py diff --git a/trains/stable/collabora/1.1.14/templates/library/base_v1_1_3/network.py b/trains/stable/collabora/1.1.15/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/stable/collabora/1.1.14/templates/library/base_v1_1_3/network.py rename to trains/stable/collabora/1.1.15/templates/library/base_v1_1_4/network.py diff --git a/trains/stable/collabora/1.1.15/templates/library/base_v1_1_4/permissions.py b/trains/stable/collabora/1.1.15/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/stable/collabora/1.1.15/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/stable/collabora/1.1.14/templates/library/base_v1_1_3/ports.py b/trains/stable/collabora/1.1.15/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/stable/collabora/1.1.14/templates/library/base_v1_1_3/ports.py rename to trains/stable/collabora/1.1.15/templates/library/base_v1_1_4/ports.py diff --git a/trains/stable/collabora/1.1.14/templates/library/base_v1_1_3/postgres.py b/trains/stable/collabora/1.1.15/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/stable/collabora/1.1.14/templates/library/base_v1_1_3/postgres.py rename to trains/stable/collabora/1.1.15/templates/library/base_v1_1_4/postgres.py diff --git a/trains/stable/collabora/1.1.14/templates/library/base_v1_1_3/redis.py b/trains/stable/collabora/1.1.15/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/stable/collabora/1.1.14/templates/library/base_v1_1_3/redis.py rename to trains/stable/collabora/1.1.15/templates/library/base_v1_1_4/redis.py diff --git a/trains/stable/collabora/1.1.14/templates/library/base_v1_1_3/resources.py b/trains/stable/collabora/1.1.15/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/stable/collabora/1.1.14/templates/library/base_v1_1_3/resources.py rename to trains/stable/collabora/1.1.15/templates/library/base_v1_1_4/resources.py diff --git a/trains/stable/collabora/1.1.14/templates/library/base_v1_1_3/security.py b/trains/stable/collabora/1.1.15/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/stable/collabora/1.1.14/templates/library/base_v1_1_3/security.py rename to trains/stable/collabora/1.1.15/templates/library/base_v1_1_4/security.py diff --git a/trains/stable/collabora/1.1.14/templates/library/base_v1_1_3/storage.py b/trains/stable/collabora/1.1.15/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/stable/collabora/1.1.14/templates/library/base_v1_1_3/storage.py rename to trains/stable/collabora/1.1.15/templates/library/base_v1_1_4/storage.py diff --git a/trains/stable/collabora/1.1.14/templates/library/base_v1_1_3/utils.py b/trains/stable/collabora/1.1.15/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/stable/collabora/1.1.14/templates/library/base_v1_1_3/utils.py rename to trains/stable/collabora/1.1.15/templates/library/base_v1_1_4/utils.py diff --git a/trains/stable/collabora/1.1.14/templates/test_values/basic-values.yaml b/trains/stable/collabora/1.1.15/templates/test_values/basic-values.yaml similarity index 100% rename from trains/stable/collabora/1.1.14/templates/test_values/basic-values.yaml rename to trains/stable/collabora/1.1.15/templates/test_values/basic-values.yaml diff --git a/trains/stable/collabora/1.1.14/templates/test_values/https-values.yaml b/trains/stable/collabora/1.1.15/templates/test_values/https-values.yaml similarity index 100% rename from trains/stable/collabora/1.1.14/templates/test_values/https-values.yaml rename to trains/stable/collabora/1.1.15/templates/test_values/https-values.yaml diff --git a/trains/stable/diskoverdata/1.3.7/templates/library/base_v1_1_3/healthchecks.py b/trains/stable/diskoverdata/1.3.7/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/stable/diskoverdata/1.3.7/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/stable/diskoverdata/1.3.7/templates/library/base_v1_1_3/permissions.py b/trains/stable/diskoverdata/1.3.7/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/stable/diskoverdata/1.3.7/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/stable/diskoverdata/1.3.7/README.md b/trains/stable/diskoverdata/1.3.8/README.md similarity index 100% rename from trains/stable/diskoverdata/1.3.7/README.md rename to trains/stable/diskoverdata/1.3.8/README.md diff --git a/trains/stable/diskoverdata/1.3.7/app.yaml b/trains/stable/diskoverdata/1.3.8/app.yaml similarity index 92% rename from trains/stable/diskoverdata/1.3.7/app.yaml rename to trains/stable/diskoverdata/1.3.8/app.yaml index 7412302b41..b741b5c4d8 100644 --- a/trains/stable/diskoverdata/1.3.7/app.yaml +++ b/trains/stable/diskoverdata/1.3.8/app.yaml @@ -23,8 +23,8 @@ keywords: - monitoring - management - discovery -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -50,4 +50,4 @@ sources: - https://github.com/linuxserver/docker-diskover title: Diskover Data train: stable -version: 1.3.7 +version: 1.3.8 diff --git a/trains/stable/diskoverdata/1.3.7/ix_values.yaml b/trains/stable/diskoverdata/1.3.8/ix_values.yaml similarity index 100% rename from trains/stable/diskoverdata/1.3.7/ix_values.yaml rename to trains/stable/diskoverdata/1.3.8/ix_values.yaml diff --git a/trains/stable/diskoverdata/1.3.7/migrations/migrate_from_kubernetes b/trains/stable/diskoverdata/1.3.8/migrations/migrate_from_kubernetes similarity index 100% rename from trains/stable/diskoverdata/1.3.7/migrations/migrate_from_kubernetes rename to trains/stable/diskoverdata/1.3.8/migrations/migrate_from_kubernetes diff --git a/trains/stable/diskoverdata/1.3.7/migrations/migration_helpers/__init__.py b/trains/stable/diskoverdata/1.3.8/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/stable/diskoverdata/1.3.7/migrations/migration_helpers/__init__.py rename to trains/stable/diskoverdata/1.3.8/migrations/migration_helpers/__init__.py diff --git a/trains/stable/diskoverdata/1.3.7/migrations/migration_helpers/cpu.py b/trains/stable/diskoverdata/1.3.8/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/stable/diskoverdata/1.3.7/migrations/migration_helpers/cpu.py rename to trains/stable/diskoverdata/1.3.8/migrations/migration_helpers/cpu.py diff --git a/trains/stable/diskoverdata/1.3.7/migrations/migration_helpers/dns_config.py b/trains/stable/diskoverdata/1.3.8/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/stable/diskoverdata/1.3.7/migrations/migration_helpers/dns_config.py rename to trains/stable/diskoverdata/1.3.8/migrations/migration_helpers/dns_config.py diff --git a/trains/stable/diskoverdata/1.3.7/migrations/migration_helpers/kubernetes_secrets.py b/trains/stable/diskoverdata/1.3.8/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/stable/diskoverdata/1.3.7/migrations/migration_helpers/kubernetes_secrets.py rename to trains/stable/diskoverdata/1.3.8/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/stable/diskoverdata/1.3.7/migrations/migration_helpers/memory.py b/trains/stable/diskoverdata/1.3.8/migrations/migration_helpers/memory.py similarity index 100% rename from trains/stable/diskoverdata/1.3.7/migrations/migration_helpers/memory.py rename to trains/stable/diskoverdata/1.3.8/migrations/migration_helpers/memory.py diff --git a/trains/stable/diskoverdata/1.3.7/migrations/migration_helpers/resources.py b/trains/stable/diskoverdata/1.3.8/migrations/migration_helpers/resources.py similarity index 100% rename from trains/stable/diskoverdata/1.3.7/migrations/migration_helpers/resources.py rename to trains/stable/diskoverdata/1.3.8/migrations/migration_helpers/resources.py diff --git a/trains/stable/diskoverdata/1.3.7/migrations/migration_helpers/storage.py b/trains/stable/diskoverdata/1.3.8/migrations/migration_helpers/storage.py similarity index 100% rename from trains/stable/diskoverdata/1.3.7/migrations/migration_helpers/storage.py rename to trains/stable/diskoverdata/1.3.8/migrations/migration_helpers/storage.py diff --git a/trains/stable/diskoverdata/1.3.7/questions.yaml b/trains/stable/diskoverdata/1.3.8/questions.yaml similarity index 100% rename from trains/stable/diskoverdata/1.3.7/questions.yaml rename to trains/stable/diskoverdata/1.3.8/questions.yaml diff --git a/trains/stable/diskoverdata/1.3.7/templates/diskover_macros/crontab b/trains/stable/diskoverdata/1.3.8/templates/diskover_macros/crontab similarity index 100% rename from trains/stable/diskoverdata/1.3.7/templates/diskover_macros/crontab rename to trains/stable/diskoverdata/1.3.8/templates/diskover_macros/crontab diff --git a/trains/stable/diskoverdata/1.3.7/templates/diskover_macros/setup-cron.sh b/trains/stable/diskoverdata/1.3.8/templates/diskover_macros/setup-cron.sh similarity index 100% rename from trains/stable/diskoverdata/1.3.7/templates/diskover_macros/setup-cron.sh rename to trains/stable/diskoverdata/1.3.8/templates/diskover_macros/setup-cron.sh diff --git a/trains/stable/diskoverdata/1.3.7/templates/docker-compose.yaml b/trains/stable/diskoverdata/1.3.8/templates/docker-compose.yaml similarity index 100% rename from trains/stable/diskoverdata/1.3.7/templates/docker-compose.yaml rename to trains/stable/diskoverdata/1.3.8/templates/docker-compose.yaml diff --git a/trains/stable/diskoverdata/1.3.7/templates/library/base_v1_1_3/__init__.py b/trains/stable/diskoverdata/1.3.8/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/stable/diskoverdata/1.3.7/templates/library/base_v1_1_3/__init__.py rename to trains/stable/diskoverdata/1.3.8/templates/library/base_v1_1_4/__init__.py diff --git a/trains/stable/diskoverdata/1.3.7/templates/library/base_v1_1_3/environment.py b/trains/stable/diskoverdata/1.3.8/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/stable/diskoverdata/1.3.7/templates/library/base_v1_1_3/environment.py rename to trains/stable/diskoverdata/1.3.8/templates/library/base_v1_1_4/environment.py diff --git a/trains/stable/diskoverdata/1.3.8/templates/library/base_v1_1_4/healthchecks.py b/trains/stable/diskoverdata/1.3.8/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/stable/diskoverdata/1.3.8/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/stable/diskoverdata/1.3.7/templates/library/base_v1_1_3/mariadb.py b/trains/stable/diskoverdata/1.3.8/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/stable/diskoverdata/1.3.7/templates/library/base_v1_1_3/mariadb.py rename to trains/stable/diskoverdata/1.3.8/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/stable/diskoverdata/1.3.7/templates/library/base_v1_1_3/metadata.py b/trains/stable/diskoverdata/1.3.8/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/stable/diskoverdata/1.3.7/templates/library/base_v1_1_3/metadata.py rename to trains/stable/diskoverdata/1.3.8/templates/library/base_v1_1_4/metadata.py diff --git a/trains/stable/diskoverdata/1.3.7/templates/library/base_v1_1_3/network.py b/trains/stable/diskoverdata/1.3.8/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/stable/diskoverdata/1.3.7/templates/library/base_v1_1_3/network.py rename to trains/stable/diskoverdata/1.3.8/templates/library/base_v1_1_4/network.py diff --git a/trains/stable/diskoverdata/1.3.8/templates/library/base_v1_1_4/permissions.py b/trains/stable/diskoverdata/1.3.8/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/stable/diskoverdata/1.3.8/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/stable/diskoverdata/1.3.7/templates/library/base_v1_1_3/ports.py b/trains/stable/diskoverdata/1.3.8/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/stable/diskoverdata/1.3.7/templates/library/base_v1_1_3/ports.py rename to trains/stable/diskoverdata/1.3.8/templates/library/base_v1_1_4/ports.py diff --git a/trains/stable/diskoverdata/1.3.7/templates/library/base_v1_1_3/postgres.py b/trains/stable/diskoverdata/1.3.8/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/stable/diskoverdata/1.3.7/templates/library/base_v1_1_3/postgres.py rename to trains/stable/diskoverdata/1.3.8/templates/library/base_v1_1_4/postgres.py diff --git a/trains/stable/diskoverdata/1.3.7/templates/library/base_v1_1_3/redis.py b/trains/stable/diskoverdata/1.3.8/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/stable/diskoverdata/1.3.7/templates/library/base_v1_1_3/redis.py rename to trains/stable/diskoverdata/1.3.8/templates/library/base_v1_1_4/redis.py diff --git a/trains/stable/diskoverdata/1.3.7/templates/library/base_v1_1_3/resources.py b/trains/stable/diskoverdata/1.3.8/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/stable/diskoverdata/1.3.7/templates/library/base_v1_1_3/resources.py rename to trains/stable/diskoverdata/1.3.8/templates/library/base_v1_1_4/resources.py diff --git a/trains/stable/diskoverdata/1.3.7/templates/library/base_v1_1_3/security.py b/trains/stable/diskoverdata/1.3.8/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/stable/diskoverdata/1.3.7/templates/library/base_v1_1_3/security.py rename to trains/stable/diskoverdata/1.3.8/templates/library/base_v1_1_4/security.py diff --git a/trains/stable/diskoverdata/1.3.7/templates/library/base_v1_1_3/storage.py b/trains/stable/diskoverdata/1.3.8/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/stable/diskoverdata/1.3.7/templates/library/base_v1_1_3/storage.py rename to trains/stable/diskoverdata/1.3.8/templates/library/base_v1_1_4/storage.py diff --git a/trains/stable/diskoverdata/1.3.7/templates/library/base_v1_1_3/utils.py b/trains/stable/diskoverdata/1.3.8/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/stable/diskoverdata/1.3.7/templates/library/base_v1_1_3/utils.py rename to trains/stable/diskoverdata/1.3.8/templates/library/base_v1_1_4/utils.py diff --git a/trains/stable/diskoverdata/1.3.7/templates/test_values/basic-values.yaml b/trains/stable/diskoverdata/1.3.8/templates/test_values/basic-values.yaml similarity index 100% rename from trains/stable/diskoverdata/1.3.7/templates/test_values/basic-values.yaml rename to trains/stable/diskoverdata/1.3.8/templates/test_values/basic-values.yaml diff --git a/trains/stable/elastic-search/1.1.11/templates/library/base_v1_1_3/healthchecks.py b/trains/stable/elastic-search/1.1.11/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/stable/elastic-search/1.1.11/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/stable/elastic-search/1.1.11/templates/library/base_v1_1_3/permissions.py b/trains/stable/elastic-search/1.1.11/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/stable/elastic-search/1.1.11/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/stable/elastic-search/1.1.11/README.md b/trains/stable/elastic-search/1.1.12/README.md similarity index 100% rename from trains/stable/elastic-search/1.1.11/README.md rename to trains/stable/elastic-search/1.1.12/README.md diff --git a/trains/stable/elastic-search/1.1.11/app.yaml b/trains/stable/elastic-search/1.1.12/app.yaml similarity index 87% rename from trains/stable/elastic-search/1.1.11/app.yaml rename to trains/stable/elastic-search/1.1.12/app.yaml index 0bfa026acc..e6c01ff439 100644 --- a/trains/stable/elastic-search/1.1.11/app.yaml +++ b/trains/stable/elastic-search/1.1.12/app.yaml @@ -10,8 +10,8 @@ icon: https://media.sys.truenas.net/apps/elastic-search/icons/icon.svg keywords: - search - elastic -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -30,4 +30,4 @@ sources: - https://www.elastic.co/guide/en/elasticsearch/reference/master/docker.html#docker-configuration-methods title: Elastic Search train: stable -version: 1.1.11 +version: 1.1.12 diff --git a/trains/stable/elastic-search/1.1.11/ix_values.yaml b/trains/stable/elastic-search/1.1.12/ix_values.yaml similarity index 100% rename from trains/stable/elastic-search/1.1.11/ix_values.yaml rename to trains/stable/elastic-search/1.1.12/ix_values.yaml diff --git a/trains/stable/elastic-search/1.1.11/migrations/migrate_from_kubernetes b/trains/stable/elastic-search/1.1.12/migrations/migrate_from_kubernetes similarity index 100% rename from trains/stable/elastic-search/1.1.11/migrations/migrate_from_kubernetes rename to trains/stable/elastic-search/1.1.12/migrations/migrate_from_kubernetes diff --git a/trains/stable/elastic-search/1.1.11/migrations/migration_helpers/__init__.py b/trains/stable/elastic-search/1.1.12/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/stable/elastic-search/1.1.11/migrations/migration_helpers/__init__.py rename to trains/stable/elastic-search/1.1.12/migrations/migration_helpers/__init__.py diff --git a/trains/stable/elastic-search/1.1.11/migrations/migration_helpers/cpu.py b/trains/stable/elastic-search/1.1.12/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/stable/elastic-search/1.1.11/migrations/migration_helpers/cpu.py rename to trains/stable/elastic-search/1.1.12/migrations/migration_helpers/cpu.py diff --git a/trains/stable/elastic-search/1.1.11/migrations/migration_helpers/dns_config.py b/trains/stable/elastic-search/1.1.12/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/stable/elastic-search/1.1.11/migrations/migration_helpers/dns_config.py rename to trains/stable/elastic-search/1.1.12/migrations/migration_helpers/dns_config.py diff --git a/trains/stable/elastic-search/1.1.11/migrations/migration_helpers/kubernetes_secrets.py b/trains/stable/elastic-search/1.1.12/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/stable/elastic-search/1.1.11/migrations/migration_helpers/kubernetes_secrets.py rename to trains/stable/elastic-search/1.1.12/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/stable/elastic-search/1.1.11/migrations/migration_helpers/memory.py b/trains/stable/elastic-search/1.1.12/migrations/migration_helpers/memory.py similarity index 100% rename from trains/stable/elastic-search/1.1.11/migrations/migration_helpers/memory.py rename to trains/stable/elastic-search/1.1.12/migrations/migration_helpers/memory.py diff --git a/trains/stable/elastic-search/1.1.11/migrations/migration_helpers/resources.py b/trains/stable/elastic-search/1.1.12/migrations/migration_helpers/resources.py similarity index 100% rename from trains/stable/elastic-search/1.1.11/migrations/migration_helpers/resources.py rename to trains/stable/elastic-search/1.1.12/migrations/migration_helpers/resources.py diff --git a/trains/stable/elastic-search/1.1.11/migrations/migration_helpers/storage.py b/trains/stable/elastic-search/1.1.12/migrations/migration_helpers/storage.py similarity index 100% rename from trains/stable/elastic-search/1.1.11/migrations/migration_helpers/storage.py rename to trains/stable/elastic-search/1.1.12/migrations/migration_helpers/storage.py diff --git a/trains/stable/elastic-search/1.1.11/questions.yaml b/trains/stable/elastic-search/1.1.12/questions.yaml similarity index 100% rename from trains/stable/elastic-search/1.1.11/questions.yaml rename to trains/stable/elastic-search/1.1.12/questions.yaml diff --git a/trains/stable/elastic-search/1.1.11/templates/docker-compose.yaml b/trains/stable/elastic-search/1.1.12/templates/docker-compose.yaml similarity index 100% rename from trains/stable/elastic-search/1.1.11/templates/docker-compose.yaml rename to trains/stable/elastic-search/1.1.12/templates/docker-compose.yaml diff --git a/trains/stable/elastic-search/1.1.11/templates/library/base_v1_1_3/__init__.py b/trains/stable/elastic-search/1.1.12/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/stable/elastic-search/1.1.11/templates/library/base_v1_1_3/__init__.py rename to trains/stable/elastic-search/1.1.12/templates/library/base_v1_1_4/__init__.py diff --git a/trains/stable/elastic-search/1.1.11/templates/library/base_v1_1_3/environment.py b/trains/stable/elastic-search/1.1.12/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/stable/elastic-search/1.1.11/templates/library/base_v1_1_3/environment.py rename to trains/stable/elastic-search/1.1.12/templates/library/base_v1_1_4/environment.py diff --git a/trains/stable/elastic-search/1.1.12/templates/library/base_v1_1_4/healthchecks.py b/trains/stable/elastic-search/1.1.12/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/stable/elastic-search/1.1.12/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/stable/elastic-search/1.1.11/templates/library/base_v1_1_3/mariadb.py b/trains/stable/elastic-search/1.1.12/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/stable/elastic-search/1.1.11/templates/library/base_v1_1_3/mariadb.py rename to trains/stable/elastic-search/1.1.12/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/stable/elastic-search/1.1.11/templates/library/base_v1_1_3/metadata.py b/trains/stable/elastic-search/1.1.12/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/stable/elastic-search/1.1.11/templates/library/base_v1_1_3/metadata.py rename to trains/stable/elastic-search/1.1.12/templates/library/base_v1_1_4/metadata.py diff --git a/trains/stable/elastic-search/1.1.11/templates/library/base_v1_1_3/network.py b/trains/stable/elastic-search/1.1.12/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/stable/elastic-search/1.1.11/templates/library/base_v1_1_3/network.py rename to trains/stable/elastic-search/1.1.12/templates/library/base_v1_1_4/network.py diff --git a/trains/stable/elastic-search/1.1.12/templates/library/base_v1_1_4/permissions.py b/trains/stable/elastic-search/1.1.12/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/stable/elastic-search/1.1.12/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/stable/elastic-search/1.1.11/templates/library/base_v1_1_3/ports.py b/trains/stable/elastic-search/1.1.12/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/stable/elastic-search/1.1.11/templates/library/base_v1_1_3/ports.py rename to trains/stable/elastic-search/1.1.12/templates/library/base_v1_1_4/ports.py diff --git a/trains/stable/elastic-search/1.1.11/templates/library/base_v1_1_3/postgres.py b/trains/stable/elastic-search/1.1.12/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/stable/elastic-search/1.1.11/templates/library/base_v1_1_3/postgres.py rename to trains/stable/elastic-search/1.1.12/templates/library/base_v1_1_4/postgres.py diff --git a/trains/stable/elastic-search/1.1.11/templates/library/base_v1_1_3/redis.py b/trains/stable/elastic-search/1.1.12/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/stable/elastic-search/1.1.11/templates/library/base_v1_1_3/redis.py rename to trains/stable/elastic-search/1.1.12/templates/library/base_v1_1_4/redis.py diff --git a/trains/stable/elastic-search/1.1.11/templates/library/base_v1_1_3/resources.py b/trains/stable/elastic-search/1.1.12/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/stable/elastic-search/1.1.11/templates/library/base_v1_1_3/resources.py rename to trains/stable/elastic-search/1.1.12/templates/library/base_v1_1_4/resources.py diff --git a/trains/stable/elastic-search/1.1.11/templates/library/base_v1_1_3/security.py b/trains/stable/elastic-search/1.1.12/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/stable/elastic-search/1.1.11/templates/library/base_v1_1_3/security.py rename to trains/stable/elastic-search/1.1.12/templates/library/base_v1_1_4/security.py diff --git a/trains/stable/elastic-search/1.1.11/templates/library/base_v1_1_3/storage.py b/trains/stable/elastic-search/1.1.12/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/stable/elastic-search/1.1.11/templates/library/base_v1_1_3/storage.py rename to trains/stable/elastic-search/1.1.12/templates/library/base_v1_1_4/storage.py diff --git a/trains/stable/elastic-search/1.1.11/templates/library/base_v1_1_3/utils.py b/trains/stable/elastic-search/1.1.12/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/stable/elastic-search/1.1.11/templates/library/base_v1_1_3/utils.py rename to trains/stable/elastic-search/1.1.12/templates/library/base_v1_1_4/utils.py diff --git a/trains/stable/elastic-search/1.1.11/templates/test_values/basic-values.yaml b/trains/stable/elastic-search/1.1.12/templates/test_values/basic-values.yaml similarity index 100% rename from trains/stable/elastic-search/1.1.11/templates/test_values/basic-values.yaml rename to trains/stable/elastic-search/1.1.12/templates/test_values/basic-values.yaml diff --git a/trains/stable/elastic-search/1.1.11/templates/test_values/https-values.yaml b/trains/stable/elastic-search/1.1.12/templates/test_values/https-values.yaml similarity index 100% rename from trains/stable/elastic-search/1.1.11/templates/test_values/https-values.yaml rename to trains/stable/elastic-search/1.1.12/templates/test_values/https-values.yaml diff --git a/trains/stable/emby/1.1.12/templates/library/base_v1_1_3/healthchecks.py b/trains/stable/emby/1.1.12/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/stable/emby/1.1.12/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/stable/emby/1.1.12/templates/library/base_v1_1_3/permissions.py b/trains/stable/emby/1.1.12/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/stable/emby/1.1.12/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/stable/emby/1.1.12/README.md b/trains/stable/emby/1.1.13/README.md similarity index 100% rename from trains/stable/emby/1.1.12/README.md rename to trains/stable/emby/1.1.13/README.md diff --git a/trains/stable/emby/1.1.12/app.yaml b/trains/stable/emby/1.1.13/app.yaml similarity index 91% rename from trains/stable/emby/1.1.12/app.yaml rename to trains/stable/emby/1.1.13/app.yaml index 8642af6eb5..17f034ea9f 100644 --- a/trains/stable/emby/1.1.12/app.yaml +++ b/trains/stable/emby/1.1.13/app.yaml @@ -27,8 +27,8 @@ keywords: - series - tv - streaming -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -49,4 +49,4 @@ sources: - https://github.com/truenas/charts/tree/master/charts/emby title: Emby Server train: stable -version: 1.1.12 +version: 1.1.13 diff --git a/trains/stable/emby/1.1.12/ix_values.yaml b/trains/stable/emby/1.1.13/ix_values.yaml similarity index 100% rename from trains/stable/emby/1.1.12/ix_values.yaml rename to trains/stable/emby/1.1.13/ix_values.yaml diff --git a/trains/stable/emby/1.1.12/migrations/migrate_from_kubernetes b/trains/stable/emby/1.1.13/migrations/migrate_from_kubernetes similarity index 100% rename from trains/stable/emby/1.1.12/migrations/migrate_from_kubernetes rename to trains/stable/emby/1.1.13/migrations/migrate_from_kubernetes diff --git a/trains/stable/emby/1.1.12/migrations/migration_helpers/__init__.py b/trains/stable/emby/1.1.13/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/stable/emby/1.1.12/migrations/migration_helpers/__init__.py rename to trains/stable/emby/1.1.13/migrations/migration_helpers/__init__.py diff --git a/trains/stable/emby/1.1.12/migrations/migration_helpers/cpu.py b/trains/stable/emby/1.1.13/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/stable/emby/1.1.12/migrations/migration_helpers/cpu.py rename to trains/stable/emby/1.1.13/migrations/migration_helpers/cpu.py diff --git a/trains/stable/emby/1.1.12/migrations/migration_helpers/dns_config.py b/trains/stable/emby/1.1.13/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/stable/emby/1.1.12/migrations/migration_helpers/dns_config.py rename to trains/stable/emby/1.1.13/migrations/migration_helpers/dns_config.py diff --git a/trains/stable/emby/1.1.12/migrations/migration_helpers/kubernetes_secrets.py b/trains/stable/emby/1.1.13/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/stable/emby/1.1.12/migrations/migration_helpers/kubernetes_secrets.py rename to trains/stable/emby/1.1.13/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/stable/emby/1.1.12/migrations/migration_helpers/memory.py b/trains/stable/emby/1.1.13/migrations/migration_helpers/memory.py similarity index 100% rename from trains/stable/emby/1.1.12/migrations/migration_helpers/memory.py rename to trains/stable/emby/1.1.13/migrations/migration_helpers/memory.py diff --git a/trains/stable/emby/1.1.12/migrations/migration_helpers/resources.py b/trains/stable/emby/1.1.13/migrations/migration_helpers/resources.py similarity index 100% rename from trains/stable/emby/1.1.12/migrations/migration_helpers/resources.py rename to trains/stable/emby/1.1.13/migrations/migration_helpers/resources.py diff --git a/trains/stable/emby/1.1.12/migrations/migration_helpers/storage.py b/trains/stable/emby/1.1.13/migrations/migration_helpers/storage.py similarity index 100% rename from trains/stable/emby/1.1.12/migrations/migration_helpers/storage.py rename to trains/stable/emby/1.1.13/migrations/migration_helpers/storage.py diff --git a/trains/stable/emby/1.1.12/questions.yaml b/trains/stable/emby/1.1.13/questions.yaml similarity index 100% rename from trains/stable/emby/1.1.12/questions.yaml rename to trains/stable/emby/1.1.13/questions.yaml diff --git a/trains/stable/emby/1.1.12/templates/docker-compose.yaml b/trains/stable/emby/1.1.13/templates/docker-compose.yaml similarity index 100% rename from trains/stable/emby/1.1.12/templates/docker-compose.yaml rename to trains/stable/emby/1.1.13/templates/docker-compose.yaml diff --git a/trains/stable/emby/1.1.12/templates/library/base_v1_1_3/__init__.py b/trains/stable/emby/1.1.13/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/stable/emby/1.1.12/templates/library/base_v1_1_3/__init__.py rename to trains/stable/emby/1.1.13/templates/library/base_v1_1_4/__init__.py diff --git a/trains/stable/emby/1.1.12/templates/library/base_v1_1_3/environment.py b/trains/stable/emby/1.1.13/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/stable/emby/1.1.12/templates/library/base_v1_1_3/environment.py rename to trains/stable/emby/1.1.13/templates/library/base_v1_1_4/environment.py diff --git a/trains/stable/emby/1.1.13/templates/library/base_v1_1_4/healthchecks.py b/trains/stable/emby/1.1.13/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/stable/emby/1.1.13/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/stable/emby/1.1.12/templates/library/base_v1_1_3/mariadb.py b/trains/stable/emby/1.1.13/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/stable/emby/1.1.12/templates/library/base_v1_1_3/mariadb.py rename to trains/stable/emby/1.1.13/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/stable/emby/1.1.12/templates/library/base_v1_1_3/metadata.py b/trains/stable/emby/1.1.13/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/stable/emby/1.1.12/templates/library/base_v1_1_3/metadata.py rename to trains/stable/emby/1.1.13/templates/library/base_v1_1_4/metadata.py diff --git a/trains/stable/emby/1.1.12/templates/library/base_v1_1_3/network.py b/trains/stable/emby/1.1.13/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/stable/emby/1.1.12/templates/library/base_v1_1_3/network.py rename to trains/stable/emby/1.1.13/templates/library/base_v1_1_4/network.py diff --git a/trains/stable/emby/1.1.13/templates/library/base_v1_1_4/permissions.py b/trains/stable/emby/1.1.13/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/stable/emby/1.1.13/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/stable/emby/1.1.12/templates/library/base_v1_1_3/ports.py b/trains/stable/emby/1.1.13/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/stable/emby/1.1.12/templates/library/base_v1_1_3/ports.py rename to trains/stable/emby/1.1.13/templates/library/base_v1_1_4/ports.py diff --git a/trains/stable/emby/1.1.12/templates/library/base_v1_1_3/postgres.py b/trains/stable/emby/1.1.13/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/stable/emby/1.1.12/templates/library/base_v1_1_3/postgres.py rename to trains/stable/emby/1.1.13/templates/library/base_v1_1_4/postgres.py diff --git a/trains/stable/emby/1.1.12/templates/library/base_v1_1_3/redis.py b/trains/stable/emby/1.1.13/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/stable/emby/1.1.12/templates/library/base_v1_1_3/redis.py rename to trains/stable/emby/1.1.13/templates/library/base_v1_1_4/redis.py diff --git a/trains/stable/emby/1.1.12/templates/library/base_v1_1_3/resources.py b/trains/stable/emby/1.1.13/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/stable/emby/1.1.12/templates/library/base_v1_1_3/resources.py rename to trains/stable/emby/1.1.13/templates/library/base_v1_1_4/resources.py diff --git a/trains/stable/emby/1.1.12/templates/library/base_v1_1_3/security.py b/trains/stable/emby/1.1.13/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/stable/emby/1.1.12/templates/library/base_v1_1_3/security.py rename to trains/stable/emby/1.1.13/templates/library/base_v1_1_4/security.py diff --git a/trains/stable/emby/1.1.12/templates/library/base_v1_1_3/storage.py b/trains/stable/emby/1.1.13/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/stable/emby/1.1.12/templates/library/base_v1_1_3/storage.py rename to trains/stable/emby/1.1.13/templates/library/base_v1_1_4/storage.py diff --git a/trains/stable/emby/1.1.12/templates/library/base_v1_1_3/utils.py b/trains/stable/emby/1.1.13/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/stable/emby/1.1.12/templates/library/base_v1_1_3/utils.py rename to trains/stable/emby/1.1.13/templates/library/base_v1_1_4/utils.py diff --git a/trains/stable/emby/1.1.12/templates/test_values/basic-values.yaml b/trains/stable/emby/1.1.13/templates/test_values/basic-values.yaml similarity index 100% rename from trains/stable/emby/1.1.12/templates/test_values/basic-values.yaml rename to trains/stable/emby/1.1.13/templates/test_values/basic-values.yaml diff --git a/trains/stable/emby/1.1.12/templates/test_values/hostnet-values.yaml b/trains/stable/emby/1.1.13/templates/test_values/hostnet-values.yaml similarity index 100% rename from trains/stable/emby/1.1.12/templates/test_values/hostnet-values.yaml rename to trains/stable/emby/1.1.13/templates/test_values/hostnet-values.yaml diff --git a/trains/stable/home-assistant/1.2.20/templates/library/base_v1_1_3/healthchecks.py b/trains/stable/home-assistant/1.2.20/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/stable/home-assistant/1.2.20/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/stable/home-assistant/1.2.20/templates/library/base_v1_1_3/permissions.py b/trains/stable/home-assistant/1.2.20/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/stable/home-assistant/1.2.20/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/stable/home-assistant/1.2.20/README.md b/trains/stable/home-assistant/1.2.21/README.md similarity index 100% rename from trains/stable/home-assistant/1.2.20/README.md rename to trains/stable/home-assistant/1.2.21/README.md diff --git a/trains/stable/home-assistant/1.2.20/app.yaml b/trains/stable/home-assistant/1.2.21/app.yaml similarity index 91% rename from trains/stable/home-assistant/1.2.20/app.yaml rename to trains/stable/home-assistant/1.2.21/app.yaml index be3144525b..3c99c1100b 100644 --- a/trains/stable/home-assistant/1.2.20/app.yaml +++ b/trains/stable/home-assistant/1.2.21/app.yaml @@ -20,8 +20,8 @@ icon: https://media.sys.truenas.net/apps/home-assistant/icons/icon.png keywords: - home-automation - assistant -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -45,4 +45,4 @@ sources: - https://github.com/truenas/charts/tree/master/charts/home-assistant title: Home Assistant train: stable -version: 1.2.20 +version: 1.2.21 diff --git a/trains/stable/home-assistant/1.2.20/ix_values.yaml b/trains/stable/home-assistant/1.2.21/ix_values.yaml similarity index 100% rename from trains/stable/home-assistant/1.2.20/ix_values.yaml rename to trains/stable/home-assistant/1.2.21/ix_values.yaml diff --git a/trains/stable/home-assistant/1.2.20/migrations/migrate_from_kubernetes b/trains/stable/home-assistant/1.2.21/migrations/migrate_from_kubernetes similarity index 100% rename from trains/stable/home-assistant/1.2.20/migrations/migrate_from_kubernetes rename to trains/stable/home-assistant/1.2.21/migrations/migrate_from_kubernetes diff --git a/trains/stable/home-assistant/1.2.20/migrations/migration_helpers/__init__.py b/trains/stable/home-assistant/1.2.21/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/stable/home-assistant/1.2.20/migrations/migration_helpers/__init__.py rename to trains/stable/home-assistant/1.2.21/migrations/migration_helpers/__init__.py diff --git a/trains/stable/home-assistant/1.2.20/migrations/migration_helpers/cpu.py b/trains/stable/home-assistant/1.2.21/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/stable/home-assistant/1.2.20/migrations/migration_helpers/cpu.py rename to trains/stable/home-assistant/1.2.21/migrations/migration_helpers/cpu.py diff --git a/trains/stable/home-assistant/1.2.20/migrations/migration_helpers/dns_config.py b/trains/stable/home-assistant/1.2.21/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/stable/home-assistant/1.2.20/migrations/migration_helpers/dns_config.py rename to trains/stable/home-assistant/1.2.21/migrations/migration_helpers/dns_config.py diff --git a/trains/stable/home-assistant/1.2.20/migrations/migration_helpers/kubernetes_secrets.py b/trains/stable/home-assistant/1.2.21/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/stable/home-assistant/1.2.20/migrations/migration_helpers/kubernetes_secrets.py rename to trains/stable/home-assistant/1.2.21/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/stable/home-assistant/1.2.20/migrations/migration_helpers/memory.py b/trains/stable/home-assistant/1.2.21/migrations/migration_helpers/memory.py similarity index 100% rename from trains/stable/home-assistant/1.2.20/migrations/migration_helpers/memory.py rename to trains/stable/home-assistant/1.2.21/migrations/migration_helpers/memory.py diff --git a/trains/stable/home-assistant/1.2.20/migrations/migration_helpers/resources.py b/trains/stable/home-assistant/1.2.21/migrations/migration_helpers/resources.py similarity index 100% rename from trains/stable/home-assistant/1.2.20/migrations/migration_helpers/resources.py rename to trains/stable/home-assistant/1.2.21/migrations/migration_helpers/resources.py diff --git a/trains/stable/home-assistant/1.2.20/migrations/migration_helpers/storage.py b/trains/stable/home-assistant/1.2.21/migrations/migration_helpers/storage.py similarity index 100% rename from trains/stable/home-assistant/1.2.20/migrations/migration_helpers/storage.py rename to trains/stable/home-assistant/1.2.21/migrations/migration_helpers/storage.py diff --git a/trains/stable/home-assistant/1.2.20/questions.yaml b/trains/stable/home-assistant/1.2.21/questions.yaml similarity index 100% rename from trains/stable/home-assistant/1.2.20/questions.yaml rename to trains/stable/home-assistant/1.2.21/questions.yaml diff --git a/trains/stable/home-assistant/1.2.20/templates/docker-compose.yaml b/trains/stable/home-assistant/1.2.21/templates/docker-compose.yaml similarity index 100% rename from trains/stable/home-assistant/1.2.20/templates/docker-compose.yaml rename to trains/stable/home-assistant/1.2.21/templates/docker-compose.yaml diff --git a/trains/stable/home-assistant/1.2.20/templates/library/base_v1_1_3/__init__.py b/trains/stable/home-assistant/1.2.21/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/stable/home-assistant/1.2.20/templates/library/base_v1_1_3/__init__.py rename to trains/stable/home-assistant/1.2.21/templates/library/base_v1_1_4/__init__.py diff --git a/trains/stable/home-assistant/1.2.20/templates/library/base_v1_1_3/environment.py b/trains/stable/home-assistant/1.2.21/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/stable/home-assistant/1.2.20/templates/library/base_v1_1_3/environment.py rename to trains/stable/home-assistant/1.2.21/templates/library/base_v1_1_4/environment.py diff --git a/trains/stable/home-assistant/1.2.21/templates/library/base_v1_1_4/healthchecks.py b/trains/stable/home-assistant/1.2.21/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/stable/home-assistant/1.2.21/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/stable/home-assistant/1.2.20/templates/library/base_v1_1_3/mariadb.py b/trains/stable/home-assistant/1.2.21/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/stable/home-assistant/1.2.20/templates/library/base_v1_1_3/mariadb.py rename to trains/stable/home-assistant/1.2.21/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/stable/home-assistant/1.2.20/templates/library/base_v1_1_3/metadata.py b/trains/stable/home-assistant/1.2.21/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/stable/home-assistant/1.2.20/templates/library/base_v1_1_3/metadata.py rename to trains/stable/home-assistant/1.2.21/templates/library/base_v1_1_4/metadata.py diff --git a/trains/stable/home-assistant/1.2.20/templates/library/base_v1_1_3/network.py b/trains/stable/home-assistant/1.2.21/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/stable/home-assistant/1.2.20/templates/library/base_v1_1_3/network.py rename to trains/stable/home-assistant/1.2.21/templates/library/base_v1_1_4/network.py diff --git a/trains/stable/home-assistant/1.2.21/templates/library/base_v1_1_4/permissions.py b/trains/stable/home-assistant/1.2.21/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/stable/home-assistant/1.2.21/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/stable/home-assistant/1.2.20/templates/library/base_v1_1_3/ports.py b/trains/stable/home-assistant/1.2.21/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/stable/home-assistant/1.2.20/templates/library/base_v1_1_3/ports.py rename to trains/stable/home-assistant/1.2.21/templates/library/base_v1_1_4/ports.py diff --git a/trains/stable/home-assistant/1.2.20/templates/library/base_v1_1_3/postgres.py b/trains/stable/home-assistant/1.2.21/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/stable/home-assistant/1.2.20/templates/library/base_v1_1_3/postgres.py rename to trains/stable/home-assistant/1.2.21/templates/library/base_v1_1_4/postgres.py diff --git a/trains/stable/home-assistant/1.2.20/templates/library/base_v1_1_3/redis.py b/trains/stable/home-assistant/1.2.21/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/stable/home-assistant/1.2.20/templates/library/base_v1_1_3/redis.py rename to trains/stable/home-assistant/1.2.21/templates/library/base_v1_1_4/redis.py diff --git a/trains/stable/home-assistant/1.2.20/templates/library/base_v1_1_3/resources.py b/trains/stable/home-assistant/1.2.21/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/stable/home-assistant/1.2.20/templates/library/base_v1_1_3/resources.py rename to trains/stable/home-assistant/1.2.21/templates/library/base_v1_1_4/resources.py diff --git a/trains/stable/home-assistant/1.2.20/templates/library/base_v1_1_3/security.py b/trains/stable/home-assistant/1.2.21/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/stable/home-assistant/1.2.20/templates/library/base_v1_1_3/security.py rename to trains/stable/home-assistant/1.2.21/templates/library/base_v1_1_4/security.py diff --git a/trains/stable/home-assistant/1.2.20/templates/library/base_v1_1_3/storage.py b/trains/stable/home-assistant/1.2.21/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/stable/home-assistant/1.2.20/templates/library/base_v1_1_3/storage.py rename to trains/stable/home-assistant/1.2.21/templates/library/base_v1_1_4/storage.py diff --git a/trains/stable/home-assistant/1.2.20/templates/library/base_v1_1_3/utils.py b/trains/stable/home-assistant/1.2.21/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/stable/home-assistant/1.2.20/templates/library/base_v1_1_3/utils.py rename to trains/stable/home-assistant/1.2.21/templates/library/base_v1_1_4/utils.py diff --git a/trains/stable/home-assistant/1.2.20/templates/test_values/basic-values.yaml b/trains/stable/home-assistant/1.2.21/templates/test_values/basic-values.yaml similarity index 100% rename from trains/stable/home-assistant/1.2.20/templates/test_values/basic-values.yaml rename to trains/stable/home-assistant/1.2.21/templates/test_values/basic-values.yaml diff --git a/trains/stable/ix-app/1.0.10/templates/library/base_v1_1_3/healthchecks.py b/trains/stable/ix-app/1.0.10/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/stable/ix-app/1.0.10/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/stable/ix-app/1.0.10/templates/library/base_v1_1_3/permissions.py b/trains/stable/ix-app/1.0.10/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/stable/ix-app/1.0.10/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/stable/ix-app/1.0.10/README.md b/trains/stable/ix-app/1.0.11/README.md similarity index 100% rename from trains/stable/ix-app/1.0.10/README.md rename to trains/stable/ix-app/1.0.11/README.md diff --git a/trains/stable/ix-app/1.0.10/app.yaml b/trains/stable/ix-app/1.0.11/app.yaml similarity index 78% rename from trains/stable/ix-app/1.0.10/app.yaml rename to trains/stable/ix-app/1.0.11/app.yaml index 605eb7e29f..3cd8d5ea9f 100644 --- a/trains/stable/ix-app/1.0.10/app.yaml +++ b/trains/stable/ix-app/1.0.11/app.yaml @@ -7,8 +7,8 @@ home: https://www.truenas.com/ host_mounts: [] icon: https://media.sys.truenas.net/apps/ix-chart/icons/icon.webp keywords: [] -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -19,4 +19,4 @@ screenshots: [] sources: [] title: iX App train: stable -version: 1.0.10 +version: 1.0.11 diff --git a/trains/stable/ix-app/1.0.10/ix_values.yaml b/trains/stable/ix-app/1.0.11/ix_values.yaml similarity index 100% rename from trains/stable/ix-app/1.0.10/ix_values.yaml rename to trains/stable/ix-app/1.0.11/ix_values.yaml diff --git a/trains/stable/ix-app/1.0.10/migrations/migrate_from_kubernetes b/trains/stable/ix-app/1.0.11/migrations/migrate_from_kubernetes similarity index 100% rename from trains/stable/ix-app/1.0.10/migrations/migrate_from_kubernetes rename to trains/stable/ix-app/1.0.11/migrations/migrate_from_kubernetes diff --git a/trains/stable/ix-app/1.0.10/migrations/migration_helpers/__init__.py b/trains/stable/ix-app/1.0.11/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/stable/ix-app/1.0.10/migrations/migration_helpers/__init__.py rename to trains/stable/ix-app/1.0.11/migrations/migration_helpers/__init__.py diff --git a/trains/stable/ix-app/1.0.10/migrations/migration_helpers/cpu.py b/trains/stable/ix-app/1.0.11/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/stable/ix-app/1.0.10/migrations/migration_helpers/cpu.py rename to trains/stable/ix-app/1.0.11/migrations/migration_helpers/cpu.py diff --git a/trains/stable/ix-app/1.0.10/migrations/migration_helpers/dns_config.py b/trains/stable/ix-app/1.0.11/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/stable/ix-app/1.0.10/migrations/migration_helpers/dns_config.py rename to trains/stable/ix-app/1.0.11/migrations/migration_helpers/dns_config.py diff --git a/trains/stable/ix-app/1.0.10/migrations/migration_helpers/kubernetes_secrets.py b/trains/stable/ix-app/1.0.11/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/stable/ix-app/1.0.10/migrations/migration_helpers/kubernetes_secrets.py rename to trains/stable/ix-app/1.0.11/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/stable/ix-app/1.0.10/migrations/migration_helpers/memory.py b/trains/stable/ix-app/1.0.11/migrations/migration_helpers/memory.py similarity index 100% rename from trains/stable/ix-app/1.0.10/migrations/migration_helpers/memory.py rename to trains/stable/ix-app/1.0.11/migrations/migration_helpers/memory.py diff --git a/trains/stable/ix-app/1.0.10/migrations/migration_helpers/resources.py b/trains/stable/ix-app/1.0.11/migrations/migration_helpers/resources.py similarity index 100% rename from trains/stable/ix-app/1.0.10/migrations/migration_helpers/resources.py rename to trains/stable/ix-app/1.0.11/migrations/migration_helpers/resources.py diff --git a/trains/stable/ix-app/1.0.10/migrations/migration_helpers/storage.py b/trains/stable/ix-app/1.0.11/migrations/migration_helpers/storage.py similarity index 100% rename from trains/stable/ix-app/1.0.10/migrations/migration_helpers/storage.py rename to trains/stable/ix-app/1.0.11/migrations/migration_helpers/storage.py diff --git a/trains/stable/ix-app/1.0.10/questions.yaml b/trains/stable/ix-app/1.0.11/questions.yaml similarity index 100% rename from trains/stable/ix-app/1.0.10/questions.yaml rename to trains/stable/ix-app/1.0.11/questions.yaml diff --git a/trains/stable/ix-app/1.0.10/templates/docker-compose.yaml b/trains/stable/ix-app/1.0.11/templates/docker-compose.yaml similarity index 100% rename from trains/stable/ix-app/1.0.10/templates/docker-compose.yaml rename to trains/stable/ix-app/1.0.11/templates/docker-compose.yaml diff --git a/trains/stable/ix-app/1.0.10/templates/library/base_v1_1_3/__init__.py b/trains/stable/ix-app/1.0.11/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/stable/ix-app/1.0.10/templates/library/base_v1_1_3/__init__.py rename to trains/stable/ix-app/1.0.11/templates/library/base_v1_1_4/__init__.py diff --git a/trains/stable/ix-app/1.0.10/templates/library/base_v1_1_3/environment.py b/trains/stable/ix-app/1.0.11/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/stable/ix-app/1.0.10/templates/library/base_v1_1_3/environment.py rename to trains/stable/ix-app/1.0.11/templates/library/base_v1_1_4/environment.py diff --git a/trains/stable/ix-app/1.0.11/templates/library/base_v1_1_4/healthchecks.py b/trains/stable/ix-app/1.0.11/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/stable/ix-app/1.0.11/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/stable/ix-app/1.0.10/templates/library/base_v1_1_3/mariadb.py b/trains/stable/ix-app/1.0.11/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/stable/ix-app/1.0.10/templates/library/base_v1_1_3/mariadb.py rename to trains/stable/ix-app/1.0.11/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/stable/ix-app/1.0.10/templates/library/base_v1_1_3/metadata.py b/trains/stable/ix-app/1.0.11/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/stable/ix-app/1.0.10/templates/library/base_v1_1_3/metadata.py rename to trains/stable/ix-app/1.0.11/templates/library/base_v1_1_4/metadata.py diff --git a/trains/stable/ix-app/1.0.10/templates/library/base_v1_1_3/network.py b/trains/stable/ix-app/1.0.11/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/stable/ix-app/1.0.10/templates/library/base_v1_1_3/network.py rename to trains/stable/ix-app/1.0.11/templates/library/base_v1_1_4/network.py diff --git a/trains/stable/ix-app/1.0.11/templates/library/base_v1_1_4/permissions.py b/trains/stable/ix-app/1.0.11/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/stable/ix-app/1.0.11/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/stable/ix-app/1.0.10/templates/library/base_v1_1_3/ports.py b/trains/stable/ix-app/1.0.11/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/stable/ix-app/1.0.10/templates/library/base_v1_1_3/ports.py rename to trains/stable/ix-app/1.0.11/templates/library/base_v1_1_4/ports.py diff --git a/trains/stable/ix-app/1.0.10/templates/library/base_v1_1_3/postgres.py b/trains/stable/ix-app/1.0.11/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/stable/ix-app/1.0.10/templates/library/base_v1_1_3/postgres.py rename to trains/stable/ix-app/1.0.11/templates/library/base_v1_1_4/postgres.py diff --git a/trains/stable/ix-app/1.0.10/templates/library/base_v1_1_3/redis.py b/trains/stable/ix-app/1.0.11/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/stable/ix-app/1.0.10/templates/library/base_v1_1_3/redis.py rename to trains/stable/ix-app/1.0.11/templates/library/base_v1_1_4/redis.py diff --git a/trains/stable/ix-app/1.0.10/templates/library/base_v1_1_3/resources.py b/trains/stable/ix-app/1.0.11/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/stable/ix-app/1.0.10/templates/library/base_v1_1_3/resources.py rename to trains/stable/ix-app/1.0.11/templates/library/base_v1_1_4/resources.py diff --git a/trains/stable/ix-app/1.0.10/templates/library/base_v1_1_3/security.py b/trains/stable/ix-app/1.0.11/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/stable/ix-app/1.0.10/templates/library/base_v1_1_3/security.py rename to trains/stable/ix-app/1.0.11/templates/library/base_v1_1_4/security.py diff --git a/trains/stable/ix-app/1.0.10/templates/library/base_v1_1_3/storage.py b/trains/stable/ix-app/1.0.11/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/stable/ix-app/1.0.10/templates/library/base_v1_1_3/storage.py rename to trains/stable/ix-app/1.0.11/templates/library/base_v1_1_4/storage.py diff --git a/trains/stable/ix-app/1.0.10/templates/library/base_v1_1_3/utils.py b/trains/stable/ix-app/1.0.11/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/stable/ix-app/1.0.10/templates/library/base_v1_1_3/utils.py rename to trains/stable/ix-app/1.0.11/templates/library/base_v1_1_4/utils.py diff --git a/trains/stable/ix-app/1.0.10/templates/test_values/basic-values.yaml b/trains/stable/ix-app/1.0.11/templates/test_values/basic-values.yaml similarity index 100% rename from trains/stable/ix-app/1.0.10/templates/test_values/basic-values.yaml rename to trains/stable/ix-app/1.0.11/templates/test_values/basic-values.yaml diff --git a/trains/stable/minio/1.1.12/templates/library/base_v1_1_3/healthchecks.py b/trains/stable/minio/1.1.12/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/stable/minio/1.1.12/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/stable/minio/1.1.12/templates/library/base_v1_1_3/permissions.py b/trains/stable/minio/1.1.12/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/stable/minio/1.1.12/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/stable/minio/1.1.12/README.md b/trains/stable/minio/1.1.13/README.md similarity index 100% rename from trains/stable/minio/1.1.12/README.md rename to trains/stable/minio/1.1.13/README.md diff --git a/trains/stable/minio/1.1.12/app.yaml b/trains/stable/minio/1.1.13/app.yaml similarity index 87% rename from trains/stable/minio/1.1.12/app.yaml rename to trains/stable/minio/1.1.13/app.yaml index cc352b0dc7..a61b95bffc 100644 --- a/trains/stable/minio/1.1.12/app.yaml +++ b/trains/stable/minio/1.1.13/app.yaml @@ -10,8 +10,8 @@ keywords: - storage - object-storage - S3 -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -31,4 +31,4 @@ sources: - https://github.com/minio/minio title: MinIO train: stable -version: 1.1.12 +version: 1.1.13 diff --git a/trains/stable/minio/1.1.12/ix_values.yaml b/trains/stable/minio/1.1.13/ix_values.yaml similarity index 100% rename from trains/stable/minio/1.1.12/ix_values.yaml rename to trains/stable/minio/1.1.13/ix_values.yaml diff --git a/trains/stable/minio/1.1.12/migrations/migrate_from_kubernetes b/trains/stable/minio/1.1.13/migrations/migrate_from_kubernetes similarity index 100% rename from trains/stable/minio/1.1.12/migrations/migrate_from_kubernetes rename to trains/stable/minio/1.1.13/migrations/migrate_from_kubernetes diff --git a/trains/stable/minio/1.1.12/migrations/migration_helpers/__init__.py b/trains/stable/minio/1.1.13/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/stable/minio/1.1.12/migrations/migration_helpers/__init__.py rename to trains/stable/minio/1.1.13/migrations/migration_helpers/__init__.py diff --git a/trains/stable/minio/1.1.12/migrations/migration_helpers/cpu.py b/trains/stable/minio/1.1.13/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/stable/minio/1.1.12/migrations/migration_helpers/cpu.py rename to trains/stable/minio/1.1.13/migrations/migration_helpers/cpu.py diff --git a/trains/stable/minio/1.1.12/migrations/migration_helpers/dns_config.py b/trains/stable/minio/1.1.13/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/stable/minio/1.1.12/migrations/migration_helpers/dns_config.py rename to trains/stable/minio/1.1.13/migrations/migration_helpers/dns_config.py diff --git a/trains/stable/minio/1.1.12/migrations/migration_helpers/kubernetes_secrets.py b/trains/stable/minio/1.1.13/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/stable/minio/1.1.12/migrations/migration_helpers/kubernetes_secrets.py rename to trains/stable/minio/1.1.13/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/stable/minio/1.1.12/migrations/migration_helpers/memory.py b/trains/stable/minio/1.1.13/migrations/migration_helpers/memory.py similarity index 100% rename from trains/stable/minio/1.1.12/migrations/migration_helpers/memory.py rename to trains/stable/minio/1.1.13/migrations/migration_helpers/memory.py diff --git a/trains/stable/minio/1.1.12/migrations/migration_helpers/resources.py b/trains/stable/minio/1.1.13/migrations/migration_helpers/resources.py similarity index 100% rename from trains/stable/minio/1.1.12/migrations/migration_helpers/resources.py rename to trains/stable/minio/1.1.13/migrations/migration_helpers/resources.py diff --git a/trains/stable/minio/1.1.12/migrations/migration_helpers/storage.py b/trains/stable/minio/1.1.13/migrations/migration_helpers/storage.py similarity index 100% rename from trains/stable/minio/1.1.12/migrations/migration_helpers/storage.py rename to trains/stable/minio/1.1.13/migrations/migration_helpers/storage.py diff --git a/trains/stable/minio/1.1.12/questions.yaml b/trains/stable/minio/1.1.13/questions.yaml similarity index 100% rename from trains/stable/minio/1.1.12/questions.yaml rename to trains/stable/minio/1.1.13/questions.yaml diff --git a/trains/stable/minio/1.1.12/templates/docker-compose.yaml b/trains/stable/minio/1.1.13/templates/docker-compose.yaml similarity index 100% rename from trains/stable/minio/1.1.12/templates/docker-compose.yaml rename to trains/stable/minio/1.1.13/templates/docker-compose.yaml diff --git a/trains/stable/minio/1.1.12/templates/library/base_v1_1_3/__init__.py b/trains/stable/minio/1.1.13/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/stable/minio/1.1.12/templates/library/base_v1_1_3/__init__.py rename to trains/stable/minio/1.1.13/templates/library/base_v1_1_4/__init__.py diff --git a/trains/stable/minio/1.1.12/templates/library/base_v1_1_3/environment.py b/trains/stable/minio/1.1.13/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/stable/minio/1.1.12/templates/library/base_v1_1_3/environment.py rename to trains/stable/minio/1.1.13/templates/library/base_v1_1_4/environment.py diff --git a/trains/stable/minio/1.1.13/templates/library/base_v1_1_4/healthchecks.py b/trains/stable/minio/1.1.13/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/stable/minio/1.1.13/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/stable/minio/1.1.12/templates/library/base_v1_1_3/mariadb.py b/trains/stable/minio/1.1.13/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/stable/minio/1.1.12/templates/library/base_v1_1_3/mariadb.py rename to trains/stable/minio/1.1.13/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/stable/minio/1.1.12/templates/library/base_v1_1_3/metadata.py b/trains/stable/minio/1.1.13/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/stable/minio/1.1.12/templates/library/base_v1_1_3/metadata.py rename to trains/stable/minio/1.1.13/templates/library/base_v1_1_4/metadata.py diff --git a/trains/stable/minio/1.1.12/templates/library/base_v1_1_3/network.py b/trains/stable/minio/1.1.13/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/stable/minio/1.1.12/templates/library/base_v1_1_3/network.py rename to trains/stable/minio/1.1.13/templates/library/base_v1_1_4/network.py diff --git a/trains/stable/minio/1.1.13/templates/library/base_v1_1_4/permissions.py b/trains/stable/minio/1.1.13/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/stable/minio/1.1.13/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/stable/minio/1.1.12/templates/library/base_v1_1_3/ports.py b/trains/stable/minio/1.1.13/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/stable/minio/1.1.12/templates/library/base_v1_1_3/ports.py rename to trains/stable/minio/1.1.13/templates/library/base_v1_1_4/ports.py diff --git a/trains/stable/minio/1.1.12/templates/library/base_v1_1_3/postgres.py b/trains/stable/minio/1.1.13/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/stable/minio/1.1.12/templates/library/base_v1_1_3/postgres.py rename to trains/stable/minio/1.1.13/templates/library/base_v1_1_4/postgres.py diff --git a/trains/stable/minio/1.1.12/templates/library/base_v1_1_3/redis.py b/trains/stable/minio/1.1.13/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/stable/minio/1.1.12/templates/library/base_v1_1_3/redis.py rename to trains/stable/minio/1.1.13/templates/library/base_v1_1_4/redis.py diff --git a/trains/stable/minio/1.1.12/templates/library/base_v1_1_3/resources.py b/trains/stable/minio/1.1.13/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/stable/minio/1.1.12/templates/library/base_v1_1_3/resources.py rename to trains/stable/minio/1.1.13/templates/library/base_v1_1_4/resources.py diff --git a/trains/stable/minio/1.1.12/templates/library/base_v1_1_3/security.py b/trains/stable/minio/1.1.13/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/stable/minio/1.1.12/templates/library/base_v1_1_3/security.py rename to trains/stable/minio/1.1.13/templates/library/base_v1_1_4/security.py diff --git a/trains/stable/minio/1.1.12/templates/library/base_v1_1_3/storage.py b/trains/stable/minio/1.1.13/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/stable/minio/1.1.12/templates/library/base_v1_1_3/storage.py rename to trains/stable/minio/1.1.13/templates/library/base_v1_1_4/storage.py diff --git a/trains/stable/minio/1.1.12/templates/library/base_v1_1_3/utils.py b/trains/stable/minio/1.1.13/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/stable/minio/1.1.12/templates/library/base_v1_1_3/utils.py rename to trains/stable/minio/1.1.13/templates/library/base_v1_1_4/utils.py diff --git a/trains/stable/minio/1.1.12/templates/test_values/basic-values.yaml b/trains/stable/minio/1.1.13/templates/test_values/basic-values.yaml similarity index 100% rename from trains/stable/minio/1.1.12/templates/test_values/basic-values.yaml rename to trains/stable/minio/1.1.13/templates/test_values/basic-values.yaml diff --git a/trains/stable/minio/1.1.12/templates/test_values/https-values.yaml b/trains/stable/minio/1.1.13/templates/test_values/https-values.yaml similarity index 100% rename from trains/stable/minio/1.1.12/templates/test_values/https-values.yaml rename to trains/stable/minio/1.1.13/templates/test_values/https-values.yaml diff --git a/trains/stable/netdata/1.1.13/templates/library/base_v1_1_3/healthchecks.py b/trains/stable/netdata/1.1.13/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/stable/netdata/1.1.13/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/stable/netdata/1.1.13/templates/library/base_v1_1_3/permissions.py b/trains/stable/netdata/1.1.13/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/stable/netdata/1.1.13/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/stable/netdata/1.1.13/README.md b/trains/stable/netdata/1.1.14/README.md similarity index 100% rename from trains/stable/netdata/1.1.13/README.md rename to trains/stable/netdata/1.1.14/README.md diff --git a/trains/stable/netdata/1.1.13/app.yaml b/trains/stable/netdata/1.1.14/app.yaml similarity index 94% rename from trains/stable/netdata/1.1.13/app.yaml rename to trains/stable/netdata/1.1.14/app.yaml index 872992ab96..e6b8d8b2f4 100644 --- a/trains/stable/netdata/1.1.13/app.yaml +++ b/trains/stable/netdata/1.1.14/app.yaml @@ -34,8 +34,8 @@ keywords: - alerting - metric - monitoring -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -58,4 +58,4 @@ sources: - https://github.com/netdata/netdata title: Netdata train: stable -version: 1.1.13 +version: 1.1.14 diff --git a/trains/stable/netdata/1.1.13/ix_values.yaml b/trains/stable/netdata/1.1.14/ix_values.yaml similarity index 100% rename from trains/stable/netdata/1.1.13/ix_values.yaml rename to trains/stable/netdata/1.1.14/ix_values.yaml diff --git a/trains/stable/netdata/1.1.13/migrations/migrate_from_kubernetes b/trains/stable/netdata/1.1.14/migrations/migrate_from_kubernetes similarity index 100% rename from trains/stable/netdata/1.1.13/migrations/migrate_from_kubernetes rename to trains/stable/netdata/1.1.14/migrations/migrate_from_kubernetes diff --git a/trains/stable/netdata/1.1.13/migrations/migration_helpers/__init__.py b/trains/stable/netdata/1.1.14/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/stable/netdata/1.1.13/migrations/migration_helpers/__init__.py rename to trains/stable/netdata/1.1.14/migrations/migration_helpers/__init__.py diff --git a/trains/stable/netdata/1.1.13/migrations/migration_helpers/cpu.py b/trains/stable/netdata/1.1.14/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/stable/netdata/1.1.13/migrations/migration_helpers/cpu.py rename to trains/stable/netdata/1.1.14/migrations/migration_helpers/cpu.py diff --git a/trains/stable/netdata/1.1.13/migrations/migration_helpers/dns_config.py b/trains/stable/netdata/1.1.14/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/stable/netdata/1.1.13/migrations/migration_helpers/dns_config.py rename to trains/stable/netdata/1.1.14/migrations/migration_helpers/dns_config.py diff --git a/trains/stable/netdata/1.1.13/migrations/migration_helpers/kubernetes_secrets.py b/trains/stable/netdata/1.1.14/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/stable/netdata/1.1.13/migrations/migration_helpers/kubernetes_secrets.py rename to trains/stable/netdata/1.1.14/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/stable/netdata/1.1.13/migrations/migration_helpers/memory.py b/trains/stable/netdata/1.1.14/migrations/migration_helpers/memory.py similarity index 100% rename from trains/stable/netdata/1.1.13/migrations/migration_helpers/memory.py rename to trains/stable/netdata/1.1.14/migrations/migration_helpers/memory.py diff --git a/trains/stable/netdata/1.1.13/migrations/migration_helpers/resources.py b/trains/stable/netdata/1.1.14/migrations/migration_helpers/resources.py similarity index 100% rename from trains/stable/netdata/1.1.13/migrations/migration_helpers/resources.py rename to trains/stable/netdata/1.1.14/migrations/migration_helpers/resources.py diff --git a/trains/stable/netdata/1.1.13/migrations/migration_helpers/storage.py b/trains/stable/netdata/1.1.14/migrations/migration_helpers/storage.py similarity index 100% rename from trains/stable/netdata/1.1.13/migrations/migration_helpers/storage.py rename to trains/stable/netdata/1.1.14/migrations/migration_helpers/storage.py diff --git a/trains/stable/netdata/1.1.13/questions.yaml b/trains/stable/netdata/1.1.14/questions.yaml similarity index 100% rename from trains/stable/netdata/1.1.13/questions.yaml rename to trains/stable/netdata/1.1.14/questions.yaml diff --git a/trains/stable/netdata/1.1.13/templates/docker-compose.yaml b/trains/stable/netdata/1.1.14/templates/docker-compose.yaml similarity index 100% rename from trains/stable/netdata/1.1.13/templates/docker-compose.yaml rename to trains/stable/netdata/1.1.14/templates/docker-compose.yaml diff --git a/trains/stable/netdata/1.1.13/templates/library/base_v1_1_3/__init__.py b/trains/stable/netdata/1.1.14/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/stable/netdata/1.1.13/templates/library/base_v1_1_3/__init__.py rename to trains/stable/netdata/1.1.14/templates/library/base_v1_1_4/__init__.py diff --git a/trains/stable/netdata/1.1.13/templates/library/base_v1_1_3/environment.py b/trains/stable/netdata/1.1.14/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/stable/netdata/1.1.13/templates/library/base_v1_1_3/environment.py rename to trains/stable/netdata/1.1.14/templates/library/base_v1_1_4/environment.py diff --git a/trains/stable/netdata/1.1.14/templates/library/base_v1_1_4/healthchecks.py b/trains/stable/netdata/1.1.14/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/stable/netdata/1.1.14/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/stable/netdata/1.1.13/templates/library/base_v1_1_3/mariadb.py b/trains/stable/netdata/1.1.14/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/stable/netdata/1.1.13/templates/library/base_v1_1_3/mariadb.py rename to trains/stable/netdata/1.1.14/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/stable/netdata/1.1.13/templates/library/base_v1_1_3/metadata.py b/trains/stable/netdata/1.1.14/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/stable/netdata/1.1.13/templates/library/base_v1_1_3/metadata.py rename to trains/stable/netdata/1.1.14/templates/library/base_v1_1_4/metadata.py diff --git a/trains/stable/netdata/1.1.13/templates/library/base_v1_1_3/network.py b/trains/stable/netdata/1.1.14/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/stable/netdata/1.1.13/templates/library/base_v1_1_3/network.py rename to trains/stable/netdata/1.1.14/templates/library/base_v1_1_4/network.py diff --git a/trains/stable/netdata/1.1.14/templates/library/base_v1_1_4/permissions.py b/trains/stable/netdata/1.1.14/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/stable/netdata/1.1.14/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/stable/netdata/1.1.13/templates/library/base_v1_1_3/ports.py b/trains/stable/netdata/1.1.14/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/stable/netdata/1.1.13/templates/library/base_v1_1_3/ports.py rename to trains/stable/netdata/1.1.14/templates/library/base_v1_1_4/ports.py diff --git a/trains/stable/netdata/1.1.13/templates/library/base_v1_1_3/postgres.py b/trains/stable/netdata/1.1.14/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/stable/netdata/1.1.13/templates/library/base_v1_1_3/postgres.py rename to trains/stable/netdata/1.1.14/templates/library/base_v1_1_4/postgres.py diff --git a/trains/stable/netdata/1.1.13/templates/library/base_v1_1_3/redis.py b/trains/stable/netdata/1.1.14/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/stable/netdata/1.1.13/templates/library/base_v1_1_3/redis.py rename to trains/stable/netdata/1.1.14/templates/library/base_v1_1_4/redis.py diff --git a/trains/stable/netdata/1.1.13/templates/library/base_v1_1_3/resources.py b/trains/stable/netdata/1.1.14/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/stable/netdata/1.1.13/templates/library/base_v1_1_3/resources.py rename to trains/stable/netdata/1.1.14/templates/library/base_v1_1_4/resources.py diff --git a/trains/stable/netdata/1.1.13/templates/library/base_v1_1_3/security.py b/trains/stable/netdata/1.1.14/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/stable/netdata/1.1.13/templates/library/base_v1_1_3/security.py rename to trains/stable/netdata/1.1.14/templates/library/base_v1_1_4/security.py diff --git a/trains/stable/netdata/1.1.13/templates/library/base_v1_1_3/storage.py b/trains/stable/netdata/1.1.14/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/stable/netdata/1.1.13/templates/library/base_v1_1_3/storage.py rename to trains/stable/netdata/1.1.14/templates/library/base_v1_1_4/storage.py diff --git a/trains/stable/netdata/1.1.13/templates/library/base_v1_1_3/utils.py b/trains/stable/netdata/1.1.14/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/stable/netdata/1.1.13/templates/library/base_v1_1_3/utils.py rename to trains/stable/netdata/1.1.14/templates/library/base_v1_1_4/utils.py diff --git a/trains/stable/netdata/1.1.13/templates/test_values/basic-values.yaml b/trains/stable/netdata/1.1.14/templates/test_values/basic-values.yaml similarity index 100% rename from trains/stable/netdata/1.1.13/templates/test_values/basic-values.yaml rename to trains/stable/netdata/1.1.14/templates/test_values/basic-values.yaml diff --git a/trains/stable/nextcloud/1.3.19/templates/library/base_v1_1_3/healthchecks.py b/trains/stable/nextcloud/1.3.19/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/stable/nextcloud/1.3.19/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/stable/nextcloud/1.3.19/templates/library/base_v1_1_3/permissions.py b/trains/stable/nextcloud/1.3.19/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/stable/nextcloud/1.3.19/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/stable/nextcloud/1.3.19/README.md b/trains/stable/nextcloud/1.3.20/README.md similarity index 100% rename from trains/stable/nextcloud/1.3.19/README.md rename to trains/stable/nextcloud/1.3.20/README.md diff --git a/trains/stable/nextcloud/1.3.19/app.yaml b/trains/stable/nextcloud/1.3.20/app.yaml similarity index 92% rename from trains/stable/nextcloud/1.3.19/app.yaml rename to trains/stable/nextcloud/1.3.20/app.yaml index 25b0a0cf7e..7be405dcb6 100644 --- a/trains/stable/nextcloud/1.3.19/app.yaml +++ b/trains/stable/nextcloud/1.3.20/app.yaml @@ -2,8 +2,7 @@ app_version: 30.0.0 capabilities: - description: Nextcloud and Nginx are able to chown files. name: CHOWN -- description: Nextcloud and Nginx are able to bypass permission checks - for it's sub-processes. +- description: Nextcloud and Nginx are able to bypass permission checks for it's sub-processes. name: FOWNER - description: Nextcloud and Nginx are able to bypass permission checks. name: DAC_OVERRIDE @@ -29,8 +28,8 @@ keywords: - http - web - php -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -67,4 +66,4 @@ sources: - https://github.com/truenas/charts/tree/master/charts/nextcloud title: Nextcloud train: stable -version: 1.3.19 +version: 1.3.20 diff --git a/trains/stable/nextcloud/1.3.19/ix_values.yaml b/trains/stable/nextcloud/1.3.20/ix_values.yaml similarity index 100% rename from trains/stable/nextcloud/1.3.19/ix_values.yaml rename to trains/stable/nextcloud/1.3.20/ix_values.yaml diff --git a/trains/stable/nextcloud/1.3.19/migrations/migrate_from_kubernetes b/trains/stable/nextcloud/1.3.20/migrations/migrate_from_kubernetes similarity index 100% rename from trains/stable/nextcloud/1.3.19/migrations/migrate_from_kubernetes rename to trains/stable/nextcloud/1.3.20/migrations/migrate_from_kubernetes diff --git a/trains/stable/nextcloud/1.3.19/migrations/migration_helpers/__init__.py b/trains/stable/nextcloud/1.3.20/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/stable/nextcloud/1.3.19/migrations/migration_helpers/__init__.py rename to trains/stable/nextcloud/1.3.20/migrations/migration_helpers/__init__.py diff --git a/trains/stable/nextcloud/1.3.19/migrations/migration_helpers/cpu.py b/trains/stable/nextcloud/1.3.20/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/stable/nextcloud/1.3.19/migrations/migration_helpers/cpu.py rename to trains/stable/nextcloud/1.3.20/migrations/migration_helpers/cpu.py diff --git a/trains/stable/nextcloud/1.3.19/migrations/migration_helpers/dns_config.py b/trains/stable/nextcloud/1.3.20/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/stable/nextcloud/1.3.19/migrations/migration_helpers/dns_config.py rename to trains/stable/nextcloud/1.3.20/migrations/migration_helpers/dns_config.py diff --git a/trains/stable/nextcloud/1.3.19/migrations/migration_helpers/kubernetes_secrets.py b/trains/stable/nextcloud/1.3.20/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/stable/nextcloud/1.3.19/migrations/migration_helpers/kubernetes_secrets.py rename to trains/stable/nextcloud/1.3.20/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/stable/nextcloud/1.3.19/migrations/migration_helpers/memory.py b/trains/stable/nextcloud/1.3.20/migrations/migration_helpers/memory.py similarity index 100% rename from trains/stable/nextcloud/1.3.19/migrations/migration_helpers/memory.py rename to trains/stable/nextcloud/1.3.20/migrations/migration_helpers/memory.py diff --git a/trains/stable/nextcloud/1.3.19/migrations/migration_helpers/resources.py b/trains/stable/nextcloud/1.3.20/migrations/migration_helpers/resources.py similarity index 100% rename from trains/stable/nextcloud/1.3.19/migrations/migration_helpers/resources.py rename to trains/stable/nextcloud/1.3.20/migrations/migration_helpers/resources.py diff --git a/trains/stable/nextcloud/1.3.19/migrations/migration_helpers/storage.py b/trains/stable/nextcloud/1.3.20/migrations/migration_helpers/storage.py similarity index 100% rename from trains/stable/nextcloud/1.3.19/migrations/migration_helpers/storage.py rename to trains/stable/nextcloud/1.3.20/migrations/migration_helpers/storage.py diff --git a/trains/stable/nextcloud/1.3.19/questions.yaml b/trains/stable/nextcloud/1.3.20/questions.yaml similarity index 100% rename from trains/stable/nextcloud/1.3.19/questions.yaml rename to trains/stable/nextcloud/1.3.20/questions.yaml diff --git a/trains/stable/nextcloud/1.3.19/templates/docker-compose.yaml b/trains/stable/nextcloud/1.3.20/templates/docker-compose.yaml similarity index 100% rename from trains/stable/nextcloud/1.3.19/templates/docker-compose.yaml rename to trains/stable/nextcloud/1.3.20/templates/docker-compose.yaml diff --git a/trains/stable/nextcloud/1.3.19/templates/library/base_v1_1_3/__init__.py b/trains/stable/nextcloud/1.3.20/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/stable/nextcloud/1.3.19/templates/library/base_v1_1_3/__init__.py rename to trains/stable/nextcloud/1.3.20/templates/library/base_v1_1_4/__init__.py diff --git a/trains/stable/nextcloud/1.3.19/templates/library/base_v1_1_3/environment.py b/trains/stable/nextcloud/1.3.20/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/stable/nextcloud/1.3.19/templates/library/base_v1_1_3/environment.py rename to trains/stable/nextcloud/1.3.20/templates/library/base_v1_1_4/environment.py diff --git a/trains/stable/nextcloud/1.3.20/templates/library/base_v1_1_4/healthchecks.py b/trains/stable/nextcloud/1.3.20/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/stable/nextcloud/1.3.20/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/stable/nextcloud/1.3.19/templates/library/base_v1_1_3/mariadb.py b/trains/stable/nextcloud/1.3.20/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/stable/nextcloud/1.3.19/templates/library/base_v1_1_3/mariadb.py rename to trains/stable/nextcloud/1.3.20/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/stable/nextcloud/1.3.19/templates/library/base_v1_1_3/metadata.py b/trains/stable/nextcloud/1.3.20/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/stable/nextcloud/1.3.19/templates/library/base_v1_1_3/metadata.py rename to trains/stable/nextcloud/1.3.20/templates/library/base_v1_1_4/metadata.py diff --git a/trains/stable/nextcloud/1.3.19/templates/library/base_v1_1_3/network.py b/trains/stable/nextcloud/1.3.20/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/stable/nextcloud/1.3.19/templates/library/base_v1_1_3/network.py rename to trains/stable/nextcloud/1.3.20/templates/library/base_v1_1_4/network.py diff --git a/trains/stable/nextcloud/1.3.20/templates/library/base_v1_1_4/permissions.py b/trains/stable/nextcloud/1.3.20/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/stable/nextcloud/1.3.20/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/stable/nextcloud/1.3.19/templates/library/base_v1_1_3/ports.py b/trains/stable/nextcloud/1.3.20/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/stable/nextcloud/1.3.19/templates/library/base_v1_1_3/ports.py rename to trains/stable/nextcloud/1.3.20/templates/library/base_v1_1_4/ports.py diff --git a/trains/stable/nextcloud/1.3.19/templates/library/base_v1_1_3/postgres.py b/trains/stable/nextcloud/1.3.20/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/stable/nextcloud/1.3.19/templates/library/base_v1_1_3/postgres.py rename to trains/stable/nextcloud/1.3.20/templates/library/base_v1_1_4/postgres.py diff --git a/trains/stable/nextcloud/1.3.19/templates/library/base_v1_1_3/redis.py b/trains/stable/nextcloud/1.3.20/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/stable/nextcloud/1.3.19/templates/library/base_v1_1_3/redis.py rename to trains/stable/nextcloud/1.3.20/templates/library/base_v1_1_4/redis.py diff --git a/trains/stable/nextcloud/1.3.19/templates/library/base_v1_1_3/resources.py b/trains/stable/nextcloud/1.3.20/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/stable/nextcloud/1.3.19/templates/library/base_v1_1_3/resources.py rename to trains/stable/nextcloud/1.3.20/templates/library/base_v1_1_4/resources.py diff --git a/trains/stable/nextcloud/1.3.19/templates/library/base_v1_1_3/security.py b/trains/stable/nextcloud/1.3.20/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/stable/nextcloud/1.3.19/templates/library/base_v1_1_3/security.py rename to trains/stable/nextcloud/1.3.20/templates/library/base_v1_1_4/security.py diff --git a/trains/stable/nextcloud/1.3.19/templates/library/base_v1_1_3/storage.py b/trains/stable/nextcloud/1.3.20/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/stable/nextcloud/1.3.19/templates/library/base_v1_1_3/storage.py rename to trains/stable/nextcloud/1.3.20/templates/library/base_v1_1_4/storage.py diff --git a/trains/stable/nextcloud/1.3.19/templates/library/base_v1_1_3/utils.py b/trains/stable/nextcloud/1.3.20/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/stable/nextcloud/1.3.19/templates/library/base_v1_1_3/utils.py rename to trains/stable/nextcloud/1.3.20/templates/library/base_v1_1_4/utils.py diff --git a/trains/stable/nextcloud/1.3.19/templates/test_values/basic-values.yaml b/trains/stable/nextcloud/1.3.20/templates/test_values/basic-values.yaml similarity index 100% rename from trains/stable/nextcloud/1.3.19/templates/test_values/basic-values.yaml rename to trains/stable/nextcloud/1.3.20/templates/test_values/basic-values.yaml diff --git a/trains/stable/nextcloud/1.3.19/templates/test_values/https-values.yaml b/trains/stable/nextcloud/1.3.20/templates/test_values/https-values.yaml similarity index 100% rename from trains/stable/nextcloud/1.3.19/templates/test_values/https-values.yaml rename to trains/stable/nextcloud/1.3.20/templates/test_values/https-values.yaml diff --git a/trains/stable/nextcloud/1.3.19/templates/test_values/same-vol-values.yaml b/trains/stable/nextcloud/1.3.20/templates/test_values/same-vol-values.yaml similarity index 100% rename from trains/stable/nextcloud/1.3.19/templates/test_values/same-vol-values.yaml rename to trains/stable/nextcloud/1.3.20/templates/test_values/same-vol-values.yaml diff --git a/trains/stable/photoprism/1.1.13/templates/library/base_v1_1_3/healthchecks.py b/trains/stable/photoprism/1.1.13/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/stable/photoprism/1.1.13/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/stable/photoprism/1.1.13/templates/library/base_v1_1_3/permissions.py b/trains/stable/photoprism/1.1.13/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/stable/photoprism/1.1.13/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/stable/photoprism/1.1.13/README.md b/trains/stable/photoprism/1.1.14/README.md similarity index 100% rename from trains/stable/photoprism/1.1.13/README.md rename to trains/stable/photoprism/1.1.14/README.md diff --git a/trains/stable/photoprism/1.1.13/app.yaml b/trains/stable/photoprism/1.1.14/app.yaml similarity index 91% rename from trains/stable/photoprism/1.1.13/app.yaml rename to trains/stable/photoprism/1.1.14/app.yaml index e8ebb294d9..3dd82228b4 100644 --- a/trains/stable/photoprism/1.1.13/app.yaml +++ b/trains/stable/photoprism/1.1.14/app.yaml @@ -22,8 +22,8 @@ keywords: - media - photos - image -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -42,4 +42,4 @@ sources: - https://photoprism.app/ title: Photoprism train: stable -version: 1.1.13 +version: 1.1.14 diff --git a/trains/stable/photoprism/1.1.13/ix_values.yaml b/trains/stable/photoprism/1.1.14/ix_values.yaml similarity index 100% rename from trains/stable/photoprism/1.1.13/ix_values.yaml rename to trains/stable/photoprism/1.1.14/ix_values.yaml diff --git a/trains/stable/photoprism/1.1.13/migrations/migrate_from_kubernetes b/trains/stable/photoprism/1.1.14/migrations/migrate_from_kubernetes similarity index 100% rename from trains/stable/photoprism/1.1.13/migrations/migrate_from_kubernetes rename to trains/stable/photoprism/1.1.14/migrations/migrate_from_kubernetes diff --git a/trains/stable/photoprism/1.1.13/migrations/migration_helpers/__init__.py b/trains/stable/photoprism/1.1.14/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/stable/photoprism/1.1.13/migrations/migration_helpers/__init__.py rename to trains/stable/photoprism/1.1.14/migrations/migration_helpers/__init__.py diff --git a/trains/stable/photoprism/1.1.13/migrations/migration_helpers/cpu.py b/trains/stable/photoprism/1.1.14/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/stable/photoprism/1.1.13/migrations/migration_helpers/cpu.py rename to trains/stable/photoprism/1.1.14/migrations/migration_helpers/cpu.py diff --git a/trains/stable/photoprism/1.1.13/migrations/migration_helpers/dns_config.py b/trains/stable/photoprism/1.1.14/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/stable/photoprism/1.1.13/migrations/migration_helpers/dns_config.py rename to trains/stable/photoprism/1.1.14/migrations/migration_helpers/dns_config.py diff --git a/trains/stable/photoprism/1.1.13/migrations/migration_helpers/kubernetes_secrets.py b/trains/stable/photoprism/1.1.14/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/stable/photoprism/1.1.13/migrations/migration_helpers/kubernetes_secrets.py rename to trains/stable/photoprism/1.1.14/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/stable/photoprism/1.1.13/migrations/migration_helpers/memory.py b/trains/stable/photoprism/1.1.14/migrations/migration_helpers/memory.py similarity index 100% rename from trains/stable/photoprism/1.1.13/migrations/migration_helpers/memory.py rename to trains/stable/photoprism/1.1.14/migrations/migration_helpers/memory.py diff --git a/trains/stable/photoprism/1.1.13/migrations/migration_helpers/resources.py b/trains/stable/photoprism/1.1.14/migrations/migration_helpers/resources.py similarity index 100% rename from trains/stable/photoprism/1.1.13/migrations/migration_helpers/resources.py rename to trains/stable/photoprism/1.1.14/migrations/migration_helpers/resources.py diff --git a/trains/stable/photoprism/1.1.13/migrations/migration_helpers/storage.py b/trains/stable/photoprism/1.1.14/migrations/migration_helpers/storage.py similarity index 100% rename from trains/stable/photoprism/1.1.13/migrations/migration_helpers/storage.py rename to trains/stable/photoprism/1.1.14/migrations/migration_helpers/storage.py diff --git a/trains/stable/photoprism/1.1.13/questions.yaml b/trains/stable/photoprism/1.1.14/questions.yaml similarity index 100% rename from trains/stable/photoprism/1.1.13/questions.yaml rename to trains/stable/photoprism/1.1.14/questions.yaml diff --git a/trains/stable/photoprism/1.1.13/templates/docker-compose.yaml b/trains/stable/photoprism/1.1.14/templates/docker-compose.yaml similarity index 100% rename from trains/stable/photoprism/1.1.13/templates/docker-compose.yaml rename to trains/stable/photoprism/1.1.14/templates/docker-compose.yaml diff --git a/trains/stable/photoprism/1.1.13/templates/library/base_v1_1_3/__init__.py b/trains/stable/photoprism/1.1.14/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/stable/photoprism/1.1.13/templates/library/base_v1_1_3/__init__.py rename to trains/stable/photoprism/1.1.14/templates/library/base_v1_1_4/__init__.py diff --git a/trains/stable/photoprism/1.1.13/templates/library/base_v1_1_3/environment.py b/trains/stable/photoprism/1.1.14/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/stable/photoprism/1.1.13/templates/library/base_v1_1_3/environment.py rename to trains/stable/photoprism/1.1.14/templates/library/base_v1_1_4/environment.py diff --git a/trains/stable/photoprism/1.1.14/templates/library/base_v1_1_4/healthchecks.py b/trains/stable/photoprism/1.1.14/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/stable/photoprism/1.1.14/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/stable/photoprism/1.1.13/templates/library/base_v1_1_3/mariadb.py b/trains/stable/photoprism/1.1.14/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/stable/photoprism/1.1.13/templates/library/base_v1_1_3/mariadb.py rename to trains/stable/photoprism/1.1.14/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/stable/photoprism/1.1.13/templates/library/base_v1_1_3/metadata.py b/trains/stable/photoprism/1.1.14/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/stable/photoprism/1.1.13/templates/library/base_v1_1_3/metadata.py rename to trains/stable/photoprism/1.1.14/templates/library/base_v1_1_4/metadata.py diff --git a/trains/stable/photoprism/1.1.13/templates/library/base_v1_1_3/network.py b/trains/stable/photoprism/1.1.14/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/stable/photoprism/1.1.13/templates/library/base_v1_1_3/network.py rename to trains/stable/photoprism/1.1.14/templates/library/base_v1_1_4/network.py diff --git a/trains/stable/photoprism/1.1.14/templates/library/base_v1_1_4/permissions.py b/trains/stable/photoprism/1.1.14/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/stable/photoprism/1.1.14/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/stable/photoprism/1.1.13/templates/library/base_v1_1_3/ports.py b/trains/stable/photoprism/1.1.14/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/stable/photoprism/1.1.13/templates/library/base_v1_1_3/ports.py rename to trains/stable/photoprism/1.1.14/templates/library/base_v1_1_4/ports.py diff --git a/trains/stable/photoprism/1.1.13/templates/library/base_v1_1_3/postgres.py b/trains/stable/photoprism/1.1.14/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/stable/photoprism/1.1.13/templates/library/base_v1_1_3/postgres.py rename to trains/stable/photoprism/1.1.14/templates/library/base_v1_1_4/postgres.py diff --git a/trains/stable/photoprism/1.1.13/templates/library/base_v1_1_3/redis.py b/trains/stable/photoprism/1.1.14/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/stable/photoprism/1.1.13/templates/library/base_v1_1_3/redis.py rename to trains/stable/photoprism/1.1.14/templates/library/base_v1_1_4/redis.py diff --git a/trains/stable/photoprism/1.1.13/templates/library/base_v1_1_3/resources.py b/trains/stable/photoprism/1.1.14/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/stable/photoprism/1.1.13/templates/library/base_v1_1_3/resources.py rename to trains/stable/photoprism/1.1.14/templates/library/base_v1_1_4/resources.py diff --git a/trains/stable/photoprism/1.1.13/templates/library/base_v1_1_3/security.py b/trains/stable/photoprism/1.1.14/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/stable/photoprism/1.1.13/templates/library/base_v1_1_3/security.py rename to trains/stable/photoprism/1.1.14/templates/library/base_v1_1_4/security.py diff --git a/trains/stable/photoprism/1.1.13/templates/library/base_v1_1_3/storage.py b/trains/stable/photoprism/1.1.14/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/stable/photoprism/1.1.13/templates/library/base_v1_1_3/storage.py rename to trains/stable/photoprism/1.1.14/templates/library/base_v1_1_4/storage.py diff --git a/trains/stable/photoprism/1.1.13/templates/library/base_v1_1_3/utils.py b/trains/stable/photoprism/1.1.14/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/stable/photoprism/1.1.13/templates/library/base_v1_1_3/utils.py rename to trains/stable/photoprism/1.1.14/templates/library/base_v1_1_4/utils.py diff --git a/trains/stable/photoprism/1.1.13/templates/test_values/basic-values.yaml b/trains/stable/photoprism/1.1.14/templates/test_values/basic-values.yaml similarity index 100% rename from trains/stable/photoprism/1.1.13/templates/test_values/basic-values.yaml rename to trains/stable/photoprism/1.1.14/templates/test_values/basic-values.yaml diff --git a/trains/stable/photoprism/1.1.13/templates/test_values/host-values.yaml b/trains/stable/photoprism/1.1.14/templates/test_values/host-values.yaml similarity index 100% rename from trains/stable/photoprism/1.1.13/templates/test_values/host-values.yaml rename to trains/stable/photoprism/1.1.14/templates/test_values/host-values.yaml diff --git a/trains/stable/photoprism/1.1.13/templates/test_values/https-values.yaml b/trains/stable/photoprism/1.1.14/templates/test_values/https-values.yaml similarity index 100% rename from trains/stable/photoprism/1.1.13/templates/test_values/https-values.yaml rename to trains/stable/photoprism/1.1.14/templates/test_values/https-values.yaml diff --git a/trains/stable/photoprism/1.1.13/templates/test_values/pass-values.yaml b/trains/stable/photoprism/1.1.14/templates/test_values/pass-values.yaml similarity index 100% rename from trains/stable/photoprism/1.1.13/templates/test_values/pass-values.yaml rename to trains/stable/photoprism/1.1.14/templates/test_values/pass-values.yaml diff --git a/trains/stable/pihole/1.1.10/templates/library/base_v1_1_3/healthchecks.py b/trains/stable/pihole/1.1.10/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/stable/pihole/1.1.10/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/stable/pihole/1.1.10/templates/library/base_v1_1_3/permissions.py b/trains/stable/pihole/1.1.10/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/stable/pihole/1.1.10/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/stable/pihole/1.1.10/README.md b/trains/stable/pihole/1.1.11/README.md similarity index 100% rename from trains/stable/pihole/1.1.10/README.md rename to trains/stable/pihole/1.1.11/README.md diff --git a/trains/stable/pihole/1.1.10/app.yaml b/trains/stable/pihole/1.1.11/app.yaml similarity index 93% rename from trains/stable/pihole/1.1.10/app.yaml rename to trains/stable/pihole/1.1.11/app.yaml index bd569765f7..eab25408ae 100644 --- a/trains/stable/pihole/1.1.10/app.yaml +++ b/trains/stable/pihole/1.1.11/app.yaml @@ -33,8 +33,8 @@ icon: https://media.sys.truenas.net/apps/pihole/icons/icon.png keywords: - networking - dns -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -53,4 +53,4 @@ sources: - https://github.com/truenas/charts/tree/master/charts/pihole title: Pi-hole train: stable -version: 1.1.10 +version: 1.1.11 diff --git a/trains/stable/pihole/1.1.10/ix_values.yaml b/trains/stable/pihole/1.1.11/ix_values.yaml similarity index 100% rename from trains/stable/pihole/1.1.10/ix_values.yaml rename to trains/stable/pihole/1.1.11/ix_values.yaml diff --git a/trains/stable/pihole/1.1.10/migrations/migrate_from_kubernetes b/trains/stable/pihole/1.1.11/migrations/migrate_from_kubernetes similarity index 100% rename from trains/stable/pihole/1.1.10/migrations/migrate_from_kubernetes rename to trains/stable/pihole/1.1.11/migrations/migrate_from_kubernetes diff --git a/trains/stable/pihole/1.1.10/migrations/migration_helpers/__init__.py b/trains/stable/pihole/1.1.11/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/stable/pihole/1.1.10/migrations/migration_helpers/__init__.py rename to trains/stable/pihole/1.1.11/migrations/migration_helpers/__init__.py diff --git a/trains/stable/pihole/1.1.10/migrations/migration_helpers/cpu.py b/trains/stable/pihole/1.1.11/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/stable/pihole/1.1.10/migrations/migration_helpers/cpu.py rename to trains/stable/pihole/1.1.11/migrations/migration_helpers/cpu.py diff --git a/trains/stable/pihole/1.1.10/migrations/migration_helpers/dns_config.py b/trains/stable/pihole/1.1.11/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/stable/pihole/1.1.10/migrations/migration_helpers/dns_config.py rename to trains/stable/pihole/1.1.11/migrations/migration_helpers/dns_config.py diff --git a/trains/stable/pihole/1.1.10/migrations/migration_helpers/kubernetes_secrets.py b/trains/stable/pihole/1.1.11/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/stable/pihole/1.1.10/migrations/migration_helpers/kubernetes_secrets.py rename to trains/stable/pihole/1.1.11/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/stable/pihole/1.1.10/migrations/migration_helpers/memory.py b/trains/stable/pihole/1.1.11/migrations/migration_helpers/memory.py similarity index 100% rename from trains/stable/pihole/1.1.10/migrations/migration_helpers/memory.py rename to trains/stable/pihole/1.1.11/migrations/migration_helpers/memory.py diff --git a/trains/stable/pihole/1.1.10/migrations/migration_helpers/resources.py b/trains/stable/pihole/1.1.11/migrations/migration_helpers/resources.py similarity index 100% rename from trains/stable/pihole/1.1.10/migrations/migration_helpers/resources.py rename to trains/stable/pihole/1.1.11/migrations/migration_helpers/resources.py diff --git a/trains/stable/pihole/1.1.10/migrations/migration_helpers/storage.py b/trains/stable/pihole/1.1.11/migrations/migration_helpers/storage.py similarity index 100% rename from trains/stable/pihole/1.1.10/migrations/migration_helpers/storage.py rename to trains/stable/pihole/1.1.11/migrations/migration_helpers/storage.py diff --git a/trains/stable/pihole/1.1.10/questions.yaml b/trains/stable/pihole/1.1.11/questions.yaml similarity index 100% rename from trains/stable/pihole/1.1.10/questions.yaml rename to trains/stable/pihole/1.1.11/questions.yaml diff --git a/trains/stable/pihole/1.1.10/templates/docker-compose.yaml b/trains/stable/pihole/1.1.11/templates/docker-compose.yaml similarity index 100% rename from trains/stable/pihole/1.1.10/templates/docker-compose.yaml rename to trains/stable/pihole/1.1.11/templates/docker-compose.yaml diff --git a/trains/stable/pihole/1.1.10/templates/library/base_v1_1_3/__init__.py b/trains/stable/pihole/1.1.11/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/stable/pihole/1.1.10/templates/library/base_v1_1_3/__init__.py rename to trains/stable/pihole/1.1.11/templates/library/base_v1_1_4/__init__.py diff --git a/trains/stable/pihole/1.1.10/templates/library/base_v1_1_3/environment.py b/trains/stable/pihole/1.1.11/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/stable/pihole/1.1.10/templates/library/base_v1_1_3/environment.py rename to trains/stable/pihole/1.1.11/templates/library/base_v1_1_4/environment.py diff --git a/trains/stable/pihole/1.1.11/templates/library/base_v1_1_4/healthchecks.py b/trains/stable/pihole/1.1.11/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/stable/pihole/1.1.11/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/stable/pihole/1.1.10/templates/library/base_v1_1_3/mariadb.py b/trains/stable/pihole/1.1.11/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/stable/pihole/1.1.10/templates/library/base_v1_1_3/mariadb.py rename to trains/stable/pihole/1.1.11/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/stable/pihole/1.1.10/templates/library/base_v1_1_3/metadata.py b/trains/stable/pihole/1.1.11/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/stable/pihole/1.1.10/templates/library/base_v1_1_3/metadata.py rename to trains/stable/pihole/1.1.11/templates/library/base_v1_1_4/metadata.py diff --git a/trains/stable/pihole/1.1.10/templates/library/base_v1_1_3/network.py b/trains/stable/pihole/1.1.11/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/stable/pihole/1.1.10/templates/library/base_v1_1_3/network.py rename to trains/stable/pihole/1.1.11/templates/library/base_v1_1_4/network.py diff --git a/trains/stable/pihole/1.1.11/templates/library/base_v1_1_4/permissions.py b/trains/stable/pihole/1.1.11/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/stable/pihole/1.1.11/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/stable/pihole/1.1.10/templates/library/base_v1_1_3/ports.py b/trains/stable/pihole/1.1.11/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/stable/pihole/1.1.10/templates/library/base_v1_1_3/ports.py rename to trains/stable/pihole/1.1.11/templates/library/base_v1_1_4/ports.py diff --git a/trains/stable/pihole/1.1.10/templates/library/base_v1_1_3/postgres.py b/trains/stable/pihole/1.1.11/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/stable/pihole/1.1.10/templates/library/base_v1_1_3/postgres.py rename to trains/stable/pihole/1.1.11/templates/library/base_v1_1_4/postgres.py diff --git a/trains/stable/pihole/1.1.10/templates/library/base_v1_1_3/redis.py b/trains/stable/pihole/1.1.11/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/stable/pihole/1.1.10/templates/library/base_v1_1_3/redis.py rename to trains/stable/pihole/1.1.11/templates/library/base_v1_1_4/redis.py diff --git a/trains/stable/pihole/1.1.10/templates/library/base_v1_1_3/resources.py b/trains/stable/pihole/1.1.11/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/stable/pihole/1.1.10/templates/library/base_v1_1_3/resources.py rename to trains/stable/pihole/1.1.11/templates/library/base_v1_1_4/resources.py diff --git a/trains/stable/pihole/1.1.10/templates/library/base_v1_1_3/security.py b/trains/stable/pihole/1.1.11/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/stable/pihole/1.1.10/templates/library/base_v1_1_3/security.py rename to trains/stable/pihole/1.1.11/templates/library/base_v1_1_4/security.py diff --git a/trains/stable/pihole/1.1.10/templates/library/base_v1_1_3/storage.py b/trains/stable/pihole/1.1.11/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/stable/pihole/1.1.10/templates/library/base_v1_1_3/storage.py rename to trains/stable/pihole/1.1.11/templates/library/base_v1_1_4/storage.py diff --git a/trains/stable/pihole/1.1.10/templates/library/base_v1_1_3/utils.py b/trains/stable/pihole/1.1.11/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/stable/pihole/1.1.10/templates/library/base_v1_1_3/utils.py rename to trains/stable/pihole/1.1.11/templates/library/base_v1_1_4/utils.py diff --git a/trains/stable/pihole/1.1.10/templates/test_values/basic-values.yaml b/trains/stable/pihole/1.1.11/templates/test_values/basic-values.yaml similarity index 100% rename from trains/stable/pihole/1.1.10/templates/test_values/basic-values.yaml rename to trains/stable/pihole/1.1.11/templates/test_values/basic-values.yaml diff --git a/trains/stable/pihole/1.1.10/templates/test_values/dhcp-values.yaml b/trains/stable/pihole/1.1.11/templates/test_values/dhcp-values.yaml similarity index 100% rename from trains/stable/pihole/1.1.10/templates/test_values/dhcp-values.yaml rename to trains/stable/pihole/1.1.11/templates/test_values/dhcp-values.yaml diff --git a/trains/stable/plex/1.0.22/templates/library/base_v1_1_3/healthchecks.py b/trains/stable/plex/1.0.22/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/stable/plex/1.0.22/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/stable/plex/1.0.22/templates/library/base_v1_1_3/permissions.py b/trains/stable/plex/1.0.22/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/stable/plex/1.0.22/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/stable/plex/1.0.22/README.md b/trains/stable/plex/1.0.23/README.md similarity index 100% rename from trains/stable/plex/1.0.22/README.md rename to trains/stable/plex/1.0.23/README.md diff --git a/trains/stable/plex/1.0.22/app.yaml b/trains/stable/plex/1.0.23/app.yaml similarity index 91% rename from trains/stable/plex/1.0.22/app.yaml rename to trains/stable/plex/1.0.23/app.yaml index e783e30d67..7594552958 100644 --- a/trains/stable/plex/1.0.22/app.yaml +++ b/trains/stable/plex/1.0.23/app.yaml @@ -27,8 +27,8 @@ keywords: - series - tv - streaming -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -48,4 +48,4 @@ sources: - https://hub.docker.com/r/plexinc/pms-docker title: Plex train: stable -version: 1.0.22 +version: 1.0.23 diff --git a/trains/stable/plex/1.0.22/ix_values.yaml b/trains/stable/plex/1.0.23/ix_values.yaml similarity index 100% rename from trains/stable/plex/1.0.22/ix_values.yaml rename to trains/stable/plex/1.0.23/ix_values.yaml diff --git a/trains/stable/plex/1.0.22/migrations/__init__.py b/trains/stable/plex/1.0.23/migrations/__init__.py similarity index 100% rename from trains/stable/plex/1.0.22/migrations/__init__.py rename to trains/stable/plex/1.0.23/migrations/__init__.py diff --git a/trains/stable/plex/1.0.22/migrations/migrate_from_kubernetes b/trains/stable/plex/1.0.23/migrations/migrate_from_kubernetes similarity index 100% rename from trains/stable/plex/1.0.22/migrations/migrate_from_kubernetes rename to trains/stable/plex/1.0.23/migrations/migrate_from_kubernetes diff --git a/trains/stable/plex/1.0.22/migrations/migration_helpers/__init__.py b/trains/stable/plex/1.0.23/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/stable/plex/1.0.22/migrations/migration_helpers/__init__.py rename to trains/stable/plex/1.0.23/migrations/migration_helpers/__init__.py diff --git a/trains/stable/plex/1.0.22/migrations/migration_helpers/cpu.py b/trains/stable/plex/1.0.23/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/stable/plex/1.0.22/migrations/migration_helpers/cpu.py rename to trains/stable/plex/1.0.23/migrations/migration_helpers/cpu.py diff --git a/trains/stable/plex/1.0.22/migrations/migration_helpers/dns_config.py b/trains/stable/plex/1.0.23/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/stable/plex/1.0.22/migrations/migration_helpers/dns_config.py rename to trains/stable/plex/1.0.23/migrations/migration_helpers/dns_config.py diff --git a/trains/stable/plex/1.0.22/migrations/migration_helpers/kubernetes_secrets.py b/trains/stable/plex/1.0.23/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/stable/plex/1.0.22/migrations/migration_helpers/kubernetes_secrets.py rename to trains/stable/plex/1.0.23/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/stable/plex/1.0.22/migrations/migration_helpers/memory.py b/trains/stable/plex/1.0.23/migrations/migration_helpers/memory.py similarity index 100% rename from trains/stable/plex/1.0.22/migrations/migration_helpers/memory.py rename to trains/stable/plex/1.0.23/migrations/migration_helpers/memory.py diff --git a/trains/stable/plex/1.0.22/migrations/migration_helpers/resources.py b/trains/stable/plex/1.0.23/migrations/migration_helpers/resources.py similarity index 100% rename from trains/stable/plex/1.0.22/migrations/migration_helpers/resources.py rename to trains/stable/plex/1.0.23/migrations/migration_helpers/resources.py diff --git a/trains/stable/plex/1.0.22/migrations/migration_helpers/storage.py b/trains/stable/plex/1.0.23/migrations/migration_helpers/storage.py similarity index 100% rename from trains/stable/plex/1.0.22/migrations/migration_helpers/storage.py rename to trains/stable/plex/1.0.23/migrations/migration_helpers/storage.py diff --git a/trains/stable/plex/1.0.22/questions.yaml b/trains/stable/plex/1.0.23/questions.yaml similarity index 100% rename from trains/stable/plex/1.0.22/questions.yaml rename to trains/stable/plex/1.0.23/questions.yaml diff --git a/trains/stable/plex/1.0.22/templates/docker-compose.yaml b/trains/stable/plex/1.0.23/templates/docker-compose.yaml similarity index 100% rename from trains/stable/plex/1.0.22/templates/docker-compose.yaml rename to trains/stable/plex/1.0.23/templates/docker-compose.yaml diff --git a/trains/stable/plex/1.0.22/templates/library/base_v1_1_3/__init__.py b/trains/stable/plex/1.0.23/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/stable/plex/1.0.22/templates/library/base_v1_1_3/__init__.py rename to trains/stable/plex/1.0.23/templates/library/base_v1_1_4/__init__.py diff --git a/trains/stable/plex/1.0.22/templates/library/base_v1_1_3/environment.py b/trains/stable/plex/1.0.23/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/stable/plex/1.0.22/templates/library/base_v1_1_3/environment.py rename to trains/stable/plex/1.0.23/templates/library/base_v1_1_4/environment.py diff --git a/trains/stable/plex/1.0.23/templates/library/base_v1_1_4/healthchecks.py b/trains/stable/plex/1.0.23/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/stable/plex/1.0.23/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/stable/plex/1.0.22/templates/library/base_v1_1_3/mariadb.py b/trains/stable/plex/1.0.23/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/stable/plex/1.0.22/templates/library/base_v1_1_3/mariadb.py rename to trains/stable/plex/1.0.23/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/stable/plex/1.0.22/templates/library/base_v1_1_3/metadata.py b/trains/stable/plex/1.0.23/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/stable/plex/1.0.22/templates/library/base_v1_1_3/metadata.py rename to trains/stable/plex/1.0.23/templates/library/base_v1_1_4/metadata.py diff --git a/trains/stable/plex/1.0.22/templates/library/base_v1_1_3/network.py b/trains/stable/plex/1.0.23/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/stable/plex/1.0.22/templates/library/base_v1_1_3/network.py rename to trains/stable/plex/1.0.23/templates/library/base_v1_1_4/network.py diff --git a/trains/stable/plex/1.0.23/templates/library/base_v1_1_4/permissions.py b/trains/stable/plex/1.0.23/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/stable/plex/1.0.23/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/stable/plex/1.0.22/templates/library/base_v1_1_3/ports.py b/trains/stable/plex/1.0.23/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/stable/plex/1.0.22/templates/library/base_v1_1_3/ports.py rename to trains/stable/plex/1.0.23/templates/library/base_v1_1_4/ports.py diff --git a/trains/stable/plex/1.0.22/templates/library/base_v1_1_3/postgres.py b/trains/stable/plex/1.0.23/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/stable/plex/1.0.22/templates/library/base_v1_1_3/postgres.py rename to trains/stable/plex/1.0.23/templates/library/base_v1_1_4/postgres.py diff --git a/trains/stable/plex/1.0.22/templates/library/base_v1_1_3/redis.py b/trains/stable/plex/1.0.23/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/stable/plex/1.0.22/templates/library/base_v1_1_3/redis.py rename to trains/stable/plex/1.0.23/templates/library/base_v1_1_4/redis.py diff --git a/trains/stable/plex/1.0.22/templates/library/base_v1_1_3/resources.py b/trains/stable/plex/1.0.23/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/stable/plex/1.0.22/templates/library/base_v1_1_3/resources.py rename to trains/stable/plex/1.0.23/templates/library/base_v1_1_4/resources.py diff --git a/trains/stable/plex/1.0.22/templates/library/base_v1_1_3/security.py b/trains/stable/plex/1.0.23/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/stable/plex/1.0.22/templates/library/base_v1_1_3/security.py rename to trains/stable/plex/1.0.23/templates/library/base_v1_1_4/security.py diff --git a/trains/stable/plex/1.0.22/templates/library/base_v1_1_3/storage.py b/trains/stable/plex/1.0.23/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/stable/plex/1.0.22/templates/library/base_v1_1_3/storage.py rename to trains/stable/plex/1.0.23/templates/library/base_v1_1_4/storage.py diff --git a/trains/stable/plex/1.0.22/templates/library/base_v1_1_3/utils.py b/trains/stable/plex/1.0.23/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/stable/plex/1.0.22/templates/library/base_v1_1_3/utils.py rename to trains/stable/plex/1.0.23/templates/library/base_v1_1_4/utils.py diff --git a/trains/stable/plex/1.0.22/templates/test_values/basic-values.yaml b/trains/stable/plex/1.0.23/templates/test_values/basic-values.yaml similarity index 100% rename from trains/stable/plex/1.0.22/templates/test_values/basic-values.yaml rename to trains/stable/plex/1.0.23/templates/test_values/basic-values.yaml diff --git a/trains/stable/plex/1.0.22/templates/test_values/hostnet-values.yaml b/trains/stable/plex/1.0.23/templates/test_values/hostnet-values.yaml similarity index 100% rename from trains/stable/plex/1.0.22/templates/test_values/hostnet-values.yaml rename to trains/stable/plex/1.0.23/templates/test_values/hostnet-values.yaml diff --git a/trains/stable/prometheus/1.1.10/templates/library/base_v1_1_3/healthchecks.py b/trains/stable/prometheus/1.1.10/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/stable/prometheus/1.1.10/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/stable/prometheus/1.1.10/templates/library/base_v1_1_3/permissions.py b/trains/stable/prometheus/1.1.10/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/stable/prometheus/1.1.10/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/stable/prometheus/1.1.10/README.md b/trains/stable/prometheus/1.1.11/README.md similarity index 100% rename from trains/stable/prometheus/1.1.10/README.md rename to trains/stable/prometheus/1.1.11/README.md diff --git a/trains/stable/prometheus/1.1.10/app.yaml b/trains/stable/prometheus/1.1.11/app.yaml similarity index 86% rename from trains/stable/prometheus/1.1.10/app.yaml rename to trains/stable/prometheus/1.1.11/app.yaml index cef05c3b08..f3c57bb0a8 100644 --- a/trains/stable/prometheus/1.1.10/app.yaml +++ b/trains/stable/prometheus/1.1.11/app.yaml @@ -9,8 +9,8 @@ icon: https://media.sys.truenas.net/apps/prometheus/icons/icon.png keywords: - metrics - prometheus -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -30,4 +30,4 @@ sources: - https://prometheus.io title: Prometheus train: stable -version: 1.1.10 +version: 1.1.11 diff --git a/trains/stable/prometheus/1.1.10/ix_values.yaml b/trains/stable/prometheus/1.1.11/ix_values.yaml similarity index 100% rename from trains/stable/prometheus/1.1.10/ix_values.yaml rename to trains/stable/prometheus/1.1.11/ix_values.yaml diff --git a/trains/stable/prometheus/1.1.10/migrations/migrate_from_kubernetes b/trains/stable/prometheus/1.1.11/migrations/migrate_from_kubernetes similarity index 100% rename from trains/stable/prometheus/1.1.10/migrations/migrate_from_kubernetes rename to trains/stable/prometheus/1.1.11/migrations/migrate_from_kubernetes diff --git a/trains/stable/prometheus/1.1.10/migrations/migration_helpers/__init__.py b/trains/stable/prometheus/1.1.11/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/stable/prometheus/1.1.10/migrations/migration_helpers/__init__.py rename to trains/stable/prometheus/1.1.11/migrations/migration_helpers/__init__.py diff --git a/trains/stable/prometheus/1.1.10/migrations/migration_helpers/cpu.py b/trains/stable/prometheus/1.1.11/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/stable/prometheus/1.1.10/migrations/migration_helpers/cpu.py rename to trains/stable/prometheus/1.1.11/migrations/migration_helpers/cpu.py diff --git a/trains/stable/prometheus/1.1.10/migrations/migration_helpers/dns_config.py b/trains/stable/prometheus/1.1.11/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/stable/prometheus/1.1.10/migrations/migration_helpers/dns_config.py rename to trains/stable/prometheus/1.1.11/migrations/migration_helpers/dns_config.py diff --git a/trains/stable/prometheus/1.1.10/migrations/migration_helpers/kubernetes_secrets.py b/trains/stable/prometheus/1.1.11/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/stable/prometheus/1.1.10/migrations/migration_helpers/kubernetes_secrets.py rename to trains/stable/prometheus/1.1.11/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/stable/prometheus/1.1.10/migrations/migration_helpers/memory.py b/trains/stable/prometheus/1.1.11/migrations/migration_helpers/memory.py similarity index 100% rename from trains/stable/prometheus/1.1.10/migrations/migration_helpers/memory.py rename to trains/stable/prometheus/1.1.11/migrations/migration_helpers/memory.py diff --git a/trains/stable/prometheus/1.1.10/migrations/migration_helpers/resources.py b/trains/stable/prometheus/1.1.11/migrations/migration_helpers/resources.py similarity index 100% rename from trains/stable/prometheus/1.1.10/migrations/migration_helpers/resources.py rename to trains/stable/prometheus/1.1.11/migrations/migration_helpers/resources.py diff --git a/trains/stable/prometheus/1.1.10/migrations/migration_helpers/storage.py b/trains/stable/prometheus/1.1.11/migrations/migration_helpers/storage.py similarity index 100% rename from trains/stable/prometheus/1.1.10/migrations/migration_helpers/storage.py rename to trains/stable/prometheus/1.1.11/migrations/migration_helpers/storage.py diff --git a/trains/stable/prometheus/1.1.10/questions.yaml b/trains/stable/prometheus/1.1.11/questions.yaml similarity index 100% rename from trains/stable/prometheus/1.1.10/questions.yaml rename to trains/stable/prometheus/1.1.11/questions.yaml diff --git a/trains/stable/prometheus/1.1.10/templates/docker-compose.yaml b/trains/stable/prometheus/1.1.11/templates/docker-compose.yaml similarity index 100% rename from trains/stable/prometheus/1.1.10/templates/docker-compose.yaml rename to trains/stable/prometheus/1.1.11/templates/docker-compose.yaml diff --git a/trains/stable/prometheus/1.1.10/templates/library/base_v1_1_3/__init__.py b/trains/stable/prometheus/1.1.11/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/stable/prometheus/1.1.10/templates/library/base_v1_1_3/__init__.py rename to trains/stable/prometheus/1.1.11/templates/library/base_v1_1_4/__init__.py diff --git a/trains/stable/prometheus/1.1.10/templates/library/base_v1_1_3/environment.py b/trains/stable/prometheus/1.1.11/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/stable/prometheus/1.1.10/templates/library/base_v1_1_3/environment.py rename to trains/stable/prometheus/1.1.11/templates/library/base_v1_1_4/environment.py diff --git a/trains/stable/prometheus/1.1.11/templates/library/base_v1_1_4/healthchecks.py b/trains/stable/prometheus/1.1.11/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/stable/prometheus/1.1.11/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/stable/prometheus/1.1.10/templates/library/base_v1_1_3/mariadb.py b/trains/stable/prometheus/1.1.11/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/stable/prometheus/1.1.10/templates/library/base_v1_1_3/mariadb.py rename to trains/stable/prometheus/1.1.11/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/stable/prometheus/1.1.10/templates/library/base_v1_1_3/metadata.py b/trains/stable/prometheus/1.1.11/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/stable/prometheus/1.1.10/templates/library/base_v1_1_3/metadata.py rename to trains/stable/prometheus/1.1.11/templates/library/base_v1_1_4/metadata.py diff --git a/trains/stable/prometheus/1.1.10/templates/library/base_v1_1_3/network.py b/trains/stable/prometheus/1.1.11/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/stable/prometheus/1.1.10/templates/library/base_v1_1_3/network.py rename to trains/stable/prometheus/1.1.11/templates/library/base_v1_1_4/network.py diff --git a/trains/stable/prometheus/1.1.11/templates/library/base_v1_1_4/permissions.py b/trains/stable/prometheus/1.1.11/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/stable/prometheus/1.1.11/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/stable/prometheus/1.1.10/templates/library/base_v1_1_3/ports.py b/trains/stable/prometheus/1.1.11/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/stable/prometheus/1.1.10/templates/library/base_v1_1_3/ports.py rename to trains/stable/prometheus/1.1.11/templates/library/base_v1_1_4/ports.py diff --git a/trains/stable/prometheus/1.1.10/templates/library/base_v1_1_3/postgres.py b/trains/stable/prometheus/1.1.11/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/stable/prometheus/1.1.10/templates/library/base_v1_1_3/postgres.py rename to trains/stable/prometheus/1.1.11/templates/library/base_v1_1_4/postgres.py diff --git a/trains/stable/prometheus/1.1.10/templates/library/base_v1_1_3/redis.py b/trains/stable/prometheus/1.1.11/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/stable/prometheus/1.1.10/templates/library/base_v1_1_3/redis.py rename to trains/stable/prometheus/1.1.11/templates/library/base_v1_1_4/redis.py diff --git a/trains/stable/prometheus/1.1.10/templates/library/base_v1_1_3/resources.py b/trains/stable/prometheus/1.1.11/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/stable/prometheus/1.1.10/templates/library/base_v1_1_3/resources.py rename to trains/stable/prometheus/1.1.11/templates/library/base_v1_1_4/resources.py diff --git a/trains/stable/prometheus/1.1.10/templates/library/base_v1_1_3/security.py b/trains/stable/prometheus/1.1.11/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/stable/prometheus/1.1.10/templates/library/base_v1_1_3/security.py rename to trains/stable/prometheus/1.1.11/templates/library/base_v1_1_4/security.py diff --git a/trains/stable/prometheus/1.1.10/templates/library/base_v1_1_3/storage.py b/trains/stable/prometheus/1.1.11/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/stable/prometheus/1.1.10/templates/library/base_v1_1_3/storage.py rename to trains/stable/prometheus/1.1.11/templates/library/base_v1_1_4/storage.py diff --git a/trains/stable/prometheus/1.1.10/templates/library/base_v1_1_3/utils.py b/trains/stable/prometheus/1.1.11/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/stable/prometheus/1.1.10/templates/library/base_v1_1_3/utils.py rename to trains/stable/prometheus/1.1.11/templates/library/base_v1_1_4/utils.py diff --git a/trains/stable/prometheus/1.1.10/templates/test_values/basic-values.yaml b/trains/stable/prometheus/1.1.11/templates/test_values/basic-values.yaml similarity index 100% rename from trains/stable/prometheus/1.1.10/templates/test_values/basic-values.yaml rename to trains/stable/prometheus/1.1.11/templates/test_values/basic-values.yaml diff --git a/trains/stable/prometheus/1.1.10/templates/test_values/hostnet-values.yaml b/trains/stable/prometheus/1.1.11/templates/test_values/hostnet-values.yaml similarity index 100% rename from trains/stable/prometheus/1.1.10/templates/test_values/hostnet-values.yaml rename to trains/stable/prometheus/1.1.11/templates/test_values/hostnet-values.yaml diff --git a/trains/stable/storj/1.1.9/README.md b/trains/stable/storj/1.1.10/README.md similarity index 100% rename from trains/stable/storj/1.1.9/README.md rename to trains/stable/storj/1.1.10/README.md diff --git a/trains/stable/storj/1.1.9/app.yaml b/trains/stable/storj/1.1.10/app.yaml similarity index 89% rename from trains/stable/storj/1.1.9/app.yaml rename to trains/stable/storj/1.1.10/app.yaml index e7763516c1..c1d1587937 100644 --- a/trains/stable/storj/1.1.9/app.yaml +++ b/trains/stable/storj/1.1.10/app.yaml @@ -18,8 +18,8 @@ keywords: - networking - financial - file-sharing -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -37,4 +37,4 @@ sources: - https://www.storj.io title: Storj train: stable -version: 1.1.9 +version: 1.1.10 diff --git a/trains/stable/storj/1.1.9/ix_values.yaml b/trains/stable/storj/1.1.10/ix_values.yaml similarity index 100% rename from trains/stable/storj/1.1.9/ix_values.yaml rename to trains/stable/storj/1.1.10/ix_values.yaml diff --git a/trains/stable/storj/1.1.9/migrations/migrate_from_kubernetes b/trains/stable/storj/1.1.10/migrations/migrate_from_kubernetes similarity index 100% rename from trains/stable/storj/1.1.9/migrations/migrate_from_kubernetes rename to trains/stable/storj/1.1.10/migrations/migrate_from_kubernetes diff --git a/trains/stable/storj/1.1.9/migrations/migration_helpers/__init__.py b/trains/stable/storj/1.1.10/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/stable/storj/1.1.9/migrations/migration_helpers/__init__.py rename to trains/stable/storj/1.1.10/migrations/migration_helpers/__init__.py diff --git a/trains/stable/storj/1.1.9/migrations/migration_helpers/cpu.py b/trains/stable/storj/1.1.10/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/stable/storj/1.1.9/migrations/migration_helpers/cpu.py rename to trains/stable/storj/1.1.10/migrations/migration_helpers/cpu.py diff --git a/trains/stable/storj/1.1.9/migrations/migration_helpers/dns_config.py b/trains/stable/storj/1.1.10/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/stable/storj/1.1.9/migrations/migration_helpers/dns_config.py rename to trains/stable/storj/1.1.10/migrations/migration_helpers/dns_config.py diff --git a/trains/stable/storj/1.1.9/migrations/migration_helpers/kubernetes_secrets.py b/trains/stable/storj/1.1.10/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/stable/storj/1.1.9/migrations/migration_helpers/kubernetes_secrets.py rename to trains/stable/storj/1.1.10/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/stable/storj/1.1.9/migrations/migration_helpers/memory.py b/trains/stable/storj/1.1.10/migrations/migration_helpers/memory.py similarity index 100% rename from trains/stable/storj/1.1.9/migrations/migration_helpers/memory.py rename to trains/stable/storj/1.1.10/migrations/migration_helpers/memory.py diff --git a/trains/stable/storj/1.1.9/migrations/migration_helpers/resources.py b/trains/stable/storj/1.1.10/migrations/migration_helpers/resources.py similarity index 100% rename from trains/stable/storj/1.1.9/migrations/migration_helpers/resources.py rename to trains/stable/storj/1.1.10/migrations/migration_helpers/resources.py diff --git a/trains/stable/storj/1.1.9/migrations/migration_helpers/storage.py b/trains/stable/storj/1.1.10/migrations/migration_helpers/storage.py similarity index 100% rename from trains/stable/storj/1.1.9/migrations/migration_helpers/storage.py rename to trains/stable/storj/1.1.10/migrations/migration_helpers/storage.py diff --git a/trains/stable/storj/1.1.9/questions.yaml b/trains/stable/storj/1.1.10/questions.yaml similarity index 100% rename from trains/stable/storj/1.1.9/questions.yaml rename to trains/stable/storj/1.1.10/questions.yaml diff --git a/trains/stable/storj/1.1.9/templates/docker-compose.yaml b/trains/stable/storj/1.1.10/templates/docker-compose.yaml similarity index 100% rename from trains/stable/storj/1.1.9/templates/docker-compose.yaml rename to trains/stable/storj/1.1.10/templates/docker-compose.yaml diff --git a/trains/stable/storj/1.1.9/templates/library/base_v1_1_3/__init__.py b/trains/stable/storj/1.1.10/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/stable/storj/1.1.9/templates/library/base_v1_1_3/__init__.py rename to trains/stable/storj/1.1.10/templates/library/base_v1_1_4/__init__.py diff --git a/trains/stable/storj/1.1.9/templates/library/base_v1_1_3/environment.py b/trains/stable/storj/1.1.10/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/stable/storj/1.1.9/templates/library/base_v1_1_3/environment.py rename to trains/stable/storj/1.1.10/templates/library/base_v1_1_4/environment.py diff --git a/trains/stable/storj/1.1.10/templates/library/base_v1_1_4/healthchecks.py b/trains/stable/storj/1.1.10/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/stable/storj/1.1.10/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/stable/storj/1.1.9/templates/library/base_v1_1_3/mariadb.py b/trains/stable/storj/1.1.10/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/stable/storj/1.1.9/templates/library/base_v1_1_3/mariadb.py rename to trains/stable/storj/1.1.10/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/stable/storj/1.1.9/templates/library/base_v1_1_3/metadata.py b/trains/stable/storj/1.1.10/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/stable/storj/1.1.9/templates/library/base_v1_1_3/metadata.py rename to trains/stable/storj/1.1.10/templates/library/base_v1_1_4/metadata.py diff --git a/trains/stable/storj/1.1.9/templates/library/base_v1_1_3/network.py b/trains/stable/storj/1.1.10/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/stable/storj/1.1.9/templates/library/base_v1_1_3/network.py rename to trains/stable/storj/1.1.10/templates/library/base_v1_1_4/network.py diff --git a/trains/stable/storj/1.1.10/templates/library/base_v1_1_4/permissions.py b/trains/stable/storj/1.1.10/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/stable/storj/1.1.10/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/stable/storj/1.1.9/templates/library/base_v1_1_3/ports.py b/trains/stable/storj/1.1.10/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/stable/storj/1.1.9/templates/library/base_v1_1_3/ports.py rename to trains/stable/storj/1.1.10/templates/library/base_v1_1_4/ports.py diff --git a/trains/stable/storj/1.1.9/templates/library/base_v1_1_3/postgres.py b/trains/stable/storj/1.1.10/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/stable/storj/1.1.9/templates/library/base_v1_1_3/postgres.py rename to trains/stable/storj/1.1.10/templates/library/base_v1_1_4/postgres.py diff --git a/trains/stable/storj/1.1.9/templates/library/base_v1_1_3/redis.py b/trains/stable/storj/1.1.10/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/stable/storj/1.1.9/templates/library/base_v1_1_3/redis.py rename to trains/stable/storj/1.1.10/templates/library/base_v1_1_4/redis.py diff --git a/trains/stable/storj/1.1.9/templates/library/base_v1_1_3/resources.py b/trains/stable/storj/1.1.10/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/stable/storj/1.1.9/templates/library/base_v1_1_3/resources.py rename to trains/stable/storj/1.1.10/templates/library/base_v1_1_4/resources.py diff --git a/trains/stable/storj/1.1.9/templates/library/base_v1_1_3/security.py b/trains/stable/storj/1.1.10/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/stable/storj/1.1.9/templates/library/base_v1_1_3/security.py rename to trains/stable/storj/1.1.10/templates/library/base_v1_1_4/security.py diff --git a/trains/stable/storj/1.1.9/templates/library/base_v1_1_3/storage.py b/trains/stable/storj/1.1.10/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/stable/storj/1.1.9/templates/library/base_v1_1_3/storage.py rename to trains/stable/storj/1.1.10/templates/library/base_v1_1_4/storage.py diff --git a/trains/stable/storj/1.1.9/templates/library/base_v1_1_3/utils.py b/trains/stable/storj/1.1.10/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/stable/storj/1.1.9/templates/library/base_v1_1_3/utils.py rename to trains/stable/storj/1.1.10/templates/library/base_v1_1_4/utils.py diff --git a/trains/stable/storj/1.1.9/templates/macros/init.sh b/trains/stable/storj/1.1.10/templates/macros/init.sh similarity index 100% rename from trains/stable/storj/1.1.9/templates/macros/init.sh rename to trains/stable/storj/1.1.10/templates/macros/init.sh diff --git a/trains/stable/storj/1.1.9/templates/test_values/basic-values.yaml b/trains/stable/storj/1.1.10/templates/test_values/basic-values.yaml similarity index 100% rename from trains/stable/storj/1.1.9/templates/test_values/basic-values.yaml rename to trains/stable/storj/1.1.10/templates/test_values/basic-values.yaml diff --git a/trains/stable/storj/1.1.9/templates/library/base_v1_1_3/healthchecks.py b/trains/stable/storj/1.1.9/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/stable/storj/1.1.9/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/stable/storj/1.1.9/templates/library/base_v1_1_3/permissions.py b/trains/stable/storj/1.1.9/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/stable/storj/1.1.9/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/stable/syncthing/1.0.26/templates/library/base_v1_1_3/healthchecks.py b/trains/stable/syncthing/1.0.26/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/stable/syncthing/1.0.26/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/stable/syncthing/1.0.26/templates/library/base_v1_1_3/permissions.py b/trains/stable/syncthing/1.0.26/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/stable/syncthing/1.0.26/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/stable/syncthing/1.0.26/README.md b/trains/stable/syncthing/1.0.27/README.md similarity index 100% rename from trains/stable/syncthing/1.0.26/README.md rename to trains/stable/syncthing/1.0.27/README.md diff --git a/trains/stable/syncthing/1.0.26/app.yaml b/trains/stable/syncthing/1.0.27/app.yaml similarity index 93% rename from trains/stable/syncthing/1.0.26/app.yaml rename to trains/stable/syncthing/1.0.27/app.yaml index 7b7d1e7481..f1609e4af0 100644 --- a/trains/stable/syncthing/1.0.26/app.yaml +++ b/trains/stable/syncthing/1.0.27/app.yaml @@ -26,8 +26,8 @@ keywords: - sync - file-sharing - backup -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -50,4 +50,4 @@ sources: - https://hub.docker.com/r/syncthing/syncthing title: Syncthing train: stable -version: 1.0.26 +version: 1.0.27 diff --git a/trains/stable/syncthing/1.0.26/ix_values.yaml b/trains/stable/syncthing/1.0.27/ix_values.yaml similarity index 100% rename from trains/stable/syncthing/1.0.26/ix_values.yaml rename to trains/stable/syncthing/1.0.27/ix_values.yaml diff --git a/trains/stable/syncthing/1.0.26/migrations/migrate_from_kubernetes b/trains/stable/syncthing/1.0.27/migrations/migrate_from_kubernetes similarity index 100% rename from trains/stable/syncthing/1.0.26/migrations/migrate_from_kubernetes rename to trains/stable/syncthing/1.0.27/migrations/migrate_from_kubernetes diff --git a/trains/stable/syncthing/1.0.26/migrations/migration_helpers/__init__.py b/trains/stable/syncthing/1.0.27/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/stable/syncthing/1.0.26/migrations/migration_helpers/__init__.py rename to trains/stable/syncthing/1.0.27/migrations/migration_helpers/__init__.py diff --git a/trains/stable/syncthing/1.0.26/migrations/migration_helpers/cpu.py b/trains/stable/syncthing/1.0.27/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/stable/syncthing/1.0.26/migrations/migration_helpers/cpu.py rename to trains/stable/syncthing/1.0.27/migrations/migration_helpers/cpu.py diff --git a/trains/stable/syncthing/1.0.26/migrations/migration_helpers/dns_config.py b/trains/stable/syncthing/1.0.27/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/stable/syncthing/1.0.26/migrations/migration_helpers/dns_config.py rename to trains/stable/syncthing/1.0.27/migrations/migration_helpers/dns_config.py diff --git a/trains/stable/syncthing/1.0.26/migrations/migration_helpers/kubernetes_secrets.py b/trains/stable/syncthing/1.0.27/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/stable/syncthing/1.0.26/migrations/migration_helpers/kubernetes_secrets.py rename to trains/stable/syncthing/1.0.27/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/stable/syncthing/1.0.26/migrations/migration_helpers/memory.py b/trains/stable/syncthing/1.0.27/migrations/migration_helpers/memory.py similarity index 100% rename from trains/stable/syncthing/1.0.26/migrations/migration_helpers/memory.py rename to trains/stable/syncthing/1.0.27/migrations/migration_helpers/memory.py diff --git a/trains/stable/syncthing/1.0.26/migrations/migration_helpers/resources.py b/trains/stable/syncthing/1.0.27/migrations/migration_helpers/resources.py similarity index 100% rename from trains/stable/syncthing/1.0.26/migrations/migration_helpers/resources.py rename to trains/stable/syncthing/1.0.27/migrations/migration_helpers/resources.py diff --git a/trains/stable/syncthing/1.0.26/migrations/migration_helpers/storage.py b/trains/stable/syncthing/1.0.27/migrations/migration_helpers/storage.py similarity index 100% rename from trains/stable/syncthing/1.0.26/migrations/migration_helpers/storage.py rename to trains/stable/syncthing/1.0.27/migrations/migration_helpers/storage.py diff --git a/trains/stable/syncthing/1.0.26/questions.yaml b/trains/stable/syncthing/1.0.27/questions.yaml similarity index 100% rename from trains/stable/syncthing/1.0.26/questions.yaml rename to trains/stable/syncthing/1.0.27/questions.yaml diff --git a/trains/stable/syncthing/1.0.26/templates/docker-compose.yaml b/trains/stable/syncthing/1.0.27/templates/docker-compose.yaml similarity index 100% rename from trains/stable/syncthing/1.0.26/templates/docker-compose.yaml rename to trains/stable/syncthing/1.0.27/templates/docker-compose.yaml diff --git a/trains/stable/syncthing/1.0.26/templates/library/base_v1_1_3/__init__.py b/trains/stable/syncthing/1.0.27/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/stable/syncthing/1.0.26/templates/library/base_v1_1_3/__init__.py rename to trains/stable/syncthing/1.0.27/templates/library/base_v1_1_4/__init__.py diff --git a/trains/stable/syncthing/1.0.26/templates/library/base_v1_1_3/environment.py b/trains/stable/syncthing/1.0.27/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/stable/syncthing/1.0.26/templates/library/base_v1_1_3/environment.py rename to trains/stable/syncthing/1.0.27/templates/library/base_v1_1_4/environment.py diff --git a/trains/stable/syncthing/1.0.27/templates/library/base_v1_1_4/healthchecks.py b/trains/stable/syncthing/1.0.27/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/stable/syncthing/1.0.27/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/stable/syncthing/1.0.26/templates/library/base_v1_1_3/mariadb.py b/trains/stable/syncthing/1.0.27/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/stable/syncthing/1.0.26/templates/library/base_v1_1_3/mariadb.py rename to trains/stable/syncthing/1.0.27/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/stable/syncthing/1.0.26/templates/library/base_v1_1_3/metadata.py b/trains/stable/syncthing/1.0.27/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/stable/syncthing/1.0.26/templates/library/base_v1_1_3/metadata.py rename to trains/stable/syncthing/1.0.27/templates/library/base_v1_1_4/metadata.py diff --git a/trains/stable/syncthing/1.0.26/templates/library/base_v1_1_3/network.py b/trains/stable/syncthing/1.0.27/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/stable/syncthing/1.0.26/templates/library/base_v1_1_3/network.py rename to trains/stable/syncthing/1.0.27/templates/library/base_v1_1_4/network.py diff --git a/trains/stable/syncthing/1.0.27/templates/library/base_v1_1_4/permissions.py b/trains/stable/syncthing/1.0.27/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/stable/syncthing/1.0.27/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/stable/syncthing/1.0.26/templates/library/base_v1_1_3/ports.py b/trains/stable/syncthing/1.0.27/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/stable/syncthing/1.0.26/templates/library/base_v1_1_3/ports.py rename to trains/stable/syncthing/1.0.27/templates/library/base_v1_1_4/ports.py diff --git a/trains/stable/syncthing/1.0.26/templates/library/base_v1_1_3/postgres.py b/trains/stable/syncthing/1.0.27/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/stable/syncthing/1.0.26/templates/library/base_v1_1_3/postgres.py rename to trains/stable/syncthing/1.0.27/templates/library/base_v1_1_4/postgres.py diff --git a/trains/stable/syncthing/1.0.26/templates/library/base_v1_1_3/redis.py b/trains/stable/syncthing/1.0.27/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/stable/syncthing/1.0.26/templates/library/base_v1_1_3/redis.py rename to trains/stable/syncthing/1.0.27/templates/library/base_v1_1_4/redis.py diff --git a/trains/stable/syncthing/1.0.26/templates/library/base_v1_1_3/resources.py b/trains/stable/syncthing/1.0.27/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/stable/syncthing/1.0.26/templates/library/base_v1_1_3/resources.py rename to trains/stable/syncthing/1.0.27/templates/library/base_v1_1_4/resources.py diff --git a/trains/stable/syncthing/1.0.26/templates/library/base_v1_1_3/security.py b/trains/stable/syncthing/1.0.27/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/stable/syncthing/1.0.26/templates/library/base_v1_1_3/security.py rename to trains/stable/syncthing/1.0.27/templates/library/base_v1_1_4/security.py diff --git a/trains/stable/syncthing/1.0.26/templates/library/base_v1_1_3/storage.py b/trains/stable/syncthing/1.0.27/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/stable/syncthing/1.0.26/templates/library/base_v1_1_3/storage.py rename to trains/stable/syncthing/1.0.27/templates/library/base_v1_1_4/storage.py diff --git a/trains/stable/syncthing/1.0.26/templates/library/base_v1_1_3/utils.py b/trains/stable/syncthing/1.0.27/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/stable/syncthing/1.0.26/templates/library/base_v1_1_3/utils.py rename to trains/stable/syncthing/1.0.27/templates/library/base_v1_1_4/utils.py diff --git a/trains/stable/syncthing/1.0.26/templates/test_values/basic-values.yaml b/trains/stable/syncthing/1.0.27/templates/test_values/basic-values.yaml similarity index 100% rename from trains/stable/syncthing/1.0.26/templates/test_values/basic-values.yaml rename to trains/stable/syncthing/1.0.27/templates/test_values/basic-values.yaml diff --git a/trains/stable/syncthing/1.0.26/templates/test_values/host-values.yaml b/trains/stable/syncthing/1.0.27/templates/test_values/host-values.yaml similarity index 100% rename from trains/stable/syncthing/1.0.26/templates/test_values/host-values.yaml rename to trains/stable/syncthing/1.0.27/templates/test_values/host-values.yaml diff --git a/trains/stable/wg-easy/1.0.19/templates/library/base_v1_1_3/healthchecks.py b/trains/stable/wg-easy/1.0.19/templates/library/base_v1_1_3/healthchecks.py deleted file mode 100644 index 09f8ac53fd..0000000000 --- a/trains/stable/wg-easy/1.0.19/templates/library/base_v1_1_3/healthchecks.py +++ /dev/null @@ -1,121 +0,0 @@ -from . import utils - - -def check_health(test, interval=10, timeout=5, retries=30, start_period=10): - if not test: - utils.throw_error("Expected [test] to be set") - - return { - "test": test, - "interval": f"{interval}s", - "timeout": f"{timeout}s", - "retries": retries, - "start_period": f"{start_period}s", - } - - -def mariadb_test(db, config=None): - config = config or {} - if not db: - utils.throw_error("MariaDB container: [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 3306) - - return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" - - -def pg_test(user, db, config=None): - config = config or {} - if not user or not db: - utils.throw_error("Postgres container: [user] and [db] must be set") - - host = config.get("host", "127.0.0.1") - port = config.get("port", 5432) - - return f"pg_isready -h {host} -p {port} -d {db} -U {user}" - - -def redis_test(config=None): - config = config or {} - - host = config.get("host", "127.0.0.1") - port = config.get("port", 6379) - password = "$$REDIS_PASSWORD" - - return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" - - -def curl_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--insecure") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def wget_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - scheme = config.get("scheme", "http") - host = config.get("host", "127.0.0.1") - headers = config.get("headers", []) - - opts = [] - if scheme == "https": - opts.append("--no-check-certificate") - - for header in headers: - if not header[0] or not header[1]: - utils.throw_error("Expected [header] to be a list of two items") - opts.append(f'--header "{header[0]}: {header[1]}"') - - return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" - - -def http_test(port, path, config=None): - config = config or {} - if not port or not path: - utils.throw_error("Expected [port] and [path] to be set") - - host = config.get("host", "127.0.0.1") - - return ( - f"/bin/bash -c 'exec {{health_check_fd}}<>/dev/tcp/{host}/{port} && echo -e \"GET {path} HTTP/1.1\\r\\nHost: " - + f"{host}\\r\\nConnection: close\\r\\n\\r\\n\" >&$${{health_check_fd}} && cat <&$${{health_check_fd}}'" - ) - - -def netcat_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"nc -z -w 1 {host} {port}" - - -def tcp_test(port, config=None): - config = config or {} - if not port: - utils.throw_error("Expected [port] to be set") - - host = config.get("host", "127.0.0.1") - - return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/stable/wg-easy/1.0.19/templates/library/base_v1_1_3/permissions.py b/trains/stable/wg-easy/1.0.19/templates/library/base_v1_1_3/permissions.py deleted file mode 100644 index 7d98983af6..0000000000 --- a/trains/stable/wg-easy/1.0.19/templates/library/base_v1_1_3/permissions.py +++ /dev/null @@ -1,139 +0,0 @@ -import jsonschema - -from . import utils - -ITEM_SCHEMA = { - "type": "object", - "properties": { - "dir": {"type": "string"}, - "mode": {"type": "string", "enum": ["always", "check"]}, - "uid": {"type": "integer"}, - "gid": {"type": "integer"}, - "chmod": {"type": "string"}, - "is_temporary": {"type": "boolean"}, - }, - "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], -} - - -def perms_container(items=[], volumes=[]): - if not items: - raise ValueError("Expected [items] to be set for perms_container") - if not volumes: - raise ValueError("Expected [volumes] to be set for perms_container") - - command = [process_dir_shell_func()] - for item in items: - try: - jsonschema.validate(item, ITEM_SCHEMA) - except jsonschema.ValidationError as e: - utils.throw_error(f"Item [{item}] is not valid: {e}") - cmd = [ - "process_dir", - item["dir"], - item["mode"], - str(item["uid"]), - str(item["gid"]), - item["chmod"], - str(item["is_temporary"]).lower(), - ] - command.append(" ".join(cmd)) - - return { - "image": "bash", - "user": "root", - "deploy": { - "resources": { - "limits": {"cpus": "1.0", "memory": "512m"}, - } - }, - "entrypoint": ["bash", "-c"], - "command": ["\n".join(command)], - "volumes": volumes, - } - - -# Don't forget to use double $ for shell variables, -# otherwise docker-compose will try to expand them -def process_dir_shell_func(): - return """ -function process_dir() { - local dir=$$1 - local mode=$$2 - local uid=$$3 - local gid=$$4 - local chmod=$$5 - local is_temporary=$$6 - - local fix_owner="false" - local fix_perms="false" - - if [ -z "$$dir" ]; then - echo "Path is empty, skipping..." - exit 0 - fi - - if [ ! -d "$$dir" ]; then - echo "Path [$$dir] does is not a directory, skipping..." - exit 0 - fi - - if [ "$$is_temporary" = "true" ]; then - echo "Path [$$dir] is a temporary directory, ensuring it is empty..." - # Exclude the safe directory, where we can use to mount files temporarily - find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + - fi - - if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then - echo "Path [$$dir] is not empty, skipping..." - exit 0 - fi - - echo "Current Ownership and Permissions on [$$dir]:" - echo "chown: $$(stat -c "%u %g" "$$dir")" - echo "chmod: $$(stat -c "%a" "$$dir")" - - if [ "$$mode" = "always" ]; then - fix_owner="true" - fix_perms="true" - fi - - if [ "$$mode" = "check" ]; then - if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then - echo "Ownership is correct. Skipping..." - fix_owner="false" - else - echo "Ownership is incorrect. Fixing..." - fix_owner="true" - fi - - if [ "$$chmod" = "false" ]; then - echo "Skipping permissions check, chmod is false" - elif [ -n "$$chmod" ]; then - if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then - echo "Permissions are correct. Skipping..." - fix_perms="false" - else - echo "Permissions are incorrect. Fixing..." - fix_perms="true" - fi - fi - fi - - if [ "$$fix_owner" = "true" ]; then - echo "Changing ownership to $$uid:$$gid on: [$$dir]" - chown -R "$$uid:$$gid" "$$dir" - echo "Finished changing ownership" - echo "Ownership after changes:" - stat -c "%u %g" "$$dir" - fi - - if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then - echo "Changing permissions to $$chmod on: [$$dir]" - chmod -R "$$chmod" "$$dir" - echo "Finished changing permissions" - echo "Permissions after changes:" - stat -c "%a" "$$dir" - fi -} -""" diff --git a/trains/stable/wg-easy/1.0.19/README.md b/trains/stable/wg-easy/1.0.20/README.md similarity index 100% rename from trains/stable/wg-easy/1.0.19/README.md rename to trains/stable/wg-easy/1.0.20/README.md diff --git a/trains/stable/wg-easy/1.0.19/app.yaml b/trains/stable/wg-easy/1.0.20/app.yaml similarity index 88% rename from trains/stable/wg-easy/1.0.19/app.yaml rename to trains/stable/wg-easy/1.0.20/app.yaml index ebd9d96869..2080af7c54 100644 --- a/trains/stable/wg-easy/1.0.19/app.yaml +++ b/trains/stable/wg-easy/1.0.20/app.yaml @@ -16,8 +16,8 @@ keywords: - wireguard - network - vpn -lib_version: 1.1.3 -lib_version_hash: 2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768 +lib_version: 1.1.4 +lib_version_hash: 6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113 maintainers: - email: dev@ixsystems.com name: truenas @@ -35,4 +35,4 @@ sources: - https://github.com/wg-easy/wg-easy title: WG Easy train: stable -version: 1.0.19 +version: 1.0.20 diff --git a/trains/stable/wg-easy/1.0.19/ix_values.yaml b/trains/stable/wg-easy/1.0.20/ix_values.yaml similarity index 100% rename from trains/stable/wg-easy/1.0.19/ix_values.yaml rename to trains/stable/wg-easy/1.0.20/ix_values.yaml diff --git a/trains/stable/wg-easy/1.0.19/migrations/migrate_from_kubernetes b/trains/stable/wg-easy/1.0.20/migrations/migrate_from_kubernetes similarity index 100% rename from trains/stable/wg-easy/1.0.19/migrations/migrate_from_kubernetes rename to trains/stable/wg-easy/1.0.20/migrations/migrate_from_kubernetes diff --git a/trains/stable/wg-easy/1.0.19/migrations/migration_helpers/__init__.py b/trains/stable/wg-easy/1.0.20/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/stable/wg-easy/1.0.19/migrations/migration_helpers/__init__.py rename to trains/stable/wg-easy/1.0.20/migrations/migration_helpers/__init__.py diff --git a/trains/stable/wg-easy/1.0.19/migrations/migration_helpers/cpu.py b/trains/stable/wg-easy/1.0.20/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/stable/wg-easy/1.0.19/migrations/migration_helpers/cpu.py rename to trains/stable/wg-easy/1.0.20/migrations/migration_helpers/cpu.py diff --git a/trains/stable/wg-easy/1.0.19/migrations/migration_helpers/dns_config.py b/trains/stable/wg-easy/1.0.20/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/stable/wg-easy/1.0.19/migrations/migration_helpers/dns_config.py rename to trains/stable/wg-easy/1.0.20/migrations/migration_helpers/dns_config.py diff --git a/trains/stable/wg-easy/1.0.19/migrations/migration_helpers/kubernetes_secrets.py b/trains/stable/wg-easy/1.0.20/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/stable/wg-easy/1.0.19/migrations/migration_helpers/kubernetes_secrets.py rename to trains/stable/wg-easy/1.0.20/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/stable/wg-easy/1.0.19/migrations/migration_helpers/memory.py b/trains/stable/wg-easy/1.0.20/migrations/migration_helpers/memory.py similarity index 100% rename from trains/stable/wg-easy/1.0.19/migrations/migration_helpers/memory.py rename to trains/stable/wg-easy/1.0.20/migrations/migration_helpers/memory.py diff --git a/trains/stable/wg-easy/1.0.19/migrations/migration_helpers/resources.py b/trains/stable/wg-easy/1.0.20/migrations/migration_helpers/resources.py similarity index 100% rename from trains/stable/wg-easy/1.0.19/migrations/migration_helpers/resources.py rename to trains/stable/wg-easy/1.0.20/migrations/migration_helpers/resources.py diff --git a/trains/stable/wg-easy/1.0.19/migrations/migration_helpers/storage.py b/trains/stable/wg-easy/1.0.20/migrations/migration_helpers/storage.py similarity index 100% rename from trains/stable/wg-easy/1.0.19/migrations/migration_helpers/storage.py rename to trains/stable/wg-easy/1.0.20/migrations/migration_helpers/storage.py diff --git a/trains/stable/wg-easy/1.0.19/questions.yaml b/trains/stable/wg-easy/1.0.20/questions.yaml similarity index 100% rename from trains/stable/wg-easy/1.0.19/questions.yaml rename to trains/stable/wg-easy/1.0.20/questions.yaml diff --git a/trains/stable/wg-easy/1.0.19/templates/docker-compose.yaml b/trains/stable/wg-easy/1.0.20/templates/docker-compose.yaml similarity index 100% rename from trains/stable/wg-easy/1.0.19/templates/docker-compose.yaml rename to trains/stable/wg-easy/1.0.20/templates/docker-compose.yaml diff --git a/trains/stable/wg-easy/1.0.19/templates/library/base_v1_1_3/__init__.py b/trains/stable/wg-easy/1.0.20/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/stable/wg-easy/1.0.19/templates/library/base_v1_1_3/__init__.py rename to trains/stable/wg-easy/1.0.20/templates/library/base_v1_1_4/__init__.py diff --git a/trains/stable/wg-easy/1.0.19/templates/library/base_v1_1_3/environment.py b/trains/stable/wg-easy/1.0.20/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/stable/wg-easy/1.0.19/templates/library/base_v1_1_3/environment.py rename to trains/stable/wg-easy/1.0.20/templates/library/base_v1_1_4/environment.py diff --git a/trains/stable/wg-easy/1.0.20/templates/library/base_v1_1_4/healthchecks.py b/trains/stable/wg-easy/1.0.20/templates/library/base_v1_1_4/healthchecks.py new file mode 100644 index 0000000000..cc98270d1d --- /dev/null +++ b/trains/stable/wg-easy/1.0.20/templates/library/base_v1_1_4/healthchecks.py @@ -0,0 +1,120 @@ +from . import utils + + +def check_health(test, interval=10, timeout=5, retries=30, start_period=10): + if not test: + utils.throw_error("Expected [test] to be set") + + return { + "test": test, + "interval": f"{interval}s", + "timeout": f"{timeout}s", + "retries": retries, + "start_period": f"{start_period}s", + } + + +def mariadb_test(db, config=None): + config = config or {} + if not db: + utils.throw_error("MariaDB container: [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 3306) + + return f"mariadb-admin --user=root --host={host} --port={port} --password=$$MARIADB_ROOT_PASSWORD ping" + + +def pg_test(user, db, config=None): + config = config or {} + if not user or not db: + utils.throw_error("Postgres container: [user] and [db] must be set") + + host = config.get("host", "127.0.0.1") + port = config.get("port", 5432) + + return f"pg_isready -h {host} -p {port} -d {db} -U {user}" + + +def redis_test(config=None): + config = config or {} + + host = config.get("host", "127.0.0.1") + port = config.get("port", 6379) + password = "$$REDIS_PASSWORD" + + return f"redis-cli -h {host} -p {port} -a {password} ping | grep -q PONG" + + +def curl_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--insecure") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"curl --silent --output /dev/null --show-error --fail {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def wget_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + scheme = config.get("scheme", "http") + host = config.get("host", "127.0.0.1") + headers = config.get("headers", []) + + opts = [] + if scheme == "https": + opts.append("--no-check-certificate") + + for header in headers: + if not header[0] or not header[1]: + utils.throw_error("Expected [header] to be a list of two items") + opts.append(f'--header "{header[0]}: {header[1]}"') + + return f"wget --spider --quiet {' '.join(opts)} {scheme}://{host}:{port}{path}" + + +def http_test(port, path, config=None): + config = config or {} + if not port or not path: + utils.throw_error("Expected [port] and [path] to be set") + + host = config.get("host", "127.0.0.1") + + return f""" + /bin/bash -c 'exec {{hc_fd}}<>/dev/tcp/{host}/{port} && echo -e "GET {path} HTTP/1.1\\r\\nHost: {host}\\r\\nConnection: close\\r\\n\\r\\n" >&$${{hc_fd}} && cat <&$${{hc_fd}} | grep "HTTP/1.1 200"' + """ # noqa + + +def netcat_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"nc -z -w 1 {host} {port}" + + +def tcp_test(port, config=None): + config = config or {} + if not port: + utils.throw_error("Expected [port] to be set") + + host = config.get("host", "127.0.0.1") + + return f"timeout 1 bash -c 'cat < /dev/null > /dev/tcp/{host}/{port}'" diff --git a/trains/stable/wg-easy/1.0.19/templates/library/base_v1_1_3/mariadb.py b/trains/stable/wg-easy/1.0.20/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/stable/wg-easy/1.0.19/templates/library/base_v1_1_3/mariadb.py rename to trains/stable/wg-easy/1.0.20/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/stable/wg-easy/1.0.19/templates/library/base_v1_1_3/metadata.py b/trains/stable/wg-easy/1.0.20/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/stable/wg-easy/1.0.19/templates/library/base_v1_1_3/metadata.py rename to trains/stable/wg-easy/1.0.20/templates/library/base_v1_1_4/metadata.py diff --git a/trains/stable/wg-easy/1.0.19/templates/library/base_v1_1_3/network.py b/trains/stable/wg-easy/1.0.20/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/stable/wg-easy/1.0.19/templates/library/base_v1_1_3/network.py rename to trains/stable/wg-easy/1.0.20/templates/library/base_v1_1_4/network.py diff --git a/trains/stable/wg-easy/1.0.20/templates/library/base_v1_1_4/permissions.py b/trains/stable/wg-easy/1.0.20/templates/library/base_v1_1_4/permissions.py new file mode 100644 index 0000000000..1ce6e60ca1 --- /dev/null +++ b/trains/stable/wg-easy/1.0.20/templates/library/base_v1_1_4/permissions.py @@ -0,0 +1,139 @@ +import jsonschema + +from . import utils + +ITEM_SCHEMA = { + "type": "object", + "properties": { + "dir": {"type": "string"}, + "mode": {"type": "string", "enum": ["always", "check"]}, + "uid": {"type": "integer"}, + "gid": {"type": "integer"}, + "chmod": {"type": "string"}, + "is_temporary": {"type": "boolean"}, + }, + "required": ["dir", "mode", "uid", "gid", "chmod", "is_temporary"], +} + + +def perms_container(items=[], volumes=[]): + if not items: + raise ValueError("Expected [items] to be set for perms_container") + if not volumes: + raise ValueError("Expected [volumes] to be set for perms_container") + + command = [process_dir_shell_func()] + for item in items: + try: + jsonschema.validate(item, ITEM_SCHEMA) + except jsonschema.ValidationError as e: + utils.throw_error(f"Item [{item}] is not valid: {e}") + cmd = [ + "process_dir", + item["dir"], + item["mode"], + str(item["uid"]), + str(item["gid"]), + item["chmod"], + str(item["is_temporary"]).lower(), + ] + command.append(" ".join(cmd)) + + return { + "image": "bash", + "user": "root", + "deploy": { + "resources": { + "limits": {"cpus": "1.0", "memory": "512m"}, + } + }, + "entrypoint": ["bash", "-c"], + "command": ["\n".join(command)], + "volumes": volumes, + } + + +# Don't forget to use double $ for shell variables, +# otherwise docker-compose will try to expand them +def process_dir_shell_func(): + return """ +function process_dir() { + local dir=$$1 + local mode=$$2 + local uid=$$3 + local gid=$$4 + local chmod=$$5 + local is_temporary=$$6 + + local fix_owner="false" + local fix_perms="false" + + if [ -z "$$dir" ]; then + echo "Path is empty, skipping..." + return 0 + fi + + if [ ! -d "$$dir" ]; then + echo "Path [$$dir] does is not a directory, skipping..." + return 0 + fi + + if [ "$$is_temporary" = "true" ]; then + echo "Path [$$dir] is a temporary directory, ensuring it is empty..." + # Exclude the safe directory, where we can use to mount files temporarily + find "$$dir" -mindepth 1 -maxdepth 1 ! -name "ix-safe" -exec rm -rf {} + + fi + + if [ "$$is_temporary" = "false" ] && [ -n "$$(ls -A $$dir)" ]; then + echo "Path [$$dir] is not empty, skipping..." + return 0 + fi + + echo "Current Ownership and Permissions on [$$dir]:" + echo "chown: $$(stat -c "%u %g" "$$dir")" + echo "chmod: $$(stat -c "%a" "$$dir")" + + if [ "$$mode" = "always" ]; then + fix_owner="true" + fix_perms="true" + fi + + if [ "$$mode" = "check" ]; then + if [ $$(stat -c %u "$$dir") -eq $$uid ] && [ $$(stat -c %g "$$dir") -eq $$gid ]; then + echo "Ownership is correct. Skipping..." + fix_owner="false" + else + echo "Ownership is incorrect. Fixing..." + fix_owner="true" + fi + + if [ "$$chmod" = "false" ]; then + echo "Skipping permissions check, chmod is false" + elif [ -n "$$chmod" ]; then + if [ $$(stat -c %a "$$dir") -eq $$chmod ]; then + echo "Permissions are correct. Skipping..." + fix_perms="false" + else + echo "Permissions are incorrect. Fixing..." + fix_perms="true" + fi + fi + fi + + if [ "$$fix_owner" = "true" ]; then + echo "Changing ownership to $$uid:$$gid on: [$$dir]" + chown -R "$$uid:$$gid" "$$dir" + echo "Finished changing ownership" + echo "Ownership after changes:" + stat -c "%u %g" "$$dir" + fi + + if [ -n "$$chmod" ] && [ "$$fix_perms" = "true" ]; then + echo "Changing permissions to $$chmod on: [$$dir]" + chmod -R "$$chmod" "$$dir" + echo "Finished changing permissions" + echo "Permissions after changes:" + stat -c "%a" "$$dir" + fi +} +""" diff --git a/trains/stable/wg-easy/1.0.19/templates/library/base_v1_1_3/ports.py b/trains/stable/wg-easy/1.0.20/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/stable/wg-easy/1.0.19/templates/library/base_v1_1_3/ports.py rename to trains/stable/wg-easy/1.0.20/templates/library/base_v1_1_4/ports.py diff --git a/trains/stable/wg-easy/1.0.19/templates/library/base_v1_1_3/postgres.py b/trains/stable/wg-easy/1.0.20/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/stable/wg-easy/1.0.19/templates/library/base_v1_1_3/postgres.py rename to trains/stable/wg-easy/1.0.20/templates/library/base_v1_1_4/postgres.py diff --git a/trains/stable/wg-easy/1.0.19/templates/library/base_v1_1_3/redis.py b/trains/stable/wg-easy/1.0.20/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/stable/wg-easy/1.0.19/templates/library/base_v1_1_3/redis.py rename to trains/stable/wg-easy/1.0.20/templates/library/base_v1_1_4/redis.py diff --git a/trains/stable/wg-easy/1.0.19/templates/library/base_v1_1_3/resources.py b/trains/stable/wg-easy/1.0.20/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/stable/wg-easy/1.0.19/templates/library/base_v1_1_3/resources.py rename to trains/stable/wg-easy/1.0.20/templates/library/base_v1_1_4/resources.py diff --git a/trains/stable/wg-easy/1.0.19/templates/library/base_v1_1_3/security.py b/trains/stable/wg-easy/1.0.20/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/stable/wg-easy/1.0.19/templates/library/base_v1_1_3/security.py rename to trains/stable/wg-easy/1.0.20/templates/library/base_v1_1_4/security.py diff --git a/trains/stable/wg-easy/1.0.19/templates/library/base_v1_1_3/storage.py b/trains/stable/wg-easy/1.0.20/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/stable/wg-easy/1.0.19/templates/library/base_v1_1_3/storage.py rename to trains/stable/wg-easy/1.0.20/templates/library/base_v1_1_4/storage.py diff --git a/trains/stable/wg-easy/1.0.19/templates/library/base_v1_1_3/utils.py b/trains/stable/wg-easy/1.0.20/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/stable/wg-easy/1.0.19/templates/library/base_v1_1_3/utils.py rename to trains/stable/wg-easy/1.0.20/templates/library/base_v1_1_4/utils.py diff --git a/trains/stable/wg-easy/1.0.19/templates/test_values/basic-values.yaml b/trains/stable/wg-easy/1.0.20/templates/test_values/basic-values.yaml similarity index 100% rename from trains/stable/wg-easy/1.0.19/templates/test_values/basic-values.yaml rename to trains/stable/wg-easy/1.0.20/templates/test_values/basic-values.yaml diff --git a/trains/stable/wg-easy/1.0.19/templates/test_values/hostnet-values.yaml b/trains/stable/wg-easy/1.0.20/templates/test_values/hostnet-values.yaml similarity index 100% rename from trains/stable/wg-easy/1.0.19/templates/test_values/hostnet-values.yaml rename to trains/stable/wg-easy/1.0.20/templates/test_values/hostnet-values.yaml From 657441b55b5f3e730b9cb4e6568ee6400b165812 Mon Sep 17 00:00:00 2001 From: sonicaj Date: Wed, 16 Oct 2024 17:52:22 +0000 Subject: [PATCH 03/13] Update catalog changes [skip ci] --- catalog.json | 676 +++++++++--------- .../community/actual-budget/app_versions.json | 16 +- .../community/adguard-home/app_versions.json | 16 +- .../audiobookshelf/app_versions.json | 16 +- trains/community/autobrr/app_versions.json | 16 +- trains/community/bazarr/app_versions.json | 16 +- .../community/briefkasten/app_versions.json | 16 +- trains/community/castopod/app_versions.json | 16 +- trains/community/chia/app_versions.json | 16 +- trains/community/clamav/app_versions.json | 16 +- .../community/cloudflared/app_versions.json | 16 +- trains/community/dashy/app_versions.json | 16 +- .../community/ddns-updater/app_versions.json | 16 +- trains/community/deluge/app_versions.json | 16 +- .../community/distribution/app_versions.json | 16 +- trains/community/dockge/app_versions.json | 16 +- trains/community/drawio/app_versions.json | 16 +- .../community/filebrowser/app_versions.json | 16 +- .../community/firefly-iii/app_versions.json | 16 +- trains/community/flame/app_versions.json | 16 +- trains/community/freshrss/app_versions.json | 16 +- trains/community/frigate/app_versions.json | 16 +- trains/community/fscrawler/app_versions.json | 16 +- trains/community/gitea/app_versions.json | 16 +- trains/community/grafana/app_versions.json | 16 +- trains/community/handbrake/app_versions.json | 16 +- trains/community/homarr/app_versions.json | 16 +- trains/community/homepage/app_versions.json | 16 +- trains/community/homer/app_versions.json | 16 +- trains/community/immich/app_versions.json | 16 +- trains/community/invidious/app_versions.json | 16 +- trains/community/ipfs/app_versions.json | 16 +- trains/community/jellyfin/app_versions.json | 16 +- trains/community/jellyseerr/app_versions.json | 16 +- trains/community/jenkins/app_versions.json | 16 +- trains/community/joplin/app_versions.json | 16 +- trains/community/kapowarr/app_versions.json | 16 +- trains/community/kavita/app_versions.json | 16 +- trains/community/komga/app_versions.json | 16 +- trains/community/lidarr/app_versions.json | 16 +- trains/community/linkding/app_versions.json | 16 +- trains/community/listmonk/app_versions.json | 16 +- trains/community/logseq/app_versions.json | 16 +- trains/community/mealie/app_versions.json | 16 +- trains/community/metube/app_versions.json | 16 +- trains/community/minecraft/app_versions.json | 16 +- trains/community/mineos/app_versions.json | 16 +- trains/community/mumble/app_versions.json | 16 +- trains/community/n8n/app_versions.json | 16 +- trains/community/navidrome/app_versions.json | 16 +- trains/community/netbootxyz/app_versions.json | 16 +- .../nginx-proxy-manager/app_versions.json | 16 +- trains/community/node-red/app_versions.json | 16 +- trains/community/odoo/app_versions.json | 16 +- .../omada-controller/app_versions.json | 16 +- trains/community/organizr/app_versions.json | 16 +- trains/community/overseerr/app_versions.json | 16 +- trains/community/palworld/app_versions.json | 16 +- .../community/paperless-ngx/app_versions.json | 16 +- trains/community/passbolt/app_versions.json | 16 +- trains/community/pgadmin/app_versions.json | 16 +- trains/community/pigallery2/app_versions.json | 16 +- trains/community/piwigo/app_versions.json | 16 +- trains/community/planka/app_versions.json | 16 +- .../plex-auto-languages/app_versions.json | 16 +- trains/community/portainer/app_versions.json | 16 +- trains/community/prowlarr/app_versions.json | 16 +- .../community/qbittorrent/app_versions.json | 16 +- trains/community/radarr/app_versions.json | 16 +- trains/community/readarr/app_versions.json | 16 +- trains/community/recyclarr/app_versions.json | 16 +- trains/community/redis/app_versions.json | 16 +- trains/community/roundcube/app_versions.json | 16 +- trains/community/rsyncd/app_versions.json | 16 +- trains/community/rust-desk/app_versions.json | 16 +- trains/community/sabnzbd/app_versions.json | 16 +- trains/community/searxng/app_versions.json | 16 +- trains/community/sftpgo/app_versions.json | 16 +- trains/community/sonarr/app_versions.json | 16 +- trains/community/tailscale/app_versions.json | 16 +- trains/community/tautulli/app_versions.json | 16 +- trains/community/tdarr/app_versions.json | 16 +- trains/community/terraria/app_versions.json | 16 +- trains/community/tftpd-hpa/app_versions.json | 16 +- .../tiny-media-manager/app_versions.json | 16 +- .../community/transmission/app_versions.json | 16 +- .../twofactor-auth/app_versions.json | 16 +- .../unifi-controller/app_versions.json | 16 +- .../unifi-protect-backup/app_versions.json | 16 +- .../community/vaultwarden/app_versions.json | 16 +- trains/community/vikunja/app_versions.json | 16 +- trains/community/webdav/app_versions.json | 16 +- trains/community/whoogle/app_versions.json | 16 +- trains/community/wordpress/app_versions.json | 16 +- trains/community/zerotier/app_versions.json | 16 +- trains/enterprise/minio/app_versions.json | 16 +- trains/enterprise/syncthing/app_versions.json | 16 +- trains/stable/collabora/app_versions.json | 16 +- trains/stable/diskoverdata/app_versions.json | 16 +- .../stable/elastic-search/app_versions.json | 16 +- trains/stable/emby/app_versions.json | 16 +- .../stable/home-assistant/app_versions.json | 16 +- trains/stable/ix-app/app_versions.json | 16 +- trains/stable/minio/app_versions.json | 16 +- trains/stable/netdata/app_versions.json | 16 +- trains/stable/nextcloud/app_versions.json | 16 +- trains/stable/photoprism/app_versions.json | 16 +- trains/stable/pihole/app_versions.json | 16 +- trains/stable/plex/app_versions.json | 16 +- trains/stable/prometheus/app_versions.json | 16 +- trains/stable/storj/app_versions.json | 16 +- trains/stable/syncthing/app_versions.json | 16 +- trains/stable/wg-easy/app_versions.json | 16 +- trains/test/nginx/app_versions.json | 8 +- trains/test/other-nginx/app_versions.json | 4 +- 115 files changed, 1240 insertions(+), 1240 deletions(-) diff --git a/catalog.json b/catalog.json index 10a2582649..277db1f23d 100644 --- a/catalog.json +++ b/catalog.json @@ -10,10 +10,10 @@ "healthy_error": null, "home": "https://www.collaboraoffice.com/", "location": "/__w/apps/apps/trains/stable/collabora", - "latest_version": "1.1.14", + "latest_version": "1.1.15", "latest_app_version": "24.04.8.2.1", - "latest_human_version": "24.04.8.2.1_1.1.14", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "24.04.8.2.1_1.1.15", + "last_update": "2024-10-16 17:52:00", "name": "collabora", "recommended": false, "title": "Collabora", @@ -99,10 +99,10 @@ "healthy_error": null, "home": "https://plex.tv", "location": "/__w/apps/apps/trains/stable/plex", - "latest_version": "1.0.22", + "latest_version": "1.0.23", "latest_app_version": "1.40.2.8395-c67dce28e", - "latest_human_version": "1.40.2.8395-c67dce28e_1.0.22", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "1.40.2.8395-c67dce28e_1.0.23", + "last_update": "2024-10-16 17:52:00", "name": "plex", "recommended": false, "title": "Plex", @@ -177,10 +177,10 @@ "healthy_error": null, "home": "https://www.home-assistant.io/", "location": "/__w/apps/apps/trains/stable/home-assistant", - "latest_version": "1.2.20", + "latest_version": "1.2.21", "latest_app_version": "2024.10.2", - "latest_human_version": "2024.10.2_1.2.20", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "2024.10.2_1.2.21", + "last_update": "2024-10-16 17:52:00", "name": "home-assistant", "recommended": false, "title": "Home Assistant", @@ -252,10 +252,10 @@ "healthy_error": null, "home": "https://photoprism.app/", "location": "/__w/apps/apps/trains/stable/photoprism", - "latest_version": "1.1.13", + "latest_version": "1.1.14", "latest_app_version": "240915", - "latest_human_version": "240915_1.1.13", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "240915_1.1.14", + "last_update": "2024-10-16 17:52:00", "name": "photoprism", "recommended": false, "title": "Photoprism", @@ -325,10 +325,10 @@ "healthy_error": null, "home": "https://min.io", "location": "/__w/apps/apps/trains/stable/minio", - "latest_version": "1.1.12", + "latest_version": "1.1.13", "latest_app_version": "RELEASE.2024-10-13T13-34-11Z", - "latest_human_version": "RELEASE.2024-10-13T13-34-11Z_1.1.12", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "RELEASE.2024-10-13T13-34-11Z_1.1.13", + "last_update": "2024-10-16 17:52:00", "name": "minio", "recommended": false, "title": "MinIO", @@ -374,10 +374,10 @@ "healthy_error": null, "home": "https://emby.media/", "location": "/__w/apps/apps/trains/stable/emby", - "latest_version": "1.1.12", + "latest_version": "1.1.13", "latest_app_version": "4.8.10.0", - "latest_human_version": "4.8.10.0_1.1.12", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "4.8.10.0_1.1.13", + "last_update": "2024-10-16 17:52:00", "name": "emby", "recommended": false, "title": "Emby Server", @@ -453,10 +453,10 @@ "healthy_error": null, "home": "https://www.netdata.cloud/", "location": "/__w/apps/apps/trains/stable/netdata", - "latest_version": "1.1.13", + "latest_version": "1.1.14", "latest_app_version": "v1.47.4", - "latest_human_version": "v1.47.4_1.1.13", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "v1.47.4_1.1.14", + "last_update": "2024-10-16 17:52:00", "name": "netdata", "recommended": false, "title": "Netdata", @@ -530,10 +530,10 @@ "healthy_error": null, "home": "https://github.com/wg-easy/wg-easy", "location": "/__w/apps/apps/trains/stable/wg-easy", - "latest_version": "1.0.19", + "latest_version": "1.0.20", "latest_app_version": "14", - "latest_human_version": "14_1.0.19", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "14_1.0.20", + "last_update": "2024-10-16 17:52:00", "name": "wg-easy", "recommended": false, "title": "WG Easy", @@ -590,10 +590,10 @@ "healthy_error": null, "home": "https://prometheus.io", "location": "/__w/apps/apps/trains/stable/prometheus", - "latest_version": "1.1.10", + "latest_version": "1.1.11", "latest_app_version": "v2.54.1", - "latest_human_version": "v2.54.1_1.1.10", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "v2.54.1_1.1.11", + "last_update": "2024-10-16 17:52:00", "name": "prometheus", "recommended": false, "title": "Prometheus", @@ -638,10 +638,10 @@ "healthy_error": null, "home": "https://syncthing.net/", "location": "/__w/apps/apps/trains/stable/syncthing", - "latest_version": "1.0.26", + "latest_version": "1.0.27", "latest_app_version": "1.27.12", - "latest_human_version": "1.27.12_1.0.26", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "1.27.12_1.0.27", + "last_update": "2024-10-16 17:52:00", "name": "syncthing", "recommended": false, "title": "Syncthing", @@ -723,10 +723,10 @@ "healthy_error": null, "home": "https://www.truenas.com/", "location": "/__w/apps/apps/trains/stable/ix-app", - "latest_version": "1.0.10", + "latest_version": "1.0.11", "latest_app_version": "1.0.0", - "latest_human_version": "1.0.0_1.0.10", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "1.0.0_1.0.11", + "last_update": "2024-10-16 17:52:00", "name": "ix-app", "recommended": false, "title": "iX App", @@ -754,10 +754,10 @@ "healthy_error": null, "home": "https://nextcloud.com/", "location": "/__w/apps/apps/trains/stable/nextcloud", - "latest_version": "1.3.19", + "latest_version": "1.3.20", "latest_app_version": "30.0.0", - "latest_human_version": "30.0.0_1.3.19", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "30.0.0_1.3.20", + "last_update": "2024-10-16 17:52:00", "name": "nextcloud", "recommended": false, "title": "Nextcloud", @@ -858,10 +858,10 @@ "healthy_error": null, "home": "https://www.storj.io", "location": "/__w/apps/apps/trains/stable/storj", - "latest_version": "1.1.9", + "latest_version": "1.1.10", "latest_app_version": "6f87ea801-v1.71.2-go1.18.8", - "latest_human_version": "6f87ea801-v1.71.2-go1.18.8_1.1.9", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "6f87ea801-v1.71.2-go1.18.8_1.1.10", + "last_update": "2024-10-16 17:52:00", "name": "storj", "recommended": false, "title": "Storj", @@ -919,10 +919,10 @@ "healthy_error": null, "home": "https://github.com/diskoverdata/diskover-community", "location": "/__w/apps/apps/trains/stable/diskoverdata", - "latest_version": "1.3.7", + "latest_version": "1.3.8", "latest_app_version": "2.3.0", - "latest_human_version": "2.3.0_1.3.7", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "2.3.0_1.3.8", + "last_update": "2024-10-16 17:52:00", "name": "diskoverdata", "recommended": false, "title": "Diskover Data", @@ -1002,10 +1002,10 @@ "healthy_error": null, "home": "https://pi-hole.net", "location": "/__w/apps/apps/trains/stable/pihole", - "latest_version": "1.1.10", + "latest_version": "1.1.11", "latest_app_version": "2024.07.0", - "latest_human_version": "2024.07.0_1.1.10", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "2024.07.0_1.1.11", + "last_update": "2024-10-16 17:52:00", "name": "pihole", "recommended": false, "title": "Pi-hole", @@ -1098,10 +1098,10 @@ "healthy_error": null, "home": "https://www.elastic.co", "location": "/__w/apps/apps/trains/stable/elastic-search", - "latest_version": "1.1.11", + "latest_version": "1.1.12", "latest_app_version": "8.15.2", - "latest_human_version": "8.15.2_1.1.11", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "8.15.2_1.1.12", + "last_update": "2024-10-16 17:52:00", "name": "elastic-search", "recommended": false, "title": "Elastic Search", @@ -1149,7 +1149,7 @@ "latest_version": "1.0.1", "latest_app_version": "v1", "latest_human_version": "v1_1.0.1", - "last_update": "2024-10-15 12:57:40", + "last_update": "2024-10-16 17:50:40", "name": "other-nginx", "recommended": false, "title": "Other Nginx", @@ -1197,7 +1197,7 @@ "latest_version": "1.0.6", "latest_app_version": "v1", "latest_human_version": "v1_1.0.6", - "last_update": "2024-10-15 12:57:40", + "last_update": "2024-10-16 17:50:40", "name": "nginx", "recommended": false, "title": "Nginx", @@ -1244,10 +1244,10 @@ "healthy_error": null, "home": "https://min.io", "location": "/__w/apps/apps/trains/enterprise/minio", - "latest_version": "1.1.6", + "latest_version": "1.1.7", "latest_app_version": "RELEASE.2024-08-26T15-33-07Z", - "latest_human_version": "RELEASE.2024-08-26T15-33-07Z_1.1.6", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "RELEASE.2024-08-26T15-33-07Z_1.1.7", + "last_update": "2024-10-16 17:52:00", "name": "minio", "recommended": false, "title": "MinIO", @@ -1293,10 +1293,10 @@ "healthy_error": null, "home": "https://syncthing.net", "location": "/__w/apps/apps/trains/enterprise/syncthing", - "latest_version": "1.0.14", + "latest_version": "1.0.15", "latest_app_version": "1.27.10", - "latest_human_version": "1.27.10_1.0.14", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "1.27.10_1.0.15", + "last_update": "2024-10-16 17:52:00", "name": "syncthing", "recommended": false, "title": "Syncthing", @@ -1379,10 +1379,10 @@ "healthy_error": null, "home": "https://github.com/benbusby/whoogle-search", "location": "/__w/apps/apps/trains/community/whoogle", - "latest_version": "1.0.19", + "latest_version": "1.0.20", "latest_app_version": "0.9.0", - "latest_human_version": "0.9.0_1.0.19", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "0.9.0_1.0.20", + "last_update": "2024-10-16 17:52:00", "name": "whoogle", "recommended": false, "title": "Whoogle", @@ -1427,10 +1427,10 @@ "healthy_error": null, "home": "https://github.com/truenas/containers/tree/main/apps/rsyncd", "location": "/__w/apps/apps/trains/community/rsyncd", - "latest_version": "1.0.13", + "latest_version": "1.0.14", "latest_app_version": "1.0.0", - "latest_human_version": "1.0.0_1.0.13", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "1.0.0_1.0.14", + "last_update": "2024-10-16 17:52:00", "name": "rsyncd", "recommended": false, "title": "Rsync Daemon", @@ -1498,10 +1498,10 @@ "healthy_error": null, "home": "https://listmonk.app/", "location": "/__w/apps/apps/trains/community/listmonk", - "latest_version": "1.0.8", + "latest_version": "1.0.9", "latest_app_version": "v3.0.0", - "latest_human_version": "v3.0.0_1.0.8", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "v3.0.0_1.0.9", + "last_update": "2024-10-16 17:52:00", "name": "listmonk", "recommended": false, "title": "Listmonk", @@ -1554,10 +1554,10 @@ "healthy_error": null, "home": "https://www.minecraft.net/en-us", "location": "/__w/apps/apps/trains/community/minecraft", - "latest_version": "1.11.17", + "latest_version": "1.11.18", "latest_app_version": "2024.10.1", - "latest_human_version": "2024.10.1_1.11.17", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "2024.10.1_1.11.18", + "last_update": "2024-10-16 17:52:00", "name": "minecraft", "recommended": false, "title": "Minecraft", @@ -1620,10 +1620,10 @@ "healthy_error": null, "home": "https://home.tdarr.io/", "location": "/__w/apps/apps/trains/community/tdarr", - "latest_version": "1.0.8", + "latest_version": "1.0.9", "latest_app_version": "2.26.01", - "latest_human_version": "2.26.01_1.0.8", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "2.26.01_1.0.9", + "last_update": "2024-10-16 17:52:00", "name": "tdarr", "recommended": false, "title": "Tdarr", @@ -1686,10 +1686,10 @@ "healthy_error": null, "home": "https://tautulli.com", "location": "/__w/apps/apps/trains/community/tautulli", - "latest_version": "1.0.20", + "latest_version": "1.0.21", "latest_app_version": "v2.14.6", - "latest_human_version": "v2.14.6_1.0.20", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "v2.14.6_1.0.21", + "last_update": "2024-10-16 17:52:00", "name": "tautulli", "recommended": false, "title": "Tautulli", @@ -1737,10 +1737,10 @@ "healthy_error": null, "home": "https://github.com/autobrr/autobrr", "location": "/__w/apps/apps/trains/community/autobrr", - "latest_version": "1.1.13", + "latest_version": "1.1.14", "latest_app_version": "v1.47.1", - "latest_human_version": "v1.47.1_1.1.13", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "v1.47.1_1.1.14", + "last_update": "2024-10-16 17:52:00", "name": "autobrr", "recommended": false, "title": "Autobrr", @@ -1786,10 +1786,10 @@ "healthy_error": null, "home": "https://github.com/sct/overseerr", "location": "/__w/apps/apps/trains/community/overseerr", - "latest_version": "1.0.17", + "latest_version": "1.0.18", "latest_app_version": "1.33.2", - "latest_human_version": "1.33.2_1.0.17", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "1.33.2_1.0.18", + "last_update": "2024-10-16 17:52:00", "name": "overseerr", "recommended": false, "title": "Overseerr", @@ -1830,10 +1830,10 @@ "healthy_error": null, "home": "https://dockge.kuma.pet", "location": "/__w/apps/apps/trains/community/dockge", - "latest_version": "1.0.16", + "latest_version": "1.0.17", "latest_app_version": "1.4.2", - "latest_human_version": "1.4.2_1.0.16", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "1.4.2_1.0.17", + "last_update": "2024-10-16 17:52:00", "name": "dockge", "recommended": false, "title": "Dockge", @@ -1910,10 +1910,10 @@ "healthy_error": null, "home": "https://github.com/cloudflare/cloudflared", "location": "/__w/apps/apps/trains/community/cloudflared", - "latest_version": "1.1.12", + "latest_version": "1.1.13", "latest_app_version": "2024.10.0", - "latest_human_version": "2024.10.0_1.1.12", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "2024.10.0_1.1.13", + "last_update": "2024-10-16 17:52:00", "name": "cloudflared", "recommended": false, "title": "Cloudflared", @@ -1956,10 +1956,10 @@ "healthy_error": null, "home": "https://netboot.xyz", "location": "/__w/apps/apps/trains/community/netbootxyz", - "latest_version": "1.0.18", + "latest_version": "1.0.19", "latest_app_version": "0.7.3-nbxyz1", - "latest_human_version": "0.7.3-nbxyz1_1.0.18", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "0.7.3-nbxyz1_1.0.19", + "last_update": "2024-10-16 17:52:00", "name": "netbootxyz", "recommended": false, "title": "Netboot.xyz", @@ -2040,10 +2040,10 @@ "healthy_error": null, "home": "https://github.com/goofball222/unifi", "location": "/__w/apps/apps/trains/community/unifi-controller", - "latest_version": "1.2.10", + "latest_version": "1.2.11", "latest_app_version": "8.5.6", - "latest_human_version": "8.5.6_1.2.10", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "8.5.6_1.2.11", + "last_update": "2024-10-16 17:52:00", "name": "unifi-controller", "recommended": false, "title": "Unifi Controller", @@ -2087,10 +2087,10 @@ "healthy_error": null, "home": "https://frigate.video/", "location": "/__w/apps/apps/trains/community/frigate", - "latest_version": "1.0.8", + "latest_version": "1.0.9", "latest_app_version": "0.14.1", - "latest_human_version": "0.14.1_1.0.8", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "0.14.1_1.0.9", + "last_update": "2024-10-16 17:52:00", "name": "frigate", "recommended": false, "title": "Frigate", @@ -2156,10 +2156,10 @@ "healthy_error": null, "home": "https://gethomepage.dev/", "location": "/__w/apps/apps/trains/community/homepage", - "latest_version": "1.0.21", + "latest_version": "1.0.22", "latest_app_version": "v0.9.10", - "latest_human_version": "v0.9.10_1.0.21", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "v0.9.10_1.0.22", + "last_update": "2024-10-16 17:52:00", "name": "homepage", "recommended": false, "title": "Homepage", @@ -2207,10 +2207,10 @@ "healthy_error": null, "home": "https://github.com/pawelmalak/flame", "location": "/__w/apps/apps/trains/community/flame", - "latest_version": "1.0.18", + "latest_version": "1.0.19", "latest_app_version": "2.3.1", - "latest_human_version": "2.3.1_1.0.18", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "2.3.1_1.0.19", + "last_update": "2024-10-16 17:52:00", "name": "flame", "recommended": false, "title": "Flame", @@ -2266,10 +2266,10 @@ "healthy_error": null, "home": "https://docs.paperless-ngx.com", "location": "/__w/apps/apps/trains/community/paperless-ngx", - "latest_version": "1.0.11", + "latest_version": "1.0.12", "latest_app_version": "2.12.1", - "latest_human_version": "2.12.1_1.0.11", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "2.12.1_1.0.12", + "last_update": "2024-10-16 17:52:00", "name": "paperless-ngx", "recommended": false, "title": "Paperless-ngx", @@ -2355,10 +2355,10 @@ "healthy_error": null, "home": "https://github.com/truenas/containers/tree/main/apps/tftpd-hpa", "location": "/__w/apps/apps/trains/community/tftpd-hpa", - "latest_version": "1.0.9", + "latest_version": "1.0.10", "latest_app_version": "1.0.0", - "latest_human_version": "1.0.0_1.0.9", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "1.0.0_1.0.10", + "last_update": "2024-10-16 17:52:00", "name": "tftpd-hpa", "recommended": false, "title": "TFTP Server", @@ -2417,10 +2417,10 @@ "healthy_error": null, "home": "https://transmissionbt.com/", "location": "/__w/apps/apps/trains/community/transmission", - "latest_version": "1.0.5", + "latest_version": "1.0.6", "latest_app_version": "4.0.6", - "latest_human_version": "4.0.6_1.0.5", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "4.0.6_1.0.6", + "last_update": "2024-10-16 17:52:00", "name": "transmission", "recommended": false, "title": "Transmission", @@ -2463,10 +2463,10 @@ "healthy_error": null, "home": "https://logseq.com", "location": "/__w/apps/apps/trains/community/logseq", - "latest_version": "1.0.17", + "latest_version": "1.0.18", "latest_app_version": "latest", - "latest_human_version": "latest_1.0.17", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "latest_1.0.18", + "last_update": "2024-10-16 17:52:00", "name": "logseq", "recommended": false, "title": "Logseq", @@ -2507,10 +2507,10 @@ "healthy_error": null, "home": "https://www.drawio.com", "location": "/__w/apps/apps/trains/community/drawio", - "latest_version": "1.1.10", + "latest_version": "1.1.11", "latest_app_version": "24.7.17", - "latest_human_version": "24.7.17_1.1.10", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "24.7.17_1.1.11", + "last_update": "2024-10-16 17:52:00", "name": "drawio", "recommended": false, "title": "Draw.io", @@ -2557,10 +2557,10 @@ "healthy_error": null, "home": "https://joplinapp.org/", "location": "/__w/apps/apps/trains/community/joplin", - "latest_version": "1.1.10", + "latest_version": "1.1.11", "latest_app_version": "3.0.1-beta", - "latest_human_version": "3.0.1-beta_1.1.10", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "3.0.1-beta_1.1.11", + "last_update": "2024-10-16 17:52:00", "name": "joplin", "recommended": false, "title": "Joplin", @@ -2612,10 +2612,10 @@ "healthy_error": null, "home": "https://www.kavitareader.com/", "location": "/__w/apps/apps/trains/community/kavita", - "latest_version": "1.0.18", + "latest_version": "1.0.19", "latest_app_version": "0.8.3", - "latest_human_version": "0.8.3_1.0.18", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "0.8.3_1.0.19", + "last_update": "2024-10-16 17:52:00", "name": "kavita", "recommended": false, "title": "Kavita", @@ -2684,10 +2684,10 @@ "healthy_error": null, "home": "https://sabnzbd.org/", "location": "/__w/apps/apps/trains/community/sabnzbd", - "latest_version": "1.0.6", + "latest_version": "1.0.7", "latest_app_version": "4.3.3", - "latest_human_version": "4.3.3_1.0.6", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "4.3.3_1.0.7", + "last_update": "2024-10-16 17:52:00", "name": "sabnzbd", "recommended": false, "title": "SABnzbd", @@ -2734,10 +2734,10 @@ "healthy_error": null, "home": "https://actualbudget.org", "location": "/__w/apps/apps/trains/community/actual-budget", - "latest_version": "1.1.12", + "latest_version": "1.1.13", "latest_app_version": "24.10.1", - "latest_human_version": "24.10.1_1.1.12", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "24.10.1_1.1.13", + "last_update": "2024-10-16 17:52:00", "name": "actual-budget", "recommended": false, "title": "Actual Budget", @@ -2784,10 +2784,10 @@ "healthy_error": null, "home": "https://www.tinymediamanager.org/", "location": "/__w/apps/apps/trains/community/tiny-media-manager", - "latest_version": "1.0.5", + "latest_version": "1.0.6", "latest_app_version": "5.0.12", - "latest_human_version": "5.0.12_1.0.5", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "5.0.12_1.0.6", + "last_update": "2024-10-16 17:52:00", "name": "tiny-media-manager", "recommended": false, "title": "Tiny Media Manager", @@ -2848,10 +2848,10 @@ "healthy_error": null, "home": "https://vikunja.io/", "location": "/__w/apps/apps/trains/community/vikunja", - "latest_version": "1.2.13", + "latest_version": "1.2.14", "latest_app_version": "0.24.4", - "latest_human_version": "0.24.4_1.2.13", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "0.24.4_1.2.14", + "last_update": "2024-10-16 17:52:00", "name": "vikunja", "recommended": false, "title": "Vikunja", @@ -2916,10 +2916,10 @@ "healthy_error": null, "home": "https://www.passbolt.com", "location": "/__w/apps/apps/trains/community/passbolt", - "latest_version": "1.0.6", + "latest_version": "1.0.7", "latest_app_version": "4.9.1-1-ce-non-root", - "latest_human_version": "4.9.1-1-ce-non-root_1.0.6", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "4.9.1-1-ce-non-root_1.0.7", + "last_update": "2024-10-16 17:52:00", "name": "passbolt", "recommended": false, "title": "Passbolt", @@ -2973,10 +2973,10 @@ "healthy_error": null, "home": "https://github.com/Fallenbagel/jellyseerr", "location": "/__w/apps/apps/trains/community/jellyseerr", - "latest_version": "1.0.18", + "latest_version": "1.0.19", "latest_app_version": "1.9.2", - "latest_human_version": "1.9.2_1.0.18", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "1.9.2_1.0.19", + "last_update": "2024-10-16 17:52:00", "name": "jellyseerr", "recommended": false, "title": "Jellyseerr", @@ -3019,10 +3019,10 @@ "healthy_error": null, "home": "https://github.com/dani-garcia/vaultwarden", "location": "/__w/apps/apps/trains/community/vaultwarden", - "latest_version": "1.0.6", + "latest_version": "1.0.7", "latest_app_version": "1.32.2", - "latest_human_version": "1.32.2_1.0.6", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "1.32.2_1.0.7", + "last_update": "2024-10-16 17:52:00", "name": "vaultwarden", "recommended": false, "title": "Vaultwarden", @@ -3072,10 +3072,10 @@ "healthy_error": null, "home": "https://castopod.org", "location": "/__w/apps/apps/trains/community/castopod", - "latest_version": "1.0.8", + "latest_version": "1.0.9", "latest_app_version": "1.12.10", - "latest_human_version": "1.12.10_1.0.8", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "1.12.10_1.0.9", + "last_update": "2024-10-16 17:52:00", "name": "castopod", "recommended": false, "title": "Castopod", @@ -3153,10 +3153,10 @@ "healthy_error": null, "home": "https://n8n.io/", "location": "/__w/apps/apps/trains/community/n8n", - "latest_version": "1.3.22", + "latest_version": "1.3.23", "latest_app_version": "1.63.2", - "latest_human_version": "1.63.2_1.3.22", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "1.63.2_1.3.23", + "last_update": "2024-10-16 17:52:00", "name": "n8n", "recommended": false, "title": "n8n", @@ -3217,10 +3217,10 @@ "healthy_error": null, "home": "https://github.com/distribution/distribution", "location": "/__w/apps/apps/trains/community/distribution", - "latest_version": "1.0.18", + "latest_version": "1.0.19", "latest_app_version": "2.8.3", - "latest_human_version": "2.8.3_1.0.18", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "2.8.3_1.0.19", + "last_update": "2024-10-16 17:52:00", "name": "distribution", "recommended": false, "title": "Distribution", @@ -3263,10 +3263,10 @@ "healthy_error": null, "home": "https://fscrawler.readthedocs.io", "location": "/__w/apps/apps/trains/community/fscrawler", - "latest_version": "1.0.16", + "latest_version": "1.0.17", "latest_app_version": "2.10-SNAPSHOT-ocr-es7", - "latest_human_version": "2.10-SNAPSHOT-ocr-es7_1.0.16", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "2.10-SNAPSHOT-ocr-es7_1.0.17", + "last_update": "2024-10-16 17:52:00", "name": "fscrawler", "recommended": false, "title": "FSCrawler", @@ -3309,10 +3309,10 @@ "healthy_error": null, "home": "https://ipfs.tech/", "location": "/__w/apps/apps/trains/community/ipfs", - "latest_version": "1.0.18", + "latest_version": "1.0.19", "latest_app_version": "v0.30.0", - "latest_human_version": "v0.30.0_1.0.18", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "v0.30.0_1.0.19", + "last_update": "2024-10-16 17:52:00", "name": "ipfs", "recommended": false, "title": "IPFS", @@ -3359,10 +3359,10 @@ "healthy_error": null, "home": "https://www.navidrome.org", "location": "/__w/apps/apps/trains/community/navidrome", - "latest_version": "1.0.23", + "latest_version": "1.0.24", "latest_app_version": "0.53.3", - "latest_human_version": "0.53.3_1.0.23", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "0.53.3_1.0.24", + "last_update": "2024-10-16 17:52:00", "name": "navidrome", "recommended": false, "title": "Navidrome", @@ -3407,10 +3407,10 @@ "healthy_error": null, "home": "https://bpatrik.github.io/pigallery2", "location": "/__w/apps/apps/trains/community/pigallery2", - "latest_version": "1.0.5", + "latest_version": "1.0.6", "latest_app_version": "2.0.0", - "latest_human_version": "2.0.0_1.0.5", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "2.0.0_1.0.6", + "last_update": "2024-10-16 17:52:00", "name": "pigallery2", "recommended": false, "title": "PiGallery2", @@ -3463,10 +3463,10 @@ "healthy_error": null, "home": "https://github.com/hexparrot/mineos-node", "location": "/__w/apps/apps/trains/community/mineos", - "latest_version": "1.0.17", + "latest_version": "1.0.18", "latest_app_version": "latest", - "latest_human_version": "latest_1.0.17", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "latest_1.0.18", + "last_update": "2024-10-16 17:52:00", "name": "mineos", "recommended": false, "title": "MineOS", @@ -3530,10 +3530,10 @@ "healthy_error": null, "home": "https://grafana.com", "location": "/__w/apps/apps/trains/community/grafana", - "latest_version": "1.1.11", + "latest_version": "1.1.12", "latest_app_version": "11.2.2", - "latest_human_version": "11.2.2_1.1.11", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "11.2.2_1.1.12", + "last_update": "2024-10-16 17:52:00", "name": "grafana", "recommended": false, "title": "Grafana", @@ -3581,10 +3581,10 @@ "healthy_error": null, "home": "https://tailscale.com/", "location": "/__w/apps/apps/trains/community/tailscale", - "latest_version": "1.1.14", + "latest_version": "1.1.15", "latest_app_version": "v1.74.1", - "latest_human_version": "v1.74.1_1.1.14", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "v1.74.1_1.1.15", + "last_update": "2024-10-16 17:52:00", "name": "tailscale", "recommended": false, "title": "Tailscale", @@ -3651,10 +3651,10 @@ "healthy_error": null, "home": "https://github.com/searxng/searxng", "location": "/__w/apps/apps/trains/community/searxng", - "latest_version": "1.0.15", + "latest_version": "1.0.16", "latest_app_version": "2024.10.4-3e747d049", - "latest_human_version": "2024.10.4-3e747d049_1.0.15", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "2024.10.4-3e747d049_1.0.16", + "last_update": "2024-10-16 17:52:00", "name": "searxng", "recommended": false, "title": "SearXNG", @@ -3704,10 +3704,10 @@ "healthy_error": null, "home": "https://www.bazarr.media", "location": "/__w/apps/apps/trains/community/bazarr", - "latest_version": "1.0.21", + "latest_version": "1.0.22", "latest_app_version": "1.4.5", - "latest_human_version": "1.4.5_1.0.21", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "1.4.5_1.0.22", + "last_update": "2024-10-16 17:52:00", "name": "bazarr", "recommended": false, "title": "Bazarr", @@ -3752,10 +3752,10 @@ "healthy_error": null, "home": "https://www.odoo.com/", "location": "/__w/apps/apps/trains/community/odoo", - "latest_version": "1.0.3", + "latest_version": "1.0.4", "latest_app_version": "17.0", - "latest_human_version": "17.0_1.0.3", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "17.0_1.0.4", + "last_update": "2024-10-16 17:52:00", "name": "odoo", "recommended": false, "title": "Odoo", @@ -3800,10 +3800,10 @@ "healthy_error": null, "home": "https://piwigo.org", "location": "/__w/apps/apps/trains/community/piwigo", - "latest_version": "1.0.5", + "latest_version": "1.0.6", "latest_app_version": "14.5.0", - "latest_human_version": "14.5.0_1.0.5", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "14.5.0_1.0.6", + "last_update": "2024-10-16 17:52:00", "name": "piwigo", "recommended": false, "title": "Piwigo", @@ -3879,10 +3879,10 @@ "healthy_error": null, "home": "https://prowlarr.com", "location": "/__w/apps/apps/trains/community/prowlarr", - "latest_version": "1.2.12", + "latest_version": "1.2.13", "latest_app_version": "1.25.2.4794", - "latest_human_version": "1.25.2.4794_1.2.12", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "1.25.2.4794_1.2.13", + "last_update": "2024-10-16 17:52:00", "name": "prowlarr", "recommended": false, "title": "Prowlarr", @@ -3925,10 +3925,10 @@ "healthy_error": null, "home": "https://casvt.github.io/Kapowarr/", "location": "/__w/apps/apps/trains/community/kapowarr", - "latest_version": "1.0.18", + "latest_version": "1.0.19", "latest_app_version": "v1.0.0", - "latest_human_version": "v1.0.0_1.0.18", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "v1.0.0_1.0.19", + "last_update": "2024-10-16 17:52:00", "name": "kapowarr", "recommended": false, "title": "Kapowarr", @@ -3973,10 +3973,10 @@ "healthy_error": null, "home": "https://www.zerotier.com", "location": "/__w/apps/apps/trains/community/zerotier", - "latest_version": "1.0.18", + "latest_version": "1.0.19", "latest_app_version": "1.14.1", - "latest_human_version": "1.14.1_1.0.18", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "1.14.1_1.0.19", + "last_update": "2024-10-16 17:52:00", "name": "zerotier", "recommended": false, "title": "Zerotier", @@ -4063,10 +4063,10 @@ "healthy_error": null, "home": "https://www.audiobookshelf.org/", "location": "/__w/apps/apps/trains/community/audiobookshelf", - "latest_version": "1.2.13", + "latest_version": "1.2.14", "latest_app_version": "2.15.0", - "latest_human_version": "2.15.0_1.2.13", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "2.15.0_1.2.14", + "last_update": "2024-10-16 17:52:00", "name": "audiobookshelf", "recommended": false, "title": "Audiobookshelf", @@ -4114,10 +4114,10 @@ "healthy_error": null, "home": "https://github.com/causefx/Organizr", "location": "/__w/apps/apps/trains/community/organizr", - "latest_version": "1.0.17", + "latest_version": "1.0.18", "latest_app_version": "latest", - "latest_human_version": "latest_1.0.17", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "latest_1.0.18", + "last_update": "2024-10-16 17:52:00", "name": "organizr", "recommended": false, "title": "Organizr", @@ -4183,10 +4183,10 @@ "healthy_error": null, "home": "https://docs.2fauth.app/", "location": "/__w/apps/apps/trains/community/twofactor-auth", - "latest_version": "1.0.6", + "latest_version": "1.0.7", "latest_app_version": "5.3.1", - "latest_human_version": "5.3.1_1.0.6", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "5.3.1_1.0.7", + "last_update": "2024-10-16 17:52:00", "name": "twofactor-auth", "recommended": false, "title": "2FAuth", @@ -4231,10 +4231,10 @@ "healthy_error": null, "home": "https://github.com/ep1cman/unifi-protect-backup", "location": "/__w/apps/apps/trains/community/unifi-protect-backup", - "latest_version": "1.0.16", + "latest_version": "1.0.17", "latest_app_version": "0.11.0", - "latest_human_version": "0.11.0_1.0.16", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "0.11.0_1.0.17", + "last_update": "2024-10-16 17:52:00", "name": "unifi-protect-backup", "recommended": false, "title": "Unifi Protect Backup", @@ -4293,10 +4293,10 @@ "healthy_error": null, "home": "https://github.com/Sonarr/Sonarr", "location": "/__w/apps/apps/trains/community/sonarr", - "latest_version": "1.0.18", + "latest_version": "1.0.19", "latest_app_version": "4.0.9.2244", - "latest_human_version": "4.0.9.2244_1.0.18", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "4.0.9.2244_1.0.19", + "last_update": "2024-10-16 17:52:00", "name": "sonarr", "recommended": false, "title": "Sonarr", @@ -4342,10 +4342,10 @@ "healthy_error": null, "home": "https://github.com/AdguardTeam/AdGuardHome", "location": "/__w/apps/apps/trains/community/adguard-home", - "latest_version": "1.0.21", + "latest_version": "1.0.22", "latest_app_version": "v0.107.53", - "latest_human_version": "v0.107.53_1.0.21", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "v0.107.53_1.0.22", + "last_update": "2024-10-16 17:52:00", "name": "adguard-home", "recommended": false, "title": "AdGuard Home", @@ -4408,10 +4408,10 @@ "healthy_error": null, "home": "https://github.com/Lidarr/Lidarr", "location": "/__w/apps/apps/trains/community/lidarr", - "latest_version": "1.1.11", + "latest_version": "1.1.12", "latest_app_version": "2.6.4.4402", - "latest_human_version": "2.6.4.4402_1.1.11", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "2.6.4.4402_1.1.12", + "last_update": "2024-10-16 17:52:00", "name": "lidarr", "recommended": false, "title": "Lidarr", @@ -4457,10 +4457,10 @@ "healthy_error": null, "home": "https://www.portainer.io", "location": "/__w/apps/apps/trains/community/portainer", - "latest_version": "1.2.13", + "latest_version": "1.2.14", "latest_app_version": "2.23.0", - "latest_human_version": "2.23.0_1.2.13", - "last_update": "2024-10-15 12:58:57", + "latest_human_version": "2.23.0_1.2.14", + "last_update": "2024-10-16 17:52:00", "name": "portainer", "recommended": false, "title": "Portainer", @@ -4539,10 +4539,10 @@ "healthy_error": null, "home": "https://www.mumble.info/", "location": "/__w/apps/apps/trains/community/mumble", - "latest_version": "1.1.9", + "latest_version": "1.1.10", "latest_app_version": "v1.5.634", - "latest_human_version": "v1.5.634_1.1.9", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "v1.5.634_1.1.10", + "last_update": "2024-10-16 17:52:00", "name": "mumble", "recommended": false, "title": "Mumble", @@ -4583,10 +4583,10 @@ "healthy_error": null, "home": "https://github.com/Radarr/Radarr", "location": "/__w/apps/apps/trains/community/radarr", - "latest_version": "1.1.11", + "latest_version": "1.1.12", "latest_app_version": "5.12.2.9335", - "latest_human_version": "5.12.2.9335_1.1.11", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "5.12.2.9335_1.1.12", + "last_update": "2024-10-16 17:52:00", "name": "radarr", "recommended": false, "title": "Radarr", @@ -4633,10 +4633,10 @@ "healthy_error": null, "home": "https://terraria.org/", "location": "/__w/apps/apps/trains/community/terraria", - "latest_version": "1.0.5", + "latest_version": "1.0.6", "latest_app_version": "tshock-1.4.4.9-5.2.0-3", - "latest_human_version": "tshock-1.4.4.9-5.2.0-3_1.0.5", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "tshock-1.4.4.9-5.2.0-3_1.0.6", + "last_update": "2024-10-16 17:52:00", "name": "terraria", "recommended": false, "title": "Terraria", @@ -4681,10 +4681,10 @@ "healthy_error": null, "home": "https://www.chia.net/", "location": "/__w/apps/apps/trains/community/chia", - "latest_version": "1.0.14", + "latest_version": "1.0.15", "latest_app_version": "2.4.3", - "latest_human_version": "2.4.3_1.0.14", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "2.4.3_1.0.15", + "last_update": "2024-10-16 17:52:00", "name": "chia", "recommended": false, "title": "Chia", @@ -4727,10 +4727,10 @@ "healthy_error": null, "home": "https://dashy.to/", "location": "/__w/apps/apps/trains/community/dashy", - "latest_version": "1.0.17", + "latest_version": "1.0.18", "latest_app_version": "3.1.0", - "latest_human_version": "3.1.0_1.0.17", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "3.1.0_1.0.18", + "last_update": "2024-10-16 17:52:00", "name": "dashy", "recommended": false, "title": "Dashy", @@ -4774,10 +4774,10 @@ "healthy_error": null, "home": "https://wordpress.org", "location": "/__w/apps/apps/trains/community/wordpress", - "latest_version": "1.0.6", + "latest_version": "1.0.7", "latest_app_version": "6.6.2", - "latest_human_version": "6.6.2_1.0.6", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "6.6.2_1.0.7", + "last_update": "2024-10-16 17:52:00", "name": "wordpress", "recommended": false, "title": "Wordpress", @@ -4835,10 +4835,10 @@ "healthy_error": null, "home": "https://gitea.io/en-us", "location": "/__w/apps/apps/trains/community/gitea", - "latest_version": "1.0.11", + "latest_version": "1.0.12", "latest_app_version": "1.22.3", - "latest_human_version": "1.22.3_1.0.11", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "1.22.3_1.0.12", + "last_update": "2024-10-16 17:52:00", "name": "gitea", "recommended": false, "title": "Gitea", @@ -4886,10 +4886,10 @@ "healthy_error": null, "home": "https://github.com/mbentley/docker-omada-controller", "location": "/__w/apps/apps/trains/community/omada-controller", - "latest_version": "1.1.9", + "latest_version": "1.1.10", "latest_app_version": "5.14", - "latest_human_version": "5.14_1.1.9", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "5.14_1.1.10", + "last_update": "2024-10-16 17:52:00", "name": "omada-controller", "recommended": false, "title": "Bazarr", @@ -4954,10 +4954,10 @@ "healthy_error": null, "home": "https://komga.org", "location": "/__w/apps/apps/trains/community/komga", - "latest_version": "1.1.13", + "latest_version": "1.1.14", "latest_app_version": "1.14.1", - "latest_human_version": "1.14.1_1.1.13", - "last_update": "2024-10-15 12:58:57", + "latest_human_version": "1.14.1_1.1.14", + "last_update": "2024-10-16 17:52:00", "name": "komga", "recommended": false, "title": "Komga", @@ -5003,10 +5003,10 @@ "healthy_error": null, "home": "https://github.com/drakkan/sftpgo", "location": "/__w/apps/apps/trains/community/sftpgo", - "latest_version": "1.0.6", + "latest_version": "1.0.7", "latest_app_version": "2.6.2", - "latest_human_version": "2.6.2_1.0.6", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "2.6.2_1.0.7", + "last_update": "2024-10-16 17:52:00", "name": "sftpgo", "recommended": false, "title": "SFTPGo", @@ -5047,10 +5047,10 @@ "healthy_error": null, "home": "https://www.pgadmin.org/", "location": "/__w/apps/apps/trains/community/pgadmin", - "latest_version": "1.0.4", + "latest_version": "1.0.5", "latest_app_version": "8.12", - "latest_human_version": "8.12_1.0.4", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "8.12_1.0.5", + "last_update": "2024-10-16 17:52:00", "name": "pgadmin", "recommended": false, "title": "pgAdmin", @@ -5101,10 +5101,10 @@ "healthy_error": null, "home": "http://www.webdav.org/", "location": "/__w/apps/apps/trains/community/webdav", - "latest_version": "1.0.12", + "latest_version": "1.0.13", "latest_app_version": "2.4.62", - "latest_human_version": "2.4.62_1.0.12", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "2.4.62_1.0.13", + "last_update": "2024-10-16 17:52:00", "name": "webdav", "recommended": false, "title": "WebDAV", @@ -5145,10 +5145,10 @@ "healthy_error": null, "home": "https://www.jenkins.io/", "location": "/__w/apps/apps/trains/community/jenkins", - "latest_version": "1.0.12", + "latest_version": "1.0.13", "latest_app_version": "2.462.1-jdk17", - "latest_human_version": "2.462.1-jdk17_1.0.12", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "2.462.1-jdk17_1.0.13", + "last_update": "2024-10-16 17:52:00", "name": "jenkins", "recommended": false, "title": "Jenkins", @@ -5194,10 +5194,10 @@ "healthy_error": null, "home": "https://github.com/RemiRigal/Plex-Auto-Languages", "location": "/__w/apps/apps/trains/community/plex-auto-languages", - "latest_version": "1.0.15", + "latest_version": "1.0.16", "latest_app_version": "v1.2.3", - "latest_human_version": "v1.2.3_1.0.15", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "v1.2.3_1.0.16", + "last_update": "2024-10-16 17:52:00", "name": "plex-auto-languages", "recommended": false, "title": "Plex Auto Languages", @@ -5239,10 +5239,10 @@ "healthy_error": null, "home": "https://github.com/alexta69/metube", "location": "/__w/apps/apps/trains/community/metube", - "latest_version": "1.1.16", + "latest_version": "1.1.17", "latest_app_version": "2024-10-08", - "latest_human_version": "2024-10-08_1.1.16", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "2024-10-08_1.1.17", + "last_update": "2024-10-16 17:52:00", "name": "metube", "recommended": false, "title": "MeTube", @@ -5286,10 +5286,10 @@ "healthy_error": null, "home": "https://rustdesk.com", "location": "/__w/apps/apps/trains/community/rust-desk", - "latest_version": "1.0.6", + "latest_version": "1.0.7", "latest_app_version": "1.1.11-1", - "latest_human_version": "1.1.11-1_1.0.6", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "1.1.11-1_1.0.7", + "last_update": "2024-10-16 17:52:00", "name": "rust-desk", "recommended": false, "title": "Rust Desk", @@ -5331,10 +5331,10 @@ "healthy_error": null, "home": "https://www.pocketpair.jp/palworld", "location": "/__w/apps/apps/trains/community/palworld", - "latest_version": "1.0.19", + "latest_version": "1.0.20", "latest_app_version": "palworld", - "latest_human_version": "palworld_1.0.19", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "palworld_1.0.20", + "last_update": "2024-10-16 17:52:00", "name": "palworld", "recommended": false, "title": "Palworld", @@ -5409,10 +5409,10 @@ "healthy_error": null, "home": "https://github.com/ndom91/briefkasten", "location": "/__w/apps/apps/trains/community/briefkasten", - "latest_version": "1.0.18", + "latest_version": "1.0.19", "latest_app_version": "latest", - "latest_human_version": "latest_1.0.18", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "latest_1.0.19", + "last_update": "2024-10-16 17:52:00", "name": "briefkasten", "recommended": false, "title": "Briefkasten", @@ -5464,10 +5464,10 @@ "healthy_error": null, "home": "https://immich.app", "location": "/__w/apps/apps/trains/community/immich", - "latest_version": "1.6.18", + "latest_version": "1.6.19", "latest_app_version": "v1.118.0", - "latest_human_version": "v1.118.0_1.6.18", - "last_update": "2024-10-15 12:58:57", + "latest_human_version": "v1.118.0_1.6.19", + "last_update": "2024-10-16 17:52:00", "name": "immich", "recommended": false, "title": "Immich", @@ -5536,10 +5536,10 @@ "healthy_error": null, "home": "https://github.com/qdm12/ddns-updater", "location": "/__w/apps/apps/trains/community/ddns-updater", - "latest_version": "1.0.23", + "latest_version": "1.0.24", "latest_app_version": "v2.8.1", - "latest_human_version": "v2.8.1_1.0.23", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "v2.8.1_1.0.24", + "last_update": "2024-10-16 17:52:00", "name": "ddns-updater", "recommended": false, "title": "DDNS Updater", @@ -5584,10 +5584,10 @@ "healthy_error": null, "home": "https://invidious.io/", "location": "/__w/apps/apps/trains/community/invidious", - "latest_version": "1.0.10", + "latest_version": "1.0.11", "latest_app_version": "2.20240825.2", - "latest_human_version": "2.20240825.2_1.0.10", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "2.20240825.2_1.0.11", + "last_update": "2024-10-16 17:52:00", "name": "invidious", "recommended": false, "title": "Invidious", @@ -5642,10 +5642,10 @@ "healthy_error": null, "home": "https://github.com/Readarr/Readarr", "location": "/__w/apps/apps/trains/community/readarr", - "latest_version": "1.0.18", + "latest_version": "1.0.19", "latest_app_version": "0.3.32.2587", - "latest_human_version": "0.3.32.2587_1.0.18", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "0.3.32.2587_1.0.19", + "last_update": "2024-10-16 17:52:00", "name": "readarr", "recommended": false, "title": "Readarr", @@ -5692,10 +5692,10 @@ "healthy_error": null, "home": "https://recyclarr.dev", "location": "/__w/apps/apps/trains/community/recyclarr", - "latest_version": "1.0.7", + "latest_version": "1.0.8", "latest_app_version": "7.2.4", - "latest_human_version": "7.2.4_1.0.7", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "7.2.4_1.0.8", + "last_update": "2024-10-16 17:52:00", "name": "recyclarr", "recommended": false, "title": "Recyclarr", @@ -5738,10 +5738,10 @@ "healthy_error": null, "home": "https://github.com/jlesage/docker-handbrake", "location": "/__w/apps/apps/trains/community/handbrake", - "latest_version": "2.0.10", + "latest_version": "2.0.11", "latest_app_version": "v24.09.1", - "latest_human_version": "v24.09.1_2.0.10", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "v24.09.1_2.0.11", + "last_update": "2024-10-16 17:52:00", "name": "handbrake", "recommended": false, "title": "Handbrake", @@ -5813,10 +5813,10 @@ "healthy_error": null, "home": "https://github.com/bastienwirtz/homer", "location": "/__w/apps/apps/trains/community/homer", - "latest_version": "2.0.9", + "latest_version": "2.0.10", "latest_app_version": "v24.05.1", - "latest_human_version": "v24.05.1_2.0.9", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "v24.05.1_2.0.10", + "last_update": "2024-10-16 17:52:00", "name": "homer", "recommended": false, "title": "Homer", @@ -5857,10 +5857,10 @@ "healthy_error": null, "home": "https://www.clamav.net/", "location": "/__w/apps/apps/trains/community/clamav", - "latest_version": "1.1.9", + "latest_version": "1.1.10", "latest_app_version": "1.1.2-2", - "latest_human_version": "1.1.2-2_1.1.9", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "1.1.2-2_1.1.10", + "last_update": "2024-10-16 17:52:00", "name": "clamav", "recommended": false, "title": "ClamAV", @@ -5923,10 +5923,10 @@ "healthy_error": null, "home": "https://nodered.org", "location": "/__w/apps/apps/trains/community/node-red", - "latest_version": "1.0.32", + "latest_version": "1.0.33", "latest_app_version": "4.0.5", - "latest_human_version": "4.0.5_1.0.32", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "4.0.5_1.0.33", + "last_update": "2024-10-16 17:52:00", "name": "node-red", "recommended": false, "title": "Node-RED", @@ -5969,10 +5969,10 @@ "healthy_error": null, "home": "https://filebrowser.org", "location": "/__w/apps/apps/trains/community/filebrowser", - "latest_version": "1.1.10", + "latest_version": "1.1.11", "latest_app_version": "v2.31.2", - "latest_human_version": "v2.31.2_1.1.10", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "v2.31.2_1.1.11", + "last_update": "2024-10-16 17:52:00", "name": "filebrowser", "recommended": false, "title": "File Browser", @@ -6019,10 +6019,10 @@ "healthy_error": null, "home": "https://github.com/sissbruecker/linkding", "location": "/__w/apps/apps/trains/community/linkding", - "latest_version": "1.0.16", + "latest_version": "1.0.17", "latest_app_version": "1.36.0", - "latest_human_version": "1.36.0_1.0.16", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "1.36.0_1.0.17", + "last_update": "2024-10-16 17:52:00", "name": "linkding", "recommended": false, "title": "Linkding", @@ -6072,10 +6072,10 @@ "healthy_error": null, "home": "https://github.com/plankanban/planka", "location": "/__w/apps/apps/trains/community/planka", - "latest_version": "1.0.10", + "latest_version": "1.0.11", "latest_app_version": "1.23.2", - "latest_human_version": "1.23.2_1.0.10", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "1.23.2_1.0.11", + "last_update": "2024-10-16 17:52:00", "name": "planka", "recommended": false, "title": "Planka", @@ -6127,10 +6127,10 @@ "healthy_error": null, "home": "https://www.qbittorrent.org/", "location": "/__w/apps/apps/trains/community/qbittorrent", - "latest_version": "1.0.27", + "latest_version": "1.0.28", "latest_app_version": "5.0.0", - "latest_human_version": "5.0.0_1.0.27", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "5.0.0_1.0.28", + "last_update": "2024-10-16 17:52:00", "name": "qbittorrent", "recommended": false, "title": "qBittorrent", @@ -6175,10 +6175,10 @@ "healthy_error": null, "home": "https://www.firefly-iii.org/", "location": "/__w/apps/apps/trains/community/firefly-iii", - "latest_version": "1.2.17", + "latest_version": "1.2.18", "latest_app_version": "version-6.1.21", - "latest_human_version": "version-6.1.21_1.2.17", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "version-6.1.21_1.2.18", + "last_update": "2024-10-16 17:52:00", "name": "firefly-iii", "recommended": false, "title": "Firefly III", @@ -6262,10 +6262,10 @@ "healthy_error": null, "home": "https://redis.io/", "location": "/__w/apps/apps/trains/community/redis", - "latest_version": "1.0.6", + "latest_version": "1.0.7", "latest_app_version": "7.4.1", - "latest_human_version": "7.4.1_1.0.6", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "7.4.1_1.0.7", + "last_update": "2024-10-16 17:52:00", "name": "redis", "recommended": false, "title": "Redis", @@ -6307,10 +6307,10 @@ "healthy_error": null, "home": "https://jellyfin.org/", "location": "/__w/apps/apps/trains/community/jellyfin", - "latest_version": "1.0.24", + "latest_version": "1.0.25", "latest_app_version": "10.9.11", - "latest_human_version": "10.9.11_1.0.24", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "10.9.11_1.0.25", + "last_update": "2024-10-16 17:52:00", "name": "jellyfin", "recommended": false, "title": "Jellyfin", @@ -6359,10 +6359,10 @@ "healthy_error": null, "home": "https://deluge-torrent.org", "location": "/__w/apps/apps/trains/community/deluge", - "latest_version": "1.0.17", + "latest_version": "1.0.18", "latest_app_version": "2.1.1", - "latest_human_version": "2.1.1_1.0.17", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "2.1.1_1.0.18", + "last_update": "2024-10-16 17:52:00", "name": "deluge", "recommended": false, "title": "Deluge", @@ -6425,10 +6425,10 @@ "healthy_error": null, "home": "https://docs.mealie.io/", "location": "/__w/apps/apps/trains/community/mealie", - "latest_version": "1.2.9", + "latest_version": "1.2.10", "latest_app_version": "v1.12.0", - "latest_human_version": "v1.12.0_1.2.9", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "v1.12.0_1.2.10", + "last_update": "2024-10-16 17:52:00", "name": "mealie", "recommended": false, "title": "Mealie", @@ -6478,10 +6478,10 @@ "healthy_error": null, "home": "https://freshrss.org/", "location": "/__w/apps/apps/trains/community/freshrss", - "latest_version": "1.1.13", + "latest_version": "1.1.14", "latest_app_version": "1.24.3", - "latest_human_version": "1.24.3_1.1.13", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "1.24.3_1.1.14", + "last_update": "2024-10-16 17:52:00", "name": "freshrss", "recommended": false, "title": "FreshRSS", @@ -6546,10 +6546,10 @@ "healthy_error": null, "home": "https://homarr.dev/", "location": "/__w/apps/apps/trains/community/homarr", - "latest_version": "1.0.18", + "latest_version": "1.0.19", "latest_app_version": "0.15.4", - "latest_human_version": "0.15.4_1.0.18", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "0.15.4_1.0.19", + "last_update": "2024-10-16 17:52:00", "name": "homarr", "recommended": false, "title": "Homarr", @@ -6594,10 +6594,10 @@ "healthy_error": null, "home": "https://roundcube.net/", "location": "/__w/apps/apps/trains/community/roundcube", - "latest_version": "1.0.6", + "latest_version": "1.0.7", "latest_app_version": "1.6.9-apache", - "latest_human_version": "1.6.9-apache_1.0.6", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "1.6.9-apache_1.0.7", + "last_update": "2024-10-16 17:52:00", "name": "roundcube", "recommended": false, "title": "Roundcube", @@ -6673,10 +6673,10 @@ "healthy_error": null, "home": "https://nginxproxymanager.com/", "location": "/__w/apps/apps/trains/community/nginx-proxy-manager", - "latest_version": "1.0.19", + "latest_version": "1.0.20", "latest_app_version": "2.11.3", - "latest_human_version": "2.11.3_1.0.19", - "last_update": "2024-10-15 12:57:40", + "latest_human_version": "2.11.3_1.0.20", + "last_update": "2024-10-16 17:52:00", "name": "nginx-proxy-manager", "recommended": false, "title": "Nginx Proxy Manager", diff --git a/trains/community/actual-budget/app_versions.json b/trains/community/actual-budget/app_versions.json index cf82af5a4a..4fdd818ae9 100644 --- a/trains/community/actual-budget/app_versions.json +++ b/trains/community/actual-budget/app_versions.json @@ -1,13 +1,13 @@ { - "1.1.12": { + "1.1.13": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/actual-budget/1.1.12", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/community/actual-budget/1.1.13", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "24.10.1_1.1.12", - "version": "1.1.12", + "human_version": "24.10.1_1.1.13", + "version": "1.1.13", "app_metadata": { "app_version": "24.10.1", "capabilities": [], @@ -22,8 +22,8 @@ "finance", "budget" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -53,7 +53,7 @@ ], "title": "Actual Budget", "train": "community", - "version": "1.1.12" + "version": "1.1.13" }, "schema": { "groups": [ diff --git a/trains/community/adguard-home/app_versions.json b/trains/community/adguard-home/app_versions.json index f667a450ec..67a18aac6c 100644 --- a/trains/community/adguard-home/app_versions.json +++ b/trains/community/adguard-home/app_versions.json @@ -1,13 +1,13 @@ { - "1.0.21": { + "1.0.22": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/adguard-home/1.0.21", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/community/adguard-home/1.0.22", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "v0.107.53_1.0.21", - "version": "1.0.21", + "human_version": "v0.107.53_1.0.22", + "version": "1.0.22", "app_metadata": { "app_version": "v0.107.53", "capabilities": [ @@ -39,8 +39,8 @@ "dns", "adblock" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -69,7 +69,7 @@ ], "title": "AdGuard Home", "train": "community", - "version": "1.0.21" + "version": "1.0.22" }, "schema": { "groups": [ diff --git a/trains/community/audiobookshelf/app_versions.json b/trains/community/audiobookshelf/app_versions.json index b59a169fbe..62b8ac4fe3 100644 --- a/trains/community/audiobookshelf/app_versions.json +++ b/trains/community/audiobookshelf/app_versions.json @@ -1,13 +1,13 @@ { - "1.2.13": { + "1.2.14": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/audiobookshelf/1.2.13", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/community/audiobookshelf/1.2.14", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "2.15.0_1.2.13", - "version": "1.2.13", + "human_version": "2.15.0_1.2.14", + "version": "1.2.14", "app_metadata": { "app_version": "2.15.0", "capabilities": [], @@ -22,8 +22,8 @@ "media", "audiobook" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -54,7 +54,7 @@ ], "title": "Audiobookshelf", "train": "community", - "version": "1.2.13" + "version": "1.2.14" }, "schema": { "groups": [ diff --git a/trains/community/autobrr/app_versions.json b/trains/community/autobrr/app_versions.json index 6e558be69a..aed3e2c5be 100644 --- a/trains/community/autobrr/app_versions.json +++ b/trains/community/autobrr/app_versions.json @@ -1,13 +1,13 @@ { - "1.1.13": { + "1.1.14": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/autobrr/1.1.13", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/community/autobrr/1.1.14", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "v1.47.1_1.1.13", - "version": "1.1.13", + "human_version": "v1.47.1_1.1.14", + "version": "1.1.14", "app_metadata": { "app_version": "v1.47.1", "capabilities": [], @@ -23,8 +23,8 @@ "torrent", "usenet" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -52,7 +52,7 @@ ], "title": "Autobrr", "train": "community", - "version": "1.1.13" + "version": "1.1.14" }, "schema": { "groups": [ diff --git a/trains/community/bazarr/app_versions.json b/trains/community/bazarr/app_versions.json index 2489e9d855..690d1e9643 100644 --- a/trains/community/bazarr/app_versions.json +++ b/trains/community/bazarr/app_versions.json @@ -1,13 +1,13 @@ { - "1.0.21": { + "1.0.22": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/bazarr/1.0.21", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/community/bazarr/1.0.22", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "1.4.5_1.0.21", - "version": "1.0.21", + "human_version": "1.4.5_1.0.22", + "version": "1.0.22", "app_metadata": { "app_version": "1.4.5", "capabilities": [], @@ -22,8 +22,8 @@ "media", "subtitles" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -51,7 +51,7 @@ ], "title": "Bazarr", "train": "community", - "version": "1.0.21" + "version": "1.0.22" }, "schema": { "groups": [ diff --git a/trains/community/briefkasten/app_versions.json b/trains/community/briefkasten/app_versions.json index e88035d158..4546e3e44c 100644 --- a/trains/community/briefkasten/app_versions.json +++ b/trains/community/briefkasten/app_versions.json @@ -1,13 +1,13 @@ { - "1.0.18": { + "1.0.19": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/briefkasten/1.0.18", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/community/briefkasten/1.0.19", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "latest_1.0.18", - "version": "1.0.18", + "human_version": "latest_1.0.19", + "version": "1.0.19", "app_metadata": { "app_version": "latest", "capabilities": [], @@ -21,8 +21,8 @@ "keywords": [ "bookmark" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -58,7 +58,7 @@ ], "title": "Briefkasten", "train": "community", - "version": "1.0.18" + "version": "1.0.19" }, "schema": { "groups": [ diff --git a/trains/community/castopod/app_versions.json b/trains/community/castopod/app_versions.json index ede8e2e6cc..bdcc72b44e 100644 --- a/trains/community/castopod/app_versions.json +++ b/trains/community/castopod/app_versions.json @@ -1,13 +1,13 @@ { - "1.0.8": { + "1.0.9": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/castopod/1.0.8", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/community/castopod/1.0.9", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "1.12.10_1.0.8", - "version": "1.0.8", + "human_version": "1.12.10_1.0.9", + "version": "1.0.9", "app_metadata": { "app_version": "1.12.10", "capabilities": [ @@ -42,8 +42,8 @@ "keywords": [ "podcast" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -84,7 +84,7 @@ ], "title": "Castopod", "train": "community", - "version": "1.0.8" + "version": "1.0.9" }, "schema": { "groups": [ diff --git a/trains/community/chia/app_versions.json b/trains/community/chia/app_versions.json index 3186f7b728..fa1cc52637 100644 --- a/trains/community/chia/app_versions.json +++ b/trains/community/chia/app_versions.json @@ -1,13 +1,13 @@ { - "1.0.14": { + "1.0.15": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/chia/1.0.14", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/community/chia/1.0.15", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "2.4.3_1.0.14", - "version": "1.0.14", + "human_version": "2.4.3_1.0.15", + "version": "1.0.15", "app_metadata": { "app_version": "2.4.3", "capabilities": [], @@ -23,8 +23,8 @@ "hard-drive", "chia" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -49,7 +49,7 @@ ], "title": "Chia", "train": "community", - "version": "1.0.14" + "version": "1.0.15" }, "schema": { "groups": [ diff --git a/trains/community/clamav/app_versions.json b/trains/community/clamav/app_versions.json index e57fc6b87d..d5291ca674 100644 --- a/trains/community/clamav/app_versions.json +++ b/trains/community/clamav/app_versions.json @@ -1,13 +1,13 @@ { - "1.1.9": { + "1.1.10": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/clamav/1.1.9", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/community/clamav/1.1.10", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "1.1.2-2_1.1.9", - "version": "1.1.9", + "human_version": "1.1.2-2_1.1.10", + "version": "1.1.10", "app_metadata": { "app_version": "1.1.2-2", "capabilities": [ @@ -43,8 +43,8 @@ "anti-virus", "clamav" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -69,7 +69,7 @@ ], "title": "ClamAV", "train": "community", - "version": "1.1.9" + "version": "1.1.10" }, "schema": { "groups": [ diff --git a/trains/community/cloudflared/app_versions.json b/trains/community/cloudflared/app_versions.json index f04d4cde9d..34399d5c59 100644 --- a/trains/community/cloudflared/app_versions.json +++ b/trains/community/cloudflared/app_versions.json @@ -1,13 +1,13 @@ { - "1.1.12": { + "1.1.13": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/cloudflared/1.1.12", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/community/cloudflared/1.1.13", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "2024.10.0_1.1.12", - "version": "1.1.12", + "human_version": "2024.10.0_1.1.13", + "version": "1.1.13", "app_metadata": { "app_version": "2024.10.0", "capabilities": [], @@ -23,8 +23,8 @@ "cloudflare", "tunnel" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -49,7 +49,7 @@ ], "title": "Cloudflared", "train": "community", - "version": "1.1.12" + "version": "1.1.13" }, "schema": { "groups": [ diff --git a/trains/community/dashy/app_versions.json b/trains/community/dashy/app_versions.json index 2dfc461fe4..13961c97c3 100644 --- a/trains/community/dashy/app_versions.json +++ b/trains/community/dashy/app_versions.json @@ -1,13 +1,13 @@ { - "1.0.17": { + "1.0.18": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/dashy/1.0.17", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/community/dashy/1.0.18", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "3.1.0_1.0.17", - "version": "1.0.17", + "human_version": "3.1.0_1.0.18", + "version": "1.0.18", "app_metadata": { "app_version": "3.1.0", "capabilities": [], @@ -21,8 +21,8 @@ "keywords": [ "dashboard" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -50,7 +50,7 @@ ], "title": "Dashy", "train": "community", - "version": "1.0.17" + "version": "1.0.18" }, "schema": { "groups": [ diff --git a/trains/community/ddns-updater/app_versions.json b/trains/community/ddns-updater/app_versions.json index fe2822b075..4bd4172e10 100644 --- a/trains/community/ddns-updater/app_versions.json +++ b/trains/community/ddns-updater/app_versions.json @@ -1,13 +1,13 @@ { - "1.0.23": { + "1.0.24": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/ddns-updater/1.0.23", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/community/ddns-updater/1.0.24", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "v2.8.1_1.0.23", - "version": "1.0.23", + "human_version": "v2.8.1_1.0.24", + "version": "1.0.24", "app_metadata": { "app_version": "v2.8.1", "capabilities": [], @@ -22,8 +22,8 @@ "ddns-updater", "ddns" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -51,7 +51,7 @@ ], "title": "DDNS Updater", "train": "community", - "version": "1.0.23" + "version": "1.0.24" }, "schema": { "groups": [ diff --git a/trains/community/deluge/app_versions.json b/trains/community/deluge/app_versions.json index 23a94b9273..9a5f27f718 100644 --- a/trains/community/deluge/app_versions.json +++ b/trains/community/deluge/app_versions.json @@ -1,13 +1,13 @@ { - "1.0.17": { + "1.0.18": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/deluge/1.0.17", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/community/deluge/1.0.18", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "2.1.1_1.0.17", - "version": "1.0.17", + "human_version": "2.1.1_1.0.18", + "version": "1.0.18", "app_metadata": { "app_version": "2.1.1", "capabilities": [ @@ -43,8 +43,8 @@ "torrent", "download" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -69,7 +69,7 @@ ], "title": "Deluge", "train": "community", - "version": "1.0.17" + "version": "1.0.18" }, "schema": { "groups": [ diff --git a/trains/community/distribution/app_versions.json b/trains/community/distribution/app_versions.json index 67e22badf3..cdcc58c539 100644 --- a/trains/community/distribution/app_versions.json +++ b/trains/community/distribution/app_versions.json @@ -1,13 +1,13 @@ { - "1.0.18": { + "1.0.19": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/distribution/1.0.18", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/community/distribution/1.0.19", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "2.8.3_1.0.18", - "version": "1.0.18", + "human_version": "2.8.3_1.0.19", + "version": "1.0.19", "app_metadata": { "app_version": "2.8.3", "capabilities": [], @@ -22,8 +22,8 @@ "registry", "container" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -49,7 +49,7 @@ ], "title": "Distribution", "train": "community", - "version": "1.0.18" + "version": "1.0.19" }, "schema": { "groups": [ diff --git a/trains/community/dockge/app_versions.json b/trains/community/dockge/app_versions.json index 73d3490ab9..f422a5924a 100644 --- a/trains/community/dockge/app_versions.json +++ b/trains/community/dockge/app_versions.json @@ -1,13 +1,13 @@ { - "1.0.16": { + "1.0.17": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/dockge/1.0.16", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/community/dockge/1.0.17", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "1.4.2_1.0.16", - "version": "1.0.16", + "human_version": "1.4.2_1.0.17", + "version": "1.0.17", "app_metadata": { "app_version": "1.4.2", "capabilities": [ @@ -60,8 +60,8 @@ "docker", "compose" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -88,7 +88,7 @@ ], "title": "Dockge", "train": "community", - "version": "1.0.16" + "version": "1.0.17" }, "schema": { "groups": [ diff --git a/trains/community/drawio/app_versions.json b/trains/community/drawio/app_versions.json index 2c6adb6412..bde4930596 100644 --- a/trains/community/drawio/app_versions.json +++ b/trains/community/drawio/app_versions.json @@ -1,13 +1,13 @@ { - "1.1.10": { + "1.1.11": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/drawio/1.1.10", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/community/drawio/1.1.11", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "24.7.17_1.1.10", - "version": "1.1.10", + "human_version": "24.7.17_1.1.11", + "version": "1.1.11", "app_metadata": { "app_version": "24.7.17", "capabilities": [], @@ -22,8 +22,8 @@ "diagram", "whiteboard" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -53,7 +53,7 @@ ], "title": "Draw.io", "train": "community", - "version": "1.1.10" + "version": "1.1.11" }, "schema": { "groups": [ diff --git a/trains/community/filebrowser/app_versions.json b/trains/community/filebrowser/app_versions.json index ff898e0b6f..95d31ea763 100644 --- a/trains/community/filebrowser/app_versions.json +++ b/trains/community/filebrowser/app_versions.json @@ -1,13 +1,13 @@ { - "1.1.10": { + "1.1.11": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/filebrowser/1.1.10", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/community/filebrowser/1.1.11", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "v2.31.2_1.1.10", - "version": "1.1.10", + "human_version": "v2.31.2_1.1.11", + "version": "1.1.11", "app_metadata": { "app_version": "v2.31.2", "capabilities": [], @@ -22,8 +22,8 @@ "files", "browser" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -53,7 +53,7 @@ ], "title": "File Browser", "train": "community", - "version": "1.1.10" + "version": "1.1.11" }, "schema": { "groups": [ diff --git a/trains/community/firefly-iii/app_versions.json b/trains/community/firefly-iii/app_versions.json index ad05c99cde..8b4e10d513 100644 --- a/trains/community/firefly-iii/app_versions.json +++ b/trains/community/firefly-iii/app_versions.json @@ -1,13 +1,13 @@ { - "1.2.17": { + "1.2.18": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/firefly-iii/1.2.17", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/community/firefly-iii/1.2.18", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "version-6.1.21_1.2.17", - "version": "1.2.17", + "human_version": "version-6.1.21_1.2.18", + "version": "1.2.18", "app_metadata": { "app_version": "version-6.1.21", "capabilities": [ @@ -38,8 +38,8 @@ "keywords": [ "finance" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -90,7 +90,7 @@ ], "title": "Firefly III", "train": "community", - "version": "1.2.17" + "version": "1.2.18" }, "schema": { "groups": [ diff --git a/trains/community/flame/app_versions.json b/trains/community/flame/app_versions.json index ffc7a9876c..7789aef597 100644 --- a/trains/community/flame/app_versions.json +++ b/trains/community/flame/app_versions.json @@ -1,13 +1,13 @@ { - "1.0.18": { + "1.0.19": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/flame/1.0.18", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/community/flame/1.0.19", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "2.3.1_1.0.18", - "version": "1.0.18", + "human_version": "2.3.1_1.0.19", + "version": "1.0.19", "app_metadata": { "app_version": "2.3.1", "capabilities": [ @@ -34,8 +34,8 @@ "keywords": [ "startpage" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -62,7 +62,7 @@ ], "title": "Flame", "train": "community", - "version": "1.0.18" + "version": "1.0.19" }, "schema": { "groups": [ diff --git a/trains/community/freshrss/app_versions.json b/trains/community/freshrss/app_versions.json index 13f1fdb364..1fe89538a2 100644 --- a/trains/community/freshrss/app_versions.json +++ b/trains/community/freshrss/app_versions.json @@ -1,13 +1,13 @@ { - "1.1.13": { + "1.1.14": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/freshrss/1.1.13", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/community/freshrss/1.1.14", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "1.24.3_1.1.13", - "version": "1.1.13", + "human_version": "1.24.3_1.1.14", + "version": "1.1.14", "app_metadata": { "app_version": "1.24.3", "capabilities": [ @@ -35,8 +35,8 @@ "rss", "news" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -71,7 +71,7 @@ ], "title": "FreshRSS", "train": "community", - "version": "1.1.13" + "version": "1.1.14" }, "schema": { "groups": [ diff --git a/trains/community/frigate/app_versions.json b/trains/community/frigate/app_versions.json index 1755f65179..6c9c9fd25a 100644 --- a/trains/community/frigate/app_versions.json +++ b/trains/community/frigate/app_versions.json @@ -1,13 +1,13 @@ { - "1.0.8": { + "1.0.9": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/frigate/1.0.8", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/community/frigate/1.0.9", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "0.14.1_1.0.8", - "version": "1.0.8", + "human_version": "0.14.1_1.0.9", + "version": "1.0.9", "app_metadata": { "app_version": "0.14.1", "capabilities": [ @@ -43,8 +43,8 @@ "camera", "nvr" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -72,7 +72,7 @@ ], "title": "Frigate", "train": "community", - "version": "1.0.8" + "version": "1.0.9" }, "schema": { "groups": [ diff --git a/trains/community/fscrawler/app_versions.json b/trains/community/fscrawler/app_versions.json index dfd250494d..d318b742fa 100644 --- a/trains/community/fscrawler/app_versions.json +++ b/trains/community/fscrawler/app_versions.json @@ -1,13 +1,13 @@ { - "1.0.16": { + "1.0.17": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/fscrawler/1.0.16", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/community/fscrawler/1.0.17", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "2.10-SNAPSHOT-ocr-es7_1.0.16", - "version": "1.0.16", + "human_version": "2.10-SNAPSHOT-ocr-es7_1.0.17", + "version": "1.0.17", "app_metadata": { "app_version": "2.10-SNAPSHOT-ocr-es7", "capabilities": [], @@ -22,8 +22,8 @@ "index", "crawler" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -49,7 +49,7 @@ ], "title": "FSCrawler", "train": "community", - "version": "1.0.16" + "version": "1.0.17" }, "schema": { "groups": [ diff --git a/trains/community/gitea/app_versions.json b/trains/community/gitea/app_versions.json index fbfee4a31e..a1b24129bf 100644 --- a/trains/community/gitea/app_versions.json +++ b/trains/community/gitea/app_versions.json @@ -1,13 +1,13 @@ { - "1.0.11": { + "1.0.12": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/gitea/1.0.11", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/community/gitea/1.0.12", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "1.22.3_1.0.11", - "version": "1.0.11", + "human_version": "1.22.3_1.0.12", + "version": "1.0.12", "app_metadata": { "app_version": "1.22.3", "capabilities": [], @@ -23,8 +23,8 @@ "gitea", "source control" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -54,7 +54,7 @@ ], "title": "Gitea", "train": "community", - "version": "1.0.11" + "version": "1.0.12" }, "schema": { "groups": [ diff --git a/trains/community/grafana/app_versions.json b/trains/community/grafana/app_versions.json index 191f48b714..34d13011c5 100644 --- a/trains/community/grafana/app_versions.json +++ b/trains/community/grafana/app_versions.json @@ -1,13 +1,13 @@ { - "1.1.11": { + "1.1.12": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/grafana/1.1.11", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/community/grafana/1.1.12", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "11.2.2_1.1.11", - "version": "1.1.11", + "human_version": "11.2.2_1.1.12", + "version": "1.1.12", "app_metadata": { "app_version": "11.2.2", "capabilities": [], @@ -24,8 +24,8 @@ "metrics", "dashboards" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -54,7 +54,7 @@ ], "title": "Grafana", "train": "community", - "version": "1.1.11" + "version": "1.1.12" }, "schema": { "groups": [ diff --git a/trains/community/handbrake/app_versions.json b/trains/community/handbrake/app_versions.json index 5c419e7f1a..7516786fc6 100644 --- a/trains/community/handbrake/app_versions.json +++ b/trains/community/handbrake/app_versions.json @@ -1,13 +1,13 @@ { - "2.0.10": { + "2.0.11": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/handbrake/2.0.10", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/community/handbrake/2.0.11", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "v24.09.1_2.0.10", - "version": "2.0.10", + "human_version": "v24.09.1_2.0.11", + "version": "2.0.11", "app_metadata": { "app_version": "v24.09.1", "capabilities": [ @@ -52,8 +52,8 @@ "video", "transcoder" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -78,7 +78,7 @@ ], "title": "Handbrake", "train": "community", - "version": "2.0.10" + "version": "2.0.11" }, "schema": { "groups": [ diff --git a/trains/community/homarr/app_versions.json b/trains/community/homarr/app_versions.json index 159860abde..5090b07fea 100644 --- a/trains/community/homarr/app_versions.json +++ b/trains/community/homarr/app_versions.json @@ -1,13 +1,13 @@ { - "1.0.18": { + "1.0.19": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/homarr/1.0.18", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/community/homarr/1.0.19", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "0.15.4_1.0.18", - "version": "1.0.18", + "human_version": "0.15.4_1.0.19", + "version": "1.0.19", "app_metadata": { "app_version": "0.15.4", "capabilities": [], @@ -21,8 +21,8 @@ "keywords": [ "dashboard" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -51,7 +51,7 @@ ], "title": "Homarr", "train": "community", - "version": "1.0.18" + "version": "1.0.19" }, "schema": { "groups": [ diff --git a/trains/community/homepage/app_versions.json b/trains/community/homepage/app_versions.json index 9e30969d2d..6526995715 100644 --- a/trains/community/homepage/app_versions.json +++ b/trains/community/homepage/app_versions.json @@ -1,13 +1,13 @@ { - "1.0.21": { + "1.0.22": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/homepage/1.0.21", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/community/homepage/1.0.22", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "v0.9.10_1.0.21", - "version": "1.0.21", + "human_version": "v0.9.10_1.0.22", + "version": "1.0.22", "app_metadata": { "app_version": "v0.9.10", "capabilities": [], @@ -21,8 +21,8 @@ "keywords": [ "dashboard" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -54,7 +54,7 @@ ], "title": "Homepage", "train": "community", - "version": "1.0.21" + "version": "1.0.22" }, "schema": { "groups": [ diff --git a/trains/community/homer/app_versions.json b/trains/community/homer/app_versions.json index 3c4b1873f7..dbe635bb45 100644 --- a/trains/community/homer/app_versions.json +++ b/trains/community/homer/app_versions.json @@ -1,13 +1,13 @@ { - "2.0.9": { + "2.0.10": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/homer/2.0.9", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/community/homer/2.0.10", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "v24.05.1_2.0.9", - "version": "2.0.9", + "human_version": "v24.05.1_2.0.10", + "version": "2.0.10", "app_metadata": { "app_version": "v24.05.1", "capabilities": [], @@ -18,8 +18,8 @@ "home": "https://github.com/bastienwirtz/homer", "host_mounts": [], "icon": "https://media.sys.truenas.net/apps/homer/icons/icon.png", - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -50,7 +50,7 @@ ], "title": "Homer", "train": "community", - "version": "2.0.9" + "version": "2.0.10" }, "schema": { "groups": [ diff --git a/trains/community/immich/app_versions.json b/trains/community/immich/app_versions.json index 5f73e40d31..d895249b16 100644 --- a/trains/community/immich/app_versions.json +++ b/trains/community/immich/app_versions.json @@ -1,13 +1,13 @@ { - "1.6.18": { + "1.6.19": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/immich/1.6.18", - "last_update": "2024-10-15 12:58:57", + "location": "/__w/apps/apps/trains/community/immich/1.6.19", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "v1.118.0_1.6.18", - "version": "1.6.18", + "human_version": "v1.118.0_1.6.19", + "version": "1.6.19", "app_metadata": { "app_version": "v1.118.0", "capabilities": [ @@ -35,8 +35,8 @@ "photos", "backup" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -75,7 +75,7 @@ ], "title": "Immich", "train": "community", - "version": "1.6.18" + "version": "1.6.19" }, "schema": { "groups": [ diff --git a/trains/community/invidious/app_versions.json b/trains/community/invidious/app_versions.json index e7e46d609d..3f50010052 100644 --- a/trains/community/invidious/app_versions.json +++ b/trains/community/invidious/app_versions.json @@ -1,13 +1,13 @@ { - "1.0.10": { + "1.0.11": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/invidious/1.0.10", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/community/invidious/1.0.11", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "2.20240825.2_1.0.10", - "version": "1.0.10", + "human_version": "2.20240825.2_1.0.11", + "version": "1.0.11", "app_metadata": { "app_version": "2.20240825.2", "capabilities": [], @@ -21,8 +21,8 @@ "keywords": [ "youtube" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -61,7 +61,7 @@ ], "title": "Invidious", "train": "community", - "version": "1.0.10" + "version": "1.0.11" }, "schema": { "groups": [ diff --git a/trains/community/ipfs/app_versions.json b/trains/community/ipfs/app_versions.json index 3424794b0a..4e656f9ff2 100644 --- a/trains/community/ipfs/app_versions.json +++ b/trains/community/ipfs/app_versions.json @@ -1,13 +1,13 @@ { - "1.0.18": { + "1.0.19": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/ipfs/1.0.18", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/community/ipfs/1.0.19", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "v0.30.0_1.0.18", - "version": "1.0.18", + "human_version": "v0.30.0_1.0.19", + "version": "1.0.19", "app_metadata": { "app_version": "v0.30.0", "capabilities": [], @@ -24,8 +24,8 @@ "file-sharing", "kubo" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -53,7 +53,7 @@ ], "title": "IPFS", "train": "community", - "version": "1.0.18" + "version": "1.0.19" }, "schema": { "groups": [ diff --git a/trains/community/jellyfin/app_versions.json b/trains/community/jellyfin/app_versions.json index 884e5e9e75..0eca48e428 100644 --- a/trains/community/jellyfin/app_versions.json +++ b/trains/community/jellyfin/app_versions.json @@ -1,13 +1,13 @@ { - "1.0.24": { + "1.0.25": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/jellyfin/1.0.24", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/community/jellyfin/1.0.25", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "10.9.11_1.0.24", - "version": "1.0.24", + "human_version": "10.9.11_1.0.25", + "version": "1.0.25", "app_metadata": { "app_version": "10.9.11", "capabilities": [], @@ -26,8 +26,8 @@ "media", "streaming" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -55,7 +55,7 @@ ], "title": "Jellyfin", "train": "community", - "version": "1.0.24" + "version": "1.0.25" }, "schema": { "groups": [ diff --git a/trains/community/jellyseerr/app_versions.json b/trains/community/jellyseerr/app_versions.json index ba7e55382e..6fd5e434a9 100644 --- a/trains/community/jellyseerr/app_versions.json +++ b/trains/community/jellyseerr/app_versions.json @@ -1,13 +1,13 @@ { - "1.0.18": { + "1.0.19": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/jellyseerr/1.0.18", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/community/jellyseerr/1.0.19", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "1.9.2_1.0.18", - "version": "1.0.18", + "human_version": "1.9.2_1.0.19", + "version": "1.0.19", "app_metadata": { "app_version": "1.9.2", "capabilities": [], @@ -21,8 +21,8 @@ "keywords": [ "media" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -49,7 +49,7 @@ ], "title": "Jellyseerr", "train": "community", - "version": "1.0.18" + "version": "1.0.19" }, "schema": { "groups": [ diff --git a/trains/community/jenkins/app_versions.json b/trains/community/jenkins/app_versions.json index 196898e673..31750863d7 100644 --- a/trains/community/jenkins/app_versions.json +++ b/trains/community/jenkins/app_versions.json @@ -1,13 +1,13 @@ { - "1.0.12": { + "1.0.13": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/jenkins/1.0.12", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/community/jenkins/1.0.13", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "2.462.1-jdk17_1.0.12", - "version": "1.0.12", + "human_version": "2.462.1-jdk17_1.0.13", + "version": "1.0.13", "app_metadata": { "app_version": "2.462.1-jdk17", "capabilities": [], @@ -22,8 +22,8 @@ "automation", "ci/cd" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -52,7 +52,7 @@ ], "title": "Jenkins", "train": "community", - "version": "1.0.12" + "version": "1.0.13" }, "schema": { "groups": [ diff --git a/trains/community/joplin/app_versions.json b/trains/community/joplin/app_versions.json index 6cc43db2a4..9d2cbe7f13 100644 --- a/trains/community/joplin/app_versions.json +++ b/trains/community/joplin/app_versions.json @@ -1,13 +1,13 @@ { - "1.1.10": { + "1.1.11": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/joplin/1.1.10", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/community/joplin/1.1.11", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "3.0.1-beta_1.1.10", - "version": "1.1.10", + "human_version": "3.0.1-beta_1.1.11", + "version": "1.1.11", "app_metadata": { "app_version": "3.0.1-beta", "capabilities": [], @@ -21,8 +21,8 @@ "keywords": [ "notes" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -58,7 +58,7 @@ ], "title": "Joplin", "train": "community", - "version": "1.1.10" + "version": "1.1.11" }, "schema": { "groups": [ diff --git a/trains/community/kapowarr/app_versions.json b/trains/community/kapowarr/app_versions.json index 071029f72e..a7ac4d4072 100644 --- a/trains/community/kapowarr/app_versions.json +++ b/trains/community/kapowarr/app_versions.json @@ -1,13 +1,13 @@ { - "1.0.18": { + "1.0.19": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/kapowarr/1.0.18", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/community/kapowarr/1.0.19", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "v1.0.0_1.0.18", - "version": "1.0.18", + "human_version": "v1.0.0_1.0.19", + "version": "1.0.19", "app_metadata": { "app_version": "v1.0.0", "capabilities": [], @@ -22,8 +22,8 @@ "comic", "media" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -51,7 +51,7 @@ ], "title": "Kapowarr", "train": "community", - "version": "1.0.18" + "version": "1.0.19" }, "schema": { "groups": [ diff --git a/trains/community/kavita/app_versions.json b/trains/community/kavita/app_versions.json index 6478f48485..d9ddb48de6 100644 --- a/trains/community/kavita/app_versions.json +++ b/trains/community/kavita/app_versions.json @@ -1,13 +1,13 @@ { - "1.0.18": { + "1.0.19": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/kavita/1.0.18", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/community/kavita/1.0.19", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "0.8.3_1.0.18", - "version": "1.0.18", + "human_version": "0.8.3_1.0.19", + "version": "1.0.19", "app_metadata": { "app_version": "0.8.3", "capabilities": [ @@ -43,8 +43,8 @@ "ebook", "manga" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -75,7 +75,7 @@ ], "title": "Kavita", "train": "community", - "version": "1.0.18" + "version": "1.0.19" }, "schema": { "groups": [ diff --git a/trains/community/komga/app_versions.json b/trains/community/komga/app_versions.json index dbd0c3d97f..974ec4bee1 100644 --- a/trains/community/komga/app_versions.json +++ b/trains/community/komga/app_versions.json @@ -1,13 +1,13 @@ { - "1.1.13": { + "1.1.14": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/komga/1.1.13", - "last_update": "2024-10-15 12:58:57", + "location": "/__w/apps/apps/trains/community/komga/1.1.14", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "1.14.1_1.1.13", - "version": "1.1.13", + "human_version": "1.14.1_1.1.14", + "version": "1.1.14", "app_metadata": { "app_version": "1.14.1", "capabilities": [], @@ -23,8 +23,8 @@ "comics", "mangas" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -52,7 +52,7 @@ ], "title": "Komga", "train": "community", - "version": "1.1.13" + "version": "1.1.14" }, "schema": { "groups": [ diff --git a/trains/community/lidarr/app_versions.json b/trains/community/lidarr/app_versions.json index 9a5fc17860..77f74657f5 100644 --- a/trains/community/lidarr/app_versions.json +++ b/trains/community/lidarr/app_versions.json @@ -1,13 +1,13 @@ { - "1.1.11": { + "1.1.12": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/lidarr/1.1.11", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/community/lidarr/1.1.12", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "2.6.4.4402_1.1.11", - "version": "1.1.11", + "human_version": "2.6.4.4402_1.1.12", + "version": "1.1.12", "app_metadata": { "app_version": "2.6.4.4402", "capabilities": [], @@ -22,8 +22,8 @@ "media", "music" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -52,7 +52,7 @@ ], "title": "Lidarr", "train": "community", - "version": "1.1.11" + "version": "1.1.12" }, "schema": { "groups": [ diff --git a/trains/community/linkding/app_versions.json b/trains/community/linkding/app_versions.json index e653a3e501..c1b3c42afe 100644 --- a/trains/community/linkding/app_versions.json +++ b/trains/community/linkding/app_versions.json @@ -1,13 +1,13 @@ { - "1.0.16": { + "1.0.17": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/linkding/1.0.16", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/community/linkding/1.0.17", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "1.36.0_1.0.16", - "version": "1.0.16", + "human_version": "1.36.0_1.0.17", + "version": "1.0.17", "app_metadata": { "app_version": "1.36.0", "capabilities": [], @@ -21,8 +21,8 @@ "keywords": [ "bookmark" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -56,7 +56,7 @@ ], "title": "Linkding", "train": "community", - "version": "1.0.16" + "version": "1.0.17" }, "schema": { "groups": [ diff --git a/trains/community/listmonk/app_versions.json b/trains/community/listmonk/app_versions.json index e03bfee83a..ca5c4c5dae 100644 --- a/trains/community/listmonk/app_versions.json +++ b/trains/community/listmonk/app_versions.json @@ -1,13 +1,13 @@ { - "1.0.8": { + "1.0.9": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/listmonk/1.0.8", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/community/listmonk/1.0.9", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "v3.0.0_1.0.8", - "version": "1.0.8", + "human_version": "v3.0.0_1.0.9", + "version": "1.0.9", "app_metadata": { "app_version": "v3.0.0", "capabilities": [], @@ -22,8 +22,8 @@ "mailing-list", "newsletter" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -59,7 +59,7 @@ ], "title": "Listmonk", "train": "community", - "version": "1.0.8" + "version": "1.0.9" }, "schema": { "groups": [ diff --git a/trains/community/logseq/app_versions.json b/trains/community/logseq/app_versions.json index af75f6c744..053d0d8735 100644 --- a/trains/community/logseq/app_versions.json +++ b/trains/community/logseq/app_versions.json @@ -1,13 +1,13 @@ { - "1.0.17": { + "1.0.18": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/logseq/1.0.17", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/community/logseq/1.0.18", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "latest_1.0.17", - "version": "1.0.17", + "human_version": "latest_1.0.18", + "version": "1.0.18", "app_metadata": { "app_version": "latest", "capabilities": [], @@ -22,8 +22,8 @@ "knowledge", "management" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -47,7 +47,7 @@ ], "title": "Logseq", "train": "community", - "version": "1.0.17" + "version": "1.0.18" }, "schema": { "groups": [ diff --git a/trains/community/mealie/app_versions.json b/trains/community/mealie/app_versions.json index 36d5e034f4..5bfe71e60a 100644 --- a/trains/community/mealie/app_versions.json +++ b/trains/community/mealie/app_versions.json @@ -1,13 +1,13 @@ { - "1.2.9": { + "1.2.10": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/mealie/1.2.9", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/community/mealie/1.2.10", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "v1.12.0_1.2.9", - "version": "1.2.9", + "human_version": "v1.12.0_1.2.10", + "version": "1.2.10", "app_metadata": { "app_version": "v1.12.0", "capabilities": [], @@ -22,8 +22,8 @@ "recipes", "meal planner" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -56,7 +56,7 @@ ], "title": "Mealie", "train": "community", - "version": "1.2.9" + "version": "1.2.10" }, "schema": { "groups": [ diff --git a/trains/community/metube/app_versions.json b/trains/community/metube/app_versions.json index 6975917de8..21a19b09c5 100644 --- a/trains/community/metube/app_versions.json +++ b/trains/community/metube/app_versions.json @@ -1,13 +1,13 @@ { - "1.1.16": { + "1.1.17": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/metube/1.1.16", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/community/metube/1.1.17", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "2024-10-08_1.1.16", - "version": "1.1.16", + "human_version": "2024-10-08_1.1.17", + "version": "1.1.17", "app_metadata": { "app_version": "2024-10-08", "capabilities": [], @@ -22,8 +22,8 @@ "youtube-dl", "yt-dlp" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -50,7 +50,7 @@ ], "title": "MeTube", "train": "community", - "version": "1.1.16" + "version": "1.1.17" }, "schema": { "groups": [ diff --git a/trains/community/minecraft/app_versions.json b/trains/community/minecraft/app_versions.json index 5aa2fe351f..9012e6ed99 100644 --- a/trains/community/minecraft/app_versions.json +++ b/trains/community/minecraft/app_versions.json @@ -1,13 +1,13 @@ { - "1.11.17": { + "1.11.18": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/minecraft/1.11.17", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/community/minecraft/1.11.18", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "2024.10.1_1.11.17", - "version": "1.11.17", + "human_version": "2024.10.1_1.11.18", + "version": "1.11.18", "app_metadata": { "app_version": "2024.10.1", "capabilities": [ @@ -43,8 +43,8 @@ "world", "building" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -69,7 +69,7 @@ ], "title": "Minecraft", "train": "community", - "version": "1.11.17" + "version": "1.11.18" }, "schema": { "groups": [ diff --git a/trains/community/mineos/app_versions.json b/trains/community/mineos/app_versions.json index 46e19c87cd..5c92e0bc56 100644 --- a/trains/community/mineos/app_versions.json +++ b/trains/community/mineos/app_versions.json @@ -1,13 +1,13 @@ { - "1.0.17": { + "1.0.18": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/mineos/1.0.17", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/community/mineos/1.0.18", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "latest_1.0.17", - "version": "1.0.17", + "human_version": "latest_1.0.18", + "version": "1.0.18", "app_metadata": { "app_version": "latest", "capabilities": [ @@ -42,8 +42,8 @@ "keywords": [ "minecraft" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -70,7 +70,7 @@ ], "title": "MineOS", "train": "community", - "version": "1.0.17" + "version": "1.0.18" }, "schema": { "groups": [ diff --git a/trains/community/mumble/app_versions.json b/trains/community/mumble/app_versions.json index 95e17354e2..62f8fbf206 100644 --- a/trains/community/mumble/app_versions.json +++ b/trains/community/mumble/app_versions.json @@ -1,13 +1,13 @@ { - "1.1.9": { + "1.1.10": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/mumble/1.1.9", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/community/mumble/1.1.10", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "v1.5.634_1.1.9", - "version": "1.1.9", + "human_version": "v1.5.634_1.1.10", + "version": "1.1.10", "app_metadata": { "app_version": "v1.5.634", "capabilities": [], @@ -21,8 +21,8 @@ "keywords": [ "voice" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -47,7 +47,7 @@ ], "title": "Mumble", "train": "community", - "version": "1.1.9" + "version": "1.1.10" }, "schema": { "groups": [ diff --git a/trains/community/n8n/app_versions.json b/trains/community/n8n/app_versions.json index a6975c3141..1c4711e25a 100644 --- a/trains/community/n8n/app_versions.json +++ b/trains/community/n8n/app_versions.json @@ -1,13 +1,13 @@ { - "1.3.22": { + "1.3.23": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/n8n/1.3.22", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/community/n8n/1.3.23", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "1.63.2_1.3.22", - "version": "1.3.22", + "human_version": "1.63.2_1.3.23", + "version": "1.3.23", "app_metadata": { "app_version": "1.63.2", "capabilities": [], @@ -22,8 +22,8 @@ "workflows", "automation" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -67,7 +67,7 @@ ], "title": "n8n", "train": "community", - "version": "1.3.22" + "version": "1.3.23" }, "schema": { "groups": [ diff --git a/trains/community/navidrome/app_versions.json b/trains/community/navidrome/app_versions.json index 7b7e538cab..a445c4e865 100644 --- a/trains/community/navidrome/app_versions.json +++ b/trains/community/navidrome/app_versions.json @@ -1,13 +1,13 @@ { - "1.0.23": { + "1.0.24": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/navidrome/1.0.23", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/community/navidrome/1.0.24", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "0.53.3_1.0.23", - "version": "1.0.23", + "human_version": "0.53.3_1.0.24", + "version": "1.0.24", "app_metadata": { "app_version": "0.53.3", "capabilities": [], @@ -27,8 +27,8 @@ "media", "music" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -56,7 +56,7 @@ ], "title": "Navidrome", "train": "community", - "version": "1.0.23" + "version": "1.0.24" }, "schema": { "groups": [ diff --git a/trains/community/netbootxyz/app_versions.json b/trains/community/netbootxyz/app_versions.json index 1731bc1a08..a04d860369 100644 --- a/trains/community/netbootxyz/app_versions.json +++ b/trains/community/netbootxyz/app_versions.json @@ -1,13 +1,13 @@ { - "1.0.18": { + "1.0.19": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/netbootxyz/1.0.18", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/community/netbootxyz/1.0.19", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "0.7.3-nbxyz1_1.0.18", - "version": "1.0.18", + "human_version": "0.7.3-nbxyz1_1.0.19", + "version": "1.0.19", "app_metadata": { "app_version": "0.7.3-nbxyz1", "capabilities": [ @@ -59,8 +59,8 @@ "netbootxyz", "netboot.xyz" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -87,7 +87,7 @@ ], "title": "Netboot.xyz", "train": "community", - "version": "1.0.18" + "version": "1.0.19" }, "schema": { "groups": [ diff --git a/trains/community/nginx-proxy-manager/app_versions.json b/trains/community/nginx-proxy-manager/app_versions.json index 89e49d24eb..84913714e9 100644 --- a/trains/community/nginx-proxy-manager/app_versions.json +++ b/trains/community/nginx-proxy-manager/app_versions.json @@ -1,13 +1,13 @@ { - "1.0.19": { + "1.0.20": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/nginx-proxy-manager/1.0.19", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/community/nginx-proxy-manager/1.0.20", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "2.11.3_1.0.19", - "version": "1.0.19", + "human_version": "2.11.3_1.0.20", + "version": "1.0.20", "app_metadata": { "app_version": "2.11.3", "capabilities": [ @@ -44,8 +44,8 @@ "nginx", "proxy" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -74,7 +74,7 @@ ], "title": "Nginx Proxy Manager", "train": "community", - "version": "1.0.19" + "version": "1.0.20" }, "schema": { "groups": [ diff --git a/trains/community/node-red/app_versions.json b/trains/community/node-red/app_versions.json index 20cb87a904..9c213674b8 100644 --- a/trains/community/node-red/app_versions.json +++ b/trains/community/node-red/app_versions.json @@ -1,13 +1,13 @@ { - "1.0.32": { + "1.0.33": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/node-red/1.0.32", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/community/node-red/1.0.33", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "4.0.5_1.0.32", - "version": "1.0.32", + "human_version": "4.0.5_1.0.33", + "version": "1.0.33", "app_metadata": { "app_version": "4.0.5", "capabilities": [], @@ -21,8 +21,8 @@ "keywords": [ "automation" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -49,7 +49,7 @@ ], "title": "Node-RED", "train": "community", - "version": "1.0.32" + "version": "1.0.33" }, "schema": { "groups": [ diff --git a/trains/community/odoo/app_versions.json b/trains/community/odoo/app_versions.json index 74e243dec2..063ba20738 100644 --- a/trains/community/odoo/app_versions.json +++ b/trains/community/odoo/app_versions.json @@ -1,13 +1,13 @@ { - "1.0.3": { + "1.0.4": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/odoo/1.0.3", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/community/odoo/1.0.4", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "17.0_1.0.3", - "version": "1.0.3", + "human_version": "17.0_1.0.4", + "version": "1.0.4", "app_metadata": { "app_version": "17.0", "capabilities": [], @@ -22,8 +22,8 @@ "erp", "odoo" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -51,7 +51,7 @@ ], "title": "Odoo", "train": "community", - "version": "1.0.3" + "version": "1.0.4" }, "schema": { "groups": [ diff --git a/trains/community/omada-controller/app_versions.json b/trains/community/omada-controller/app_versions.json index be0278173c..9ca32d827a 100644 --- a/trains/community/omada-controller/app_versions.json +++ b/trains/community/omada-controller/app_versions.json @@ -1,13 +1,13 @@ { - "1.1.9": { + "1.1.10": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/omada-controller/1.1.9", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/community/omada-controller/1.1.10", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "5.14_1.1.9", - "version": "1.1.9", + "human_version": "5.14_1.1.10", + "version": "1.1.10", "app_metadata": { "app_version": "5.14", "capabilities": [ @@ -45,8 +45,8 @@ "omada", "tp-link" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -71,7 +71,7 @@ ], "title": "Bazarr", "train": "community", - "version": "1.1.9" + "version": "1.1.10" }, "schema": { "groups": [ diff --git a/trains/community/organizr/app_versions.json b/trains/community/organizr/app_versions.json index c4da685d1e..3532cb46d3 100644 --- a/trains/community/organizr/app_versions.json +++ b/trains/community/organizr/app_versions.json @@ -1,13 +1,13 @@ { - "1.0.17": { + "1.0.18": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/organizr/1.0.17", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/community/organizr/1.0.18", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "latest_1.0.17", - "version": "1.0.17", + "human_version": "latest_1.0.18", + "version": "1.0.18", "app_metadata": { "app_version": "latest", "capabilities": [ @@ -43,8 +43,8 @@ "dashboard", "organizr" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -72,7 +72,7 @@ ], "title": "Organizr", "train": "community", - "version": "1.0.17" + "version": "1.0.18" }, "schema": { "groups": [ diff --git a/trains/community/overseerr/app_versions.json b/trains/community/overseerr/app_versions.json index 6e0c108ec0..61d0ad657a 100644 --- a/trains/community/overseerr/app_versions.json +++ b/trains/community/overseerr/app_versions.json @@ -1,13 +1,13 @@ { - "1.0.17": { + "1.0.18": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/overseerr/1.0.17", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/community/overseerr/1.0.18", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "1.33.2_1.0.17", - "version": "1.0.17", + "human_version": "1.33.2_1.0.18", + "version": "1.0.18", "app_metadata": { "app_version": "1.33.2", "capabilities": [], @@ -21,8 +21,8 @@ "keywords": [ "media" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -47,7 +47,7 @@ ], "title": "Overseerr", "train": "community", - "version": "1.0.17" + "version": "1.0.18" }, "schema": { "groups": [ diff --git a/trains/community/palworld/app_versions.json b/trains/community/palworld/app_versions.json index 19462f4202..76854f01f6 100644 --- a/trains/community/palworld/app_versions.json +++ b/trains/community/palworld/app_versions.json @@ -1,13 +1,13 @@ { - "1.0.19": { + "1.0.20": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/palworld/1.0.19", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/community/palworld/1.0.20", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "palworld_1.0.19", - "version": "1.0.19", + "human_version": "palworld_1.0.20", + "version": "1.0.20", "app_metadata": { "app_version": "palworld", "capabilities": [ @@ -55,8 +55,8 @@ "game", "palworld" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -81,7 +81,7 @@ ], "title": "Palworld", "train": "community", - "version": "1.0.19" + "version": "1.0.20" }, "schema": { "groups": [ diff --git a/trains/community/paperless-ngx/app_versions.json b/trains/community/paperless-ngx/app_versions.json index 7b92b8b192..c8c3d7988e 100644 --- a/trains/community/paperless-ngx/app_versions.json +++ b/trains/community/paperless-ngx/app_versions.json @@ -1,13 +1,13 @@ { - "1.0.11": { + "1.0.12": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/paperless-ngx/1.0.11", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/community/paperless-ngx/1.0.12", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "2.12.1_1.0.11", - "version": "1.0.11", + "human_version": "2.12.1_1.0.12", + "version": "1.0.12", "app_metadata": { "app_version": "2.12.1", "capabilities": [ @@ -43,8 +43,8 @@ "document", "management" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -92,7 +92,7 @@ ], "title": "Paperless-ngx", "train": "community", - "version": "1.0.11" + "version": "1.0.12" }, "schema": { "groups": [ diff --git a/trains/community/passbolt/app_versions.json b/trains/community/passbolt/app_versions.json index 0a927ef8f3..b93249fa95 100644 --- a/trains/community/passbolt/app_versions.json +++ b/trains/community/passbolt/app_versions.json @@ -1,13 +1,13 @@ { - "1.0.6": { + "1.0.7": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/passbolt/1.0.6", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/community/passbolt/1.0.7", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "4.9.1-1-ce-non-root_1.0.6", - "version": "1.0.6", + "human_version": "4.9.1-1-ce-non-root_1.0.7", + "version": "1.0.7", "app_metadata": { "app_version": "4.9.1-1-ce-non-root", "capabilities": [], @@ -22,8 +22,8 @@ "password", "manager" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -60,7 +60,7 @@ ], "title": "Passbolt", "train": "community", - "version": "1.0.6" + "version": "1.0.7" }, "schema": { "groups": [ diff --git a/trains/community/pgadmin/app_versions.json b/trains/community/pgadmin/app_versions.json index f7c03a0b4f..7679460522 100644 --- a/trains/community/pgadmin/app_versions.json +++ b/trains/community/pgadmin/app_versions.json @@ -1,13 +1,13 @@ { - "1.0.4": { + "1.0.5": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/pgadmin/1.0.4", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/community/pgadmin/1.0.5", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "8.12_1.0.4", - "version": "1.0.4", + "human_version": "8.12_1.0.5", + "version": "1.0.5", "app_metadata": { "app_version": "8.12", "capabilities": [ @@ -27,8 +27,8 @@ "database", "management" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -57,7 +57,7 @@ ], "title": "pgAdmin", "train": "community", - "version": "1.0.4" + "version": "1.0.5" }, "schema": { "groups": [ diff --git a/trains/community/pigallery2/app_versions.json b/trains/community/pigallery2/app_versions.json index 7121839468..e6c96df0db 100644 --- a/trains/community/pigallery2/app_versions.json +++ b/trains/community/pigallery2/app_versions.json @@ -1,13 +1,13 @@ { - "1.0.5": { + "1.0.6": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/pigallery2/1.0.5", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/community/pigallery2/1.0.6", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "2.0.0_1.0.5", - "version": "1.0.5", + "human_version": "2.0.0_1.0.6", + "version": "1.0.6", "app_metadata": { "app_version": "2.0.0", "capabilities": [], @@ -22,8 +22,8 @@ "photo", "media" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -59,7 +59,7 @@ ], "title": "PiGallery2", "train": "community", - "version": "1.0.5" + "version": "1.0.6" }, "schema": { "groups": [ diff --git a/trains/community/piwigo/app_versions.json b/trains/community/piwigo/app_versions.json index 9364fe003a..e0bd0a22b6 100644 --- a/trains/community/piwigo/app_versions.json +++ b/trains/community/piwigo/app_versions.json @@ -1,13 +1,13 @@ { - "1.0.5": { + "1.0.6": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/piwigo/1.0.5", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/community/piwigo/1.0.6", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "14.5.0_1.0.5", - "version": "1.0.5", + "human_version": "14.5.0_1.0.6", + "version": "1.0.6", "app_metadata": { "app_version": "14.5.0", "capabilities": [ @@ -47,8 +47,8 @@ "photo", "gallery" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -82,7 +82,7 @@ ], "title": "Piwigo", "train": "community", - "version": "1.0.5" + "version": "1.0.6" }, "schema": { "groups": [ diff --git a/trains/community/planka/app_versions.json b/trains/community/planka/app_versions.json index f60585bd5a..a5d2864965 100644 --- a/trains/community/planka/app_versions.json +++ b/trains/community/planka/app_versions.json @@ -1,13 +1,13 @@ { - "1.0.10": { + "1.0.11": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/planka/1.0.10", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/community/planka/1.0.11", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "1.23.2_1.0.10", - "version": "1.0.10", + "human_version": "1.23.2_1.0.11", + "version": "1.0.11", "app_metadata": { "app_version": "1.23.2", "capabilities": [], @@ -23,8 +23,8 @@ "project", "task" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -58,7 +58,7 @@ ], "title": "Planka", "train": "community", - "version": "1.0.10" + "version": "1.0.11" }, "schema": { "groups": [ diff --git a/trains/community/plex-auto-languages/app_versions.json b/trains/community/plex-auto-languages/app_versions.json index d8f6027360..94bce6be90 100644 --- a/trains/community/plex-auto-languages/app_versions.json +++ b/trains/community/plex-auto-languages/app_versions.json @@ -1,13 +1,13 @@ { - "1.0.15": { + "1.0.16": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/plex-auto-languages/1.0.15", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/community/plex-auto-languages/1.0.16", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "v1.2.3_1.0.15", - "version": "1.0.15", + "human_version": "v1.2.3_1.0.16", + "version": "1.0.16", "app_metadata": { "app_version": "v1.2.3", "capabilities": [], @@ -22,8 +22,8 @@ "plex", "languages" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -48,7 +48,7 @@ ], "title": "Plex Auto Languages", "train": "community", - "version": "1.0.15" + "version": "1.0.16" }, "schema": { "groups": [ diff --git a/trains/community/portainer/app_versions.json b/trains/community/portainer/app_versions.json index 0330e95720..410cf2fb6f 100644 --- a/trains/community/portainer/app_versions.json +++ b/trains/community/portainer/app_versions.json @@ -1,13 +1,13 @@ { - "1.2.13": { + "1.2.14": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/portainer/1.2.13", - "last_update": "2024-10-15 12:58:57", + "location": "/__w/apps/apps/trains/community/portainer/1.2.14", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "2.23.0_1.2.13", - "version": "1.2.13", + "human_version": "2.23.0_1.2.14", + "version": "1.2.14", "app_metadata": { "app_version": "2.23.0", "capabilities": [ @@ -61,8 +61,8 @@ "compose", "container" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -90,7 +90,7 @@ ], "title": "Portainer", "train": "community", - "version": "1.2.13" + "version": "1.2.14" }, "schema": { "groups": [ diff --git a/trains/community/prowlarr/app_versions.json b/trains/community/prowlarr/app_versions.json index 4ceb72993b..da25fdcbf3 100644 --- a/trains/community/prowlarr/app_versions.json +++ b/trains/community/prowlarr/app_versions.json @@ -1,13 +1,13 @@ { - "1.2.12": { + "1.2.13": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/prowlarr/1.2.12", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/community/prowlarr/1.2.13", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "1.25.2.4794_1.2.12", - "version": "1.2.12", + "human_version": "1.25.2.4794_1.2.13", + "version": "1.2.13", "app_metadata": { "app_version": "1.25.2.4794", "capabilities": [], @@ -21,8 +21,8 @@ "keywords": [ "indexer" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -49,7 +49,7 @@ ], "title": "Prowlarr", "train": "community", - "version": "1.2.12" + "version": "1.2.13" }, "schema": { "groups": [ diff --git a/trains/community/qbittorrent/app_versions.json b/trains/community/qbittorrent/app_versions.json index ec4dfca2a0..e930236c32 100644 --- a/trains/community/qbittorrent/app_versions.json +++ b/trains/community/qbittorrent/app_versions.json @@ -1,13 +1,13 @@ { - "1.0.27": { + "1.0.28": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/qbittorrent/1.0.27", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/community/qbittorrent/1.0.28", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "5.0.0_1.0.27", - "version": "1.0.27", + "human_version": "5.0.0_1.0.28", + "version": "1.0.28", "app_metadata": { "app_version": "5.0.0", "capabilities": [], @@ -23,8 +23,8 @@ "torrent", "download" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -51,7 +51,7 @@ ], "title": "qBittorrent", "train": "community", - "version": "1.0.27" + "version": "1.0.28" }, "schema": { "groups": [ diff --git a/trains/community/radarr/app_versions.json b/trains/community/radarr/app_versions.json index ae51c0f948..436ab421ba 100644 --- a/trains/community/radarr/app_versions.json +++ b/trains/community/radarr/app_versions.json @@ -1,13 +1,13 @@ { - "1.1.11": { + "1.1.12": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/radarr/1.1.11", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/community/radarr/1.1.12", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "5.12.2.9335_1.1.11", - "version": "1.1.11", + "human_version": "5.12.2.9335_1.1.12", + "version": "1.1.12", "app_metadata": { "app_version": "5.12.2.9335", "capabilities": [], @@ -22,8 +22,8 @@ "media", "movies" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -53,7 +53,7 @@ ], "title": "Radarr", "train": "community", - "version": "1.1.11" + "version": "1.1.12" }, "schema": { "groups": [ diff --git a/trains/community/readarr/app_versions.json b/trains/community/readarr/app_versions.json index 375cb1a3fb..8456f4ab95 100644 --- a/trains/community/readarr/app_versions.json +++ b/trains/community/readarr/app_versions.json @@ -1,13 +1,13 @@ { - "1.0.18": { + "1.0.19": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/readarr/1.0.18", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/community/readarr/1.0.19", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "0.3.32.2587_1.0.18", - "version": "1.0.18", + "human_version": "0.3.32.2587_1.0.19", + "version": "1.0.19", "app_metadata": { "app_version": "0.3.32.2587", "capabilities": [], @@ -23,8 +23,8 @@ "ebook", "audiobook" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -53,7 +53,7 @@ ], "title": "Readarr", "train": "community", - "version": "1.0.18" + "version": "1.0.19" }, "schema": { "groups": [ diff --git a/trains/community/recyclarr/app_versions.json b/trains/community/recyclarr/app_versions.json index 484663b491..0532f02bc5 100644 --- a/trains/community/recyclarr/app_versions.json +++ b/trains/community/recyclarr/app_versions.json @@ -1,13 +1,13 @@ { - "1.0.7": { + "1.0.8": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/recyclarr/1.0.7", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/community/recyclarr/1.0.8", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "7.2.4_1.0.7", - "version": "1.0.7", + "human_version": "7.2.4_1.0.8", + "version": "1.0.8", "app_metadata": { "app_version": "7.2.4", "capabilities": [], @@ -23,8 +23,8 @@ "sonarr", "radarr" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -49,7 +49,7 @@ ], "title": "Recyclarr", "train": "community", - "version": "1.0.7" + "version": "1.0.8" }, "schema": { "groups": [ diff --git a/trains/community/redis/app_versions.json b/trains/community/redis/app_versions.json index c26981f19f..b3e08358a9 100644 --- a/trains/community/redis/app_versions.json +++ b/trains/community/redis/app_versions.json @@ -1,13 +1,13 @@ { - "1.0.6": { + "1.0.7": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/redis/1.0.6", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/community/redis/1.0.7", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "7.4.1_1.0.6", - "version": "1.0.6", + "human_version": "7.4.1_1.0.7", + "version": "1.0.7", "app_metadata": { "app_version": "7.4.1", "capabilities": [], @@ -21,8 +21,8 @@ "keywords": [ "cache" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -48,7 +48,7 @@ ], "title": "Redis", "train": "community", - "version": "1.0.6" + "version": "1.0.7" }, "schema": { "groups": [ diff --git a/trains/community/roundcube/app_versions.json b/trains/community/roundcube/app_versions.json index 82ffef29aa..51c79d549c 100644 --- a/trains/community/roundcube/app_versions.json +++ b/trains/community/roundcube/app_versions.json @@ -1,13 +1,13 @@ { - "1.0.6": { + "1.0.7": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/roundcube/1.0.6", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/community/roundcube/1.0.7", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "1.6.9-apache_1.0.6", - "version": "1.0.6", + "human_version": "1.6.9-apache_1.0.7", + "version": "1.0.7", "app_metadata": { "app_version": "1.6.9-apache", "capabilities": [ @@ -43,8 +43,8 @@ "webmail", "email" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -82,7 +82,7 @@ ], "title": "Roundcube", "train": "community", - "version": "1.0.6" + "version": "1.0.7" }, "schema": { "groups": [ diff --git a/trains/community/rsyncd/app_versions.json b/trains/community/rsyncd/app_versions.json index 7df73b2cd8..59f8c1bd8a 100644 --- a/trains/community/rsyncd/app_versions.json +++ b/trains/community/rsyncd/app_versions.json @@ -1,13 +1,13 @@ { - "1.0.13": { + "1.0.14": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/rsyncd/1.0.13", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/community/rsyncd/1.0.14", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "1.0.0_1.0.13", - "version": "1.0.13", + "human_version": "1.0.0_1.0.14", + "version": "1.0.14", "app_metadata": { "app_version": "1.0.0", "capabilities": [ @@ -48,8 +48,8 @@ "rsync", "file transfer" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -74,7 +74,7 @@ ], "title": "Rsync Daemon", "train": "community", - "version": "1.0.13" + "version": "1.0.14" }, "schema": { "groups": [ diff --git a/trains/community/rust-desk/app_versions.json b/trains/community/rust-desk/app_versions.json index a39f2e18a5..fb96ec3cb2 100644 --- a/trains/community/rust-desk/app_versions.json +++ b/trains/community/rust-desk/app_versions.json @@ -1,13 +1,13 @@ { - "1.0.6": { + "1.0.7": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/rust-desk/1.0.6", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/community/rust-desk/1.0.7", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "1.1.11-1_1.0.6", - "version": "1.0.6", + "human_version": "1.1.11-1_1.0.7", + "version": "1.0.7", "app_metadata": { "app_version": "1.1.11-1", "capabilities": [], @@ -22,8 +22,8 @@ "remote", "desktop" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -48,7 +48,7 @@ ], "title": "Rust Desk", "train": "community", - "version": "1.0.6" + "version": "1.0.7" }, "schema": { "groups": [ diff --git a/trains/community/sabnzbd/app_versions.json b/trains/community/sabnzbd/app_versions.json index 37971f5f8d..6a6af62603 100644 --- a/trains/community/sabnzbd/app_versions.json +++ b/trains/community/sabnzbd/app_versions.json @@ -1,13 +1,13 @@ { - "1.0.6": { + "1.0.7": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/sabnzbd/1.0.6", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/community/sabnzbd/1.0.7", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "4.3.3_1.0.6", - "version": "1.0.6", + "human_version": "4.3.3_1.0.7", + "version": "1.0.7", "app_metadata": { "app_version": "4.3.3", "capabilities": [], @@ -23,8 +23,8 @@ "usenet", "newsreader" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -53,7 +53,7 @@ ], "title": "SABnzbd", "train": "community", - "version": "1.0.6" + "version": "1.0.7" }, "schema": { "groups": [ diff --git a/trains/community/searxng/app_versions.json b/trains/community/searxng/app_versions.json index 3b98b8cdfc..7361b057c1 100644 --- a/trains/community/searxng/app_versions.json +++ b/trains/community/searxng/app_versions.json @@ -1,13 +1,13 @@ { - "1.0.15": { + "1.0.16": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/searxng/1.0.15", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/community/searxng/1.0.16", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "2024.10.4-3e747d049_1.0.15", - "version": "1.0.15", + "human_version": "2024.10.4-3e747d049_1.0.16", + "version": "1.0.16", "app_metadata": { "app_version": "2024.10.4-3e747d049", "capabilities": [ @@ -30,8 +30,8 @@ "keywords": [ "search" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -56,7 +56,7 @@ ], "title": "SearXNG", "train": "community", - "version": "1.0.15" + "version": "1.0.16" }, "schema": { "groups": [ diff --git a/trains/community/sftpgo/app_versions.json b/trains/community/sftpgo/app_versions.json index 3bdc92b6ff..17af143e52 100644 --- a/trains/community/sftpgo/app_versions.json +++ b/trains/community/sftpgo/app_versions.json @@ -1,13 +1,13 @@ { - "1.0.6": { + "1.0.7": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/sftpgo/1.0.6", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/community/sftpgo/1.0.7", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "2.6.2_1.0.6", - "version": "1.0.6", + "human_version": "2.6.2_1.0.7", + "version": "1.0.7", "app_metadata": { "app_version": "2.6.2", "capabilities": [], @@ -21,8 +21,8 @@ "keywords": [ "sftp" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -47,7 +47,7 @@ ], "title": "SFTPGo", "train": "community", - "version": "1.0.6" + "version": "1.0.7" }, "schema": { "groups": [ diff --git a/trains/community/sonarr/app_versions.json b/trains/community/sonarr/app_versions.json index c12ed1fad0..a33e95f246 100644 --- a/trains/community/sonarr/app_versions.json +++ b/trains/community/sonarr/app_versions.json @@ -1,13 +1,13 @@ { - "1.0.18": { + "1.0.19": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/sonarr/1.0.18", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/community/sonarr/1.0.19", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "4.0.9.2244_1.0.18", - "version": "1.0.18", + "human_version": "4.0.9.2244_1.0.19", + "version": "1.0.19", "app_metadata": { "app_version": "4.0.9.2244", "capabilities": [], @@ -22,8 +22,8 @@ "media", "series" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -52,7 +52,7 @@ ], "title": "Sonarr", "train": "community", - "version": "1.0.18" + "version": "1.0.19" }, "schema": { "groups": [ diff --git a/trains/community/tailscale/app_versions.json b/trains/community/tailscale/app_versions.json index e18a5cd5b7..236177ef92 100644 --- a/trains/community/tailscale/app_versions.json +++ b/trains/community/tailscale/app_versions.json @@ -1,13 +1,13 @@ { - "1.1.14": { + "1.1.15": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/tailscale/1.1.14", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/community/tailscale/1.1.15", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "v1.74.1_1.1.14", - "version": "1.1.14", + "human_version": "v1.74.1_1.1.15", + "version": "1.1.15", "app_metadata": { "app_version": "v1.74.1", "capabilities": [ @@ -52,8 +52,8 @@ "vpn", "tailscale" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -78,7 +78,7 @@ ], "title": "Tailscale", "train": "community", - "version": "1.1.14" + "version": "1.1.15" }, "schema": { "groups": [ diff --git a/trains/community/tautulli/app_versions.json b/trains/community/tautulli/app_versions.json index 4c38c18c5c..d690d0ba22 100644 --- a/trains/community/tautulli/app_versions.json +++ b/trains/community/tautulli/app_versions.json @@ -1,13 +1,13 @@ { - "1.0.20": { + "1.0.21": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/tautulli/1.0.20", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/community/tautulli/1.0.21", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "v2.14.6_1.0.20", - "version": "1.0.20", + "human_version": "v2.14.6_1.0.21", + "version": "1.0.21", "app_metadata": { "app_version": "v2.14.6", "capabilities": [], @@ -23,8 +23,8 @@ "analytics", "notifications" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -54,7 +54,7 @@ ], "title": "Tautulli", "train": "community", - "version": "1.0.20" + "version": "1.0.21" }, "schema": { "groups": [ diff --git a/trains/community/tdarr/app_versions.json b/trains/community/tdarr/app_versions.json index a349cffd12..6413efbd14 100644 --- a/trains/community/tdarr/app_versions.json +++ b/trains/community/tdarr/app_versions.json @@ -1,13 +1,13 @@ { - "1.0.8": { + "1.0.9": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/tdarr/1.0.8", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/community/tdarr/1.0.9", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "2.26.01_1.0.8", - "version": "1.0.8", + "human_version": "2.26.01_1.0.9", + "version": "1.0.9", "app_metadata": { "app_version": "2.26.01", "capabilities": [ @@ -39,8 +39,8 @@ "encode", "transcode" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -69,7 +69,7 @@ ], "title": "Tdarr", "train": "community", - "version": "1.0.8" + "version": "1.0.9" }, "schema": { "groups": [ diff --git a/trains/community/terraria/app_versions.json b/trains/community/terraria/app_versions.json index 708c072e63..90fa72c690 100644 --- a/trains/community/terraria/app_versions.json +++ b/trains/community/terraria/app_versions.json @@ -1,13 +1,13 @@ { - "1.0.5": { + "1.0.6": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/terraria/1.0.5", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/community/terraria/1.0.6", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "tshock-1.4.4.9-5.2.0-3_1.0.5", - "version": "1.0.5", + "human_version": "tshock-1.4.4.9-5.2.0-3_1.0.6", + "version": "1.0.6", "app_metadata": { "app_version": "tshock-1.4.4.9-5.2.0-3", "capabilities": [], @@ -25,8 +25,8 @@ "terraria", "world" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -51,7 +51,7 @@ ], "title": "Terraria", "train": "community", - "version": "1.0.5" + "version": "1.0.6" }, "schema": { "groups": [ diff --git a/trains/community/tftpd-hpa/app_versions.json b/trains/community/tftpd-hpa/app_versions.json index ae40c0fb83..759ce41f8d 100644 --- a/trains/community/tftpd-hpa/app_versions.json +++ b/trains/community/tftpd-hpa/app_versions.json @@ -1,13 +1,13 @@ { - "1.0.9": { + "1.0.10": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/tftpd-hpa/1.0.9", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/community/tftpd-hpa/1.0.10", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "1.0.0_1.0.9", - "version": "1.0.9", + "human_version": "1.0.0_1.0.10", + "version": "1.0.10", "app_metadata": { "app_version": "1.0.0", "capabilities": [ @@ -39,8 +39,8 @@ "tftp", "netboot" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -65,7 +65,7 @@ ], "title": "TFTP Server", "train": "community", - "version": "1.0.9" + "version": "1.0.10" }, "schema": { "groups": [ diff --git a/trains/community/tiny-media-manager/app_versions.json b/trains/community/tiny-media-manager/app_versions.json index f6a080dd57..58bbd3e0c9 100644 --- a/trains/community/tiny-media-manager/app_versions.json +++ b/trains/community/tiny-media-manager/app_versions.json @@ -1,13 +1,13 @@ { - "1.0.5": { + "1.0.6": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/tiny-media-manager/1.0.5", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/community/tiny-media-manager/1.0.6", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "5.0.12_1.0.5", - "version": "1.0.5", + "human_version": "5.0.12_1.0.6", + "version": "1.0.6", "app_metadata": { "app_version": "5.0.12", "capabilities": [ @@ -36,8 +36,8 @@ "tv-shows", "movies" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -67,7 +67,7 @@ ], "title": "Tiny Media Manager", "train": "community", - "version": "1.0.5" + "version": "1.0.6" }, "schema": { "groups": [ diff --git a/trains/community/transmission/app_versions.json b/trains/community/transmission/app_versions.json index 1afb4ba1d9..e179d3bcf7 100644 --- a/trains/community/transmission/app_versions.json +++ b/trains/community/transmission/app_versions.json @@ -1,13 +1,13 @@ { - "1.0.5": { + "1.0.6": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/transmission/1.0.5", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/community/transmission/1.0.6", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "4.0.6_1.0.5", - "version": "1.0.5", + "human_version": "4.0.6_1.0.6", + "version": "1.0.6", "app_metadata": { "app_version": "4.0.6", "capabilities": [], @@ -23,8 +23,8 @@ "torrent", "download" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -49,7 +49,7 @@ ], "title": "Transmission", "train": "community", - "version": "1.0.5" + "version": "1.0.6" }, "schema": { "groups": [ diff --git a/trains/community/twofactor-auth/app_versions.json b/trains/community/twofactor-auth/app_versions.json index ce248d47a4..cace97d128 100644 --- a/trains/community/twofactor-auth/app_versions.json +++ b/trains/community/twofactor-auth/app_versions.json @@ -1,13 +1,13 @@ { - "1.0.6": { + "1.0.7": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/twofactor-auth/1.0.6", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/community/twofactor-auth/1.0.7", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "5.3.1_1.0.6", - "version": "1.0.6", + "human_version": "5.3.1_1.0.7", + "version": "1.0.7", "app_metadata": { "app_version": "5.3.1", "capabilities": [], @@ -23,8 +23,8 @@ "2fa", "otp" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -51,7 +51,7 @@ ], "title": "2FAuth", "train": "community", - "version": "1.0.6" + "version": "1.0.7" }, "schema": { "groups": [ diff --git a/trains/community/unifi-controller/app_versions.json b/trains/community/unifi-controller/app_versions.json index 35bd0ed75e..73b159c8fd 100644 --- a/trains/community/unifi-controller/app_versions.json +++ b/trains/community/unifi-controller/app_versions.json @@ -1,13 +1,13 @@ { - "1.2.10": { + "1.2.11": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/unifi-controller/1.2.10", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/community/unifi-controller/1.2.11", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "8.5.6_1.2.10", - "version": "1.2.10", + "human_version": "8.5.6_1.2.11", + "version": "1.2.11", "app_metadata": { "app_version": "8.5.6", "capabilities": [], @@ -23,8 +23,8 @@ "unifi", "network" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -50,7 +50,7 @@ ], "title": "Unifi Controller", "train": "community", - "version": "1.2.10" + "version": "1.2.11" }, "schema": { "groups": [ diff --git a/trains/community/unifi-protect-backup/app_versions.json b/trains/community/unifi-protect-backup/app_versions.json index 8bd60c0d78..3edc86cf36 100644 --- a/trains/community/unifi-protect-backup/app_versions.json +++ b/trains/community/unifi-protect-backup/app_versions.json @@ -1,13 +1,13 @@ { - "1.0.16": { + "1.0.17": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/unifi-protect-backup/1.0.16", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/community/unifi-protect-backup/1.0.17", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "0.11.0_1.0.16", - "version": "1.0.16", + "human_version": "0.11.0_1.0.17", + "version": "1.0.17", "app_metadata": { "app_version": "0.11.0", "capabilities": [ @@ -39,8 +39,8 @@ "backup", "unifi-protect" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -65,7 +65,7 @@ ], "title": "Unifi Protect Backup", "train": "community", - "version": "1.0.16" + "version": "1.0.17" }, "schema": { "groups": [ diff --git a/trains/community/vaultwarden/app_versions.json b/trains/community/vaultwarden/app_versions.json index 029d6a8500..a87590fe81 100644 --- a/trains/community/vaultwarden/app_versions.json +++ b/trains/community/vaultwarden/app_versions.json @@ -1,13 +1,13 @@ { - "1.0.6": { + "1.0.7": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/vaultwarden/1.0.6", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/community/vaultwarden/1.0.7", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "1.32.2_1.0.6", - "version": "1.0.6", + "human_version": "1.32.2_1.0.7", + "version": "1.0.7", "app_metadata": { "app_version": "1.32.2", "capabilities": [], @@ -22,8 +22,8 @@ "password", "manager" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -56,7 +56,7 @@ ], "title": "Vaultwarden", "train": "community", - "version": "1.0.6" + "version": "1.0.7" }, "schema": { "groups": [ diff --git a/trains/community/vikunja/app_versions.json b/trains/community/vikunja/app_versions.json index 45069be071..a1f3154c63 100644 --- a/trains/community/vikunja/app_versions.json +++ b/trains/community/vikunja/app_versions.json @@ -1,13 +1,13 @@ { - "1.2.13": { + "1.2.14": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/vikunja/1.2.13", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/community/vikunja/1.2.14", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "0.24.4_1.2.13", - "version": "1.2.13", + "human_version": "0.24.4_1.2.14", + "version": "1.2.14", "app_metadata": { "app_version": "0.24.4", "capabilities": [], @@ -21,8 +21,8 @@ "keywords": [ "todo" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -71,7 +71,7 @@ ], "title": "Vikunja", "train": "community", - "version": "1.2.13" + "version": "1.2.14" }, "schema": { "groups": [ diff --git a/trains/community/webdav/app_versions.json b/trains/community/webdav/app_versions.json index bd040680e6..099451540a 100644 --- a/trains/community/webdav/app_versions.json +++ b/trains/community/webdav/app_versions.json @@ -1,13 +1,13 @@ { - "1.0.12": { + "1.0.13": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/webdav/1.0.12", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/community/webdav/1.0.13", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "2.4.62_1.0.12", - "version": "1.0.12", + "human_version": "2.4.62_1.0.13", + "version": "1.0.13", "app_metadata": { "app_version": "2.4.62", "capabilities": [], @@ -22,8 +22,8 @@ "webdav", "file-sharing" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -47,7 +47,7 @@ ], "title": "WebDAV", "train": "community", - "version": "1.0.12" + "version": "1.0.13" }, "schema": { "groups": [ diff --git a/trains/community/whoogle/app_versions.json b/trains/community/whoogle/app_versions.json index 9ed5f9694f..2f3d732bc9 100644 --- a/trains/community/whoogle/app_versions.json +++ b/trains/community/whoogle/app_versions.json @@ -1,13 +1,13 @@ { - "1.0.19": { + "1.0.20": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/whoogle/1.0.19", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/community/whoogle/1.0.20", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "0.9.0_1.0.19", - "version": "1.0.19", + "human_version": "0.9.0_1.0.20", + "version": "1.0.20", "app_metadata": { "app_version": "0.9.0", "capabilities": [], @@ -22,8 +22,8 @@ "search", "engine" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -51,7 +51,7 @@ ], "title": "Whoogle", "train": "community", - "version": "1.0.19" + "version": "1.0.20" }, "schema": { "groups": [ diff --git a/trains/community/wordpress/app_versions.json b/trains/community/wordpress/app_versions.json index 5fe49bd34b..9375c6b79e 100644 --- a/trains/community/wordpress/app_versions.json +++ b/trains/community/wordpress/app_versions.json @@ -1,13 +1,13 @@ { - "1.0.6": { + "1.0.7": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/wordpress/1.0.6", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/community/wordpress/1.0.7", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "6.6.2_1.0.6", - "version": "1.0.6", + "human_version": "6.6.2_1.0.7", + "version": "1.0.7", "app_metadata": { "app_version": "6.6.2", "capabilities": [ @@ -27,8 +27,8 @@ "cms", "blog" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -64,7 +64,7 @@ ], "title": "Wordpress", "train": "community", - "version": "1.0.6" + "version": "1.0.7" }, "schema": { "groups": [ diff --git a/trains/community/zerotier/app_versions.json b/trains/community/zerotier/app_versions.json index 63f64550fb..dd1c3b7aef 100644 --- a/trains/community/zerotier/app_versions.json +++ b/trains/community/zerotier/app_versions.json @@ -1,13 +1,13 @@ { - "1.0.18": { + "1.0.19": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/zerotier/1.0.18", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/community/zerotier/1.0.19", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "1.14.1_1.0.18", - "version": "1.0.18", + "human_version": "1.14.1_1.0.19", + "version": "1.0.19", "app_metadata": { "app_version": "1.14.1", "capabilities": [ @@ -72,8 +72,8 @@ "vpn", "zerotier" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -98,7 +98,7 @@ ], "title": "Zerotier", "train": "community", - "version": "1.0.18" + "version": "1.0.19" }, "schema": { "groups": [ diff --git a/trains/enterprise/minio/app_versions.json b/trains/enterprise/minio/app_versions.json index 5c755b8b28..1052fe2134 100644 --- a/trains/enterprise/minio/app_versions.json +++ b/trains/enterprise/minio/app_versions.json @@ -1,13 +1,13 @@ { - "1.1.6": { + "1.1.7": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/enterprise/minio/1.1.6", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/enterprise/minio/1.1.7", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "RELEASE.2024-08-26T15-33-07Z_1.1.6", - "version": "1.1.6", + "human_version": "RELEASE.2024-08-26T15-33-07Z_1.1.7", + "version": "1.1.7", "app_metadata": { "app_version": "RELEASE.2024-08-26T15-33-07Z", "capabilities": [], @@ -24,8 +24,8 @@ "cloud", "s3" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -52,7 +52,7 @@ ], "title": "MinIO", "train": "enterprise", - "version": "1.1.6" + "version": "1.1.7" }, "schema": { "groups": [ diff --git a/trains/enterprise/syncthing/app_versions.json b/trains/enterprise/syncthing/app_versions.json index 2e0cab1256..80f71710e8 100644 --- a/trains/enterprise/syncthing/app_versions.json +++ b/trains/enterprise/syncthing/app_versions.json @@ -1,13 +1,13 @@ { - "1.0.14": { + "1.0.15": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/enterprise/syncthing/1.0.14", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/enterprise/syncthing/1.0.15", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "1.27.10_1.0.14", - "version": "1.0.14", + "human_version": "1.27.10_1.0.15", + "version": "1.0.15", "app_metadata": { "app_version": "1.27.10", "capabilities": [ @@ -55,8 +55,8 @@ "sync", "file-sharing" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -87,7 +87,7 @@ ], "title": "Syncthing", "train": "enterprise", - "version": "1.0.14" + "version": "1.0.15" }, "schema": { "groups": [ diff --git a/trains/stable/collabora/app_versions.json b/trains/stable/collabora/app_versions.json index 787f65dda9..f0a97474ec 100644 --- a/trains/stable/collabora/app_versions.json +++ b/trains/stable/collabora/app_versions.json @@ -1,13 +1,13 @@ { - "1.1.14": { + "1.1.15": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/stable/collabora/1.1.14", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/stable/collabora/1.1.15", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "24.04.8.2.1_1.1.14", - "version": "1.1.14", + "human_version": "24.04.8.2.1_1.1.15", + "version": "1.1.15", "app_metadata": { "app_version": "24.04.8.2.1", "capabilities": [ @@ -56,8 +56,8 @@ "documents", "productivity" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -92,7 +92,7 @@ ], "title": "Collabora", "train": "stable", - "version": "1.1.14" + "version": "1.1.15" }, "schema": { "groups": [ diff --git a/trains/stable/diskoverdata/app_versions.json b/trains/stable/diskoverdata/app_versions.json index 3f3a694bb6..b54fe30312 100644 --- a/trains/stable/diskoverdata/app_versions.json +++ b/trains/stable/diskoverdata/app_versions.json @@ -1,13 +1,13 @@ { - "1.3.7": { + "1.3.8": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/stable/diskoverdata/1.3.7", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/stable/diskoverdata/1.3.8", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "2.3.0_1.3.7", - "version": "1.3.7", + "human_version": "2.3.0_1.3.8", + "version": "1.3.8", "app_metadata": { "app_version": "2.3.0", "capabilities": [ @@ -49,8 +49,8 @@ "management", "discovery" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -86,7 +86,7 @@ ], "title": "Diskover Data", "train": "stable", - "version": "1.3.7" + "version": "1.3.8" }, "schema": { "groups": [ diff --git a/trains/stable/elastic-search/app_versions.json b/trains/stable/elastic-search/app_versions.json index c706cd203e..e3d296fa73 100644 --- a/trains/stable/elastic-search/app_versions.json +++ b/trains/stable/elastic-search/app_versions.json @@ -1,13 +1,13 @@ { - "1.1.11": { + "1.1.12": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/stable/elastic-search/1.1.11", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/stable/elastic-search/1.1.12", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "8.15.2_1.1.11", - "version": "1.1.11", + "human_version": "8.15.2_1.1.12", + "version": "1.1.12", "app_metadata": { "app_version": "8.15.2", "capabilities": [], @@ -22,8 +22,8 @@ "search", "elastic" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -49,7 +49,7 @@ ], "title": "Elastic Search", "train": "stable", - "version": "1.1.11" + "version": "1.1.12" }, "schema": { "groups": [ diff --git a/trains/stable/emby/app_versions.json b/trains/stable/emby/app_versions.json index acbe07066a..c7d82de56a 100644 --- a/trains/stable/emby/app_versions.json +++ b/trains/stable/emby/app_versions.json @@ -1,13 +1,13 @@ { - "1.1.12": { + "1.1.13": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/stable/emby/1.1.12", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/stable/emby/1.1.13", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "4.8.10.0_1.1.12", - "version": "1.1.12", + "human_version": "4.8.10.0_1.1.13", + "version": "1.1.13", "app_metadata": { "app_version": "4.8.10.0", "capabilities": [ @@ -52,8 +52,8 @@ "tv", "streaming" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -82,7 +82,7 @@ ], "title": "Emby Server", "train": "stable", - "version": "1.1.12" + "version": "1.1.13" }, "schema": { "groups": [ diff --git a/trains/stable/home-assistant/app_versions.json b/trains/stable/home-assistant/app_versions.json index e086368e9d..43ee71e687 100644 --- a/trains/stable/home-assistant/app_versions.json +++ b/trains/stable/home-assistant/app_versions.json @@ -1,13 +1,13 @@ { - "1.2.20": { + "1.2.21": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/stable/home-assistant/1.2.20", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/stable/home-assistant/1.2.21", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "2024.10.2_1.2.20", - "version": "1.2.20", + "human_version": "2024.10.2_1.2.21", + "version": "1.2.21", "app_metadata": { "app_version": "2024.10.2", "capabilities": [ @@ -43,8 +43,8 @@ "home-automation", "assistant" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -78,7 +78,7 @@ ], "title": "Home Assistant", "train": "stable", - "version": "1.2.20" + "version": "1.2.21" }, "schema": { "groups": [ diff --git a/trains/stable/ix-app/app_versions.json b/trains/stable/ix-app/app_versions.json index c1b5f8b723..1007f527a6 100644 --- a/trains/stable/ix-app/app_versions.json +++ b/trains/stable/ix-app/app_versions.json @@ -1,13 +1,13 @@ { - "1.0.10": { + "1.0.11": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/stable/ix-app/1.0.10", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/stable/ix-app/1.0.11", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "1.0.0_1.0.10", - "version": "1.0.10", + "human_version": "1.0.0_1.0.11", + "version": "1.0.11", "app_metadata": { "app_version": "1.0.0", "capabilities": [], @@ -19,8 +19,8 @@ "host_mounts": [], "icon": "https://media.sys.truenas.net/apps/ix-chart/icons/icon.webp", "keywords": [], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -34,7 +34,7 @@ "sources": [], "title": "iX App", "train": "stable", - "version": "1.0.10" + "version": "1.0.11" }, "schema": { "groups": [ diff --git a/trains/stable/minio/app_versions.json b/trains/stable/minio/app_versions.json index 3c586445e8..eae5ad5527 100644 --- a/trains/stable/minio/app_versions.json +++ b/trains/stable/minio/app_versions.json @@ -1,13 +1,13 @@ { - "1.1.12": { + "1.1.13": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/stable/minio/1.1.12", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/stable/minio/1.1.13", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "RELEASE.2024-10-13T13-34-11Z_1.1.12", - "version": "1.1.12", + "human_version": "RELEASE.2024-10-13T13-34-11Z_1.1.13", + "version": "1.1.13", "app_metadata": { "app_version": "RELEASE.2024-10-13T13-34-11Z", "capabilities": [], @@ -23,8 +23,8 @@ "object-storage", "S3" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -52,7 +52,7 @@ ], "title": "MinIO", "train": "stable", - "version": "1.1.12" + "version": "1.1.13" }, "schema": { "groups": [ diff --git a/trains/stable/netdata/app_versions.json b/trains/stable/netdata/app_versions.json index 7d0d7c3cfd..cfd011e24e 100644 --- a/trains/stable/netdata/app_versions.json +++ b/trains/stable/netdata/app_versions.json @@ -1,13 +1,13 @@ { - "1.1.13": { + "1.1.14": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/stable/netdata/1.1.13", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/stable/netdata/1.1.14", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "v1.47.4_1.1.13", - "version": "1.1.13", + "human_version": "v1.47.4_1.1.14", + "version": "1.1.14", "app_metadata": { "app_version": "v1.47.4", "capabilities": [ @@ -73,8 +73,8 @@ "metric", "monitoring" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -105,7 +105,7 @@ ], "title": "Netdata", "train": "stable", - "version": "1.1.13" + "version": "1.1.14" }, "schema": { "groups": [ diff --git a/trains/stable/nextcloud/app_versions.json b/trains/stable/nextcloud/app_versions.json index 539fe8ff0e..1ec589fb7d 100644 --- a/trains/stable/nextcloud/app_versions.json +++ b/trains/stable/nextcloud/app_versions.json @@ -1,13 +1,13 @@ { - "1.3.19": { + "1.3.20": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/stable/nextcloud/1.3.19", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/stable/nextcloud/1.3.20", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "30.0.0_1.3.19", - "version": "1.3.19", + "human_version": "30.0.0_1.3.20", + "version": "1.3.20", "app_metadata": { "app_version": "30.0.0", "capabilities": [ @@ -55,8 +55,8 @@ "web", "php" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -107,7 +107,7 @@ ], "title": "Nextcloud", "train": "stable", - "version": "1.3.19" + "version": "1.3.20" }, "schema": { "groups": [ diff --git a/trains/stable/photoprism/app_versions.json b/trains/stable/photoprism/app_versions.json index 547a91bf76..f76b9312e0 100644 --- a/trains/stable/photoprism/app_versions.json +++ b/trains/stable/photoprism/app_versions.json @@ -1,13 +1,13 @@ { - "1.1.13": { + "1.1.14": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/stable/photoprism/1.1.13", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/stable/photoprism/1.1.14", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "240915_1.1.13", - "version": "1.1.13", + "human_version": "240915_1.1.14", + "version": "1.1.14", "app_metadata": { "app_version": "240915", "capabilities": [ @@ -48,8 +48,8 @@ "photos", "image" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -76,7 +76,7 @@ ], "title": "Photoprism", "train": "stable", - "version": "1.1.13" + "version": "1.1.14" }, "schema": { "groups": [ diff --git a/trains/stable/pihole/app_versions.json b/trains/stable/pihole/app_versions.json index 10170cd6c0..c660c6a333 100644 --- a/trains/stable/pihole/app_versions.json +++ b/trains/stable/pihole/app_versions.json @@ -1,13 +1,13 @@ { - "1.1.10": { + "1.1.11": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/stable/pihole/1.1.10", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/stable/pihole/1.1.11", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "2024.07.0_1.1.10", - "version": "1.1.10", + "human_version": "2024.07.0_1.1.11", + "version": "1.1.11", "app_metadata": { "app_version": "2024.07.0", "capabilities": [ @@ -71,8 +71,8 @@ "networking", "dns" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -99,7 +99,7 @@ ], "title": "Pi-hole", "train": "stable", - "version": "1.1.10" + "version": "1.1.11" }, "schema": { "groups": [ diff --git a/trains/stable/plex/app_versions.json b/trains/stable/plex/app_versions.json index d13f376f73..8022df6c6a 100644 --- a/trains/stable/plex/app_versions.json +++ b/trains/stable/plex/app_versions.json @@ -1,13 +1,13 @@ { - "1.0.22": { + "1.0.23": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/stable/plex/1.0.22", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/stable/plex/1.0.23", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "1.40.2.8395-c67dce28e_1.0.22", - "version": "1.0.22", + "human_version": "1.40.2.8395-c67dce28e_1.0.23", + "version": "1.0.23", "app_metadata": { "app_version": "1.40.2.8395-c67dce28e", "capabilities": [ @@ -52,8 +52,8 @@ "tv", "streaming" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -81,7 +81,7 @@ ], "title": "Plex", "train": "stable", - "version": "1.0.22" + "version": "1.0.23" }, "schema": { "groups": [ diff --git a/trains/stable/prometheus/app_versions.json b/trains/stable/prometheus/app_versions.json index f7038101f1..b6222824d1 100644 --- a/trains/stable/prometheus/app_versions.json +++ b/trains/stable/prometheus/app_versions.json @@ -1,13 +1,13 @@ { - "1.1.10": { + "1.1.11": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/stable/prometheus/1.1.10", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/stable/prometheus/1.1.11", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "v2.54.1_1.1.10", - "version": "1.1.10", + "human_version": "v2.54.1_1.1.11", + "version": "1.1.11", "app_metadata": { "app_version": "v2.54.1", "capabilities": [], @@ -22,8 +22,8 @@ "metrics", "prometheus" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -51,7 +51,7 @@ ], "title": "Prometheus", "train": "stable", - "version": "1.1.10" + "version": "1.1.11" }, "schema": { "groups": [ diff --git a/trains/stable/storj/app_versions.json b/trains/stable/storj/app_versions.json index 80f58babd9..8fcdfc0b9b 100644 --- a/trains/stable/storj/app_versions.json +++ b/trains/stable/storj/app_versions.json @@ -1,13 +1,13 @@ { - "1.1.9": { + "1.1.10": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/stable/storj/1.1.9", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/stable/storj/1.1.10", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "6f87ea801-v1.71.2-go1.18.8_1.1.9", - "version": "1.1.9", + "human_version": "6f87ea801-v1.71.2-go1.18.8_1.1.10", + "version": "1.1.10", "app_metadata": { "app_version": "6f87ea801-v1.71.2-go1.18.8", "capabilities": [ @@ -37,8 +37,8 @@ "financial", "file-sharing" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -64,7 +64,7 @@ ], "title": "Storj", "train": "stable", - "version": "1.1.9" + "version": "1.1.10" }, "schema": { "groups": [ diff --git a/trains/stable/syncthing/app_versions.json b/trains/stable/syncthing/app_versions.json index 7135bb3efa..2a56ace35c 100644 --- a/trains/stable/syncthing/app_versions.json +++ b/trains/stable/syncthing/app_versions.json @@ -1,13 +1,13 @@ { - "1.0.26": { + "1.0.27": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/stable/syncthing/1.0.26", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/stable/syncthing/1.0.27", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "1.27.12_1.0.26", - "version": "1.0.26", + "human_version": "1.27.12_1.0.27", + "version": "1.0.27", "app_metadata": { "app_version": "1.27.12", "capabilities": [ @@ -56,8 +56,8 @@ "file-sharing", "backup" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -88,7 +88,7 @@ ], "title": "Syncthing", "train": "stable", - "version": "1.0.26" + "version": "1.0.27" }, "schema": { "groups": [ diff --git a/trains/stable/wg-easy/app_versions.json b/trains/stable/wg-easy/app_versions.json index 6063d65435..56be60cdcb 100644 --- a/trains/stable/wg-easy/app_versions.json +++ b/trains/stable/wg-easy/app_versions.json @@ -1,13 +1,13 @@ { - "1.0.19": { + "1.0.20": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/stable/wg-easy/1.0.19", - "last_update": "2024-10-15 12:57:40", + "location": "/__w/apps/apps/trains/stable/wg-easy/1.0.20", + "last_update": "2024-10-16 17:52:00", "required_features": [], - "human_version": "14_1.0.19", - "version": "1.0.19", + "human_version": "14_1.0.20", + "version": "1.0.20", "app_metadata": { "app_version": "14", "capabilities": [ @@ -36,8 +36,8 @@ "network", "vpn" ], - "lib_version": "1.1.3", - "lib_version_hash": "2aa61e120fd30dd72800bea5d56ad12793d4a6b74cf69140780d51add22c7768", + "lib_version": "1.1.4", + "lib_version_hash": "6e32ff5969906d9c3a10fea2b17fdd3197afb052d3432344da03188d8a907113", "maintainers": [ { "email": "dev@ixsystems.com", @@ -63,7 +63,7 @@ ], "title": "WG Easy", "train": "stable", - "version": "1.0.19" + "version": "1.0.20" }, "schema": { "groups": [ diff --git a/trains/test/nginx/app_versions.json b/trains/test/nginx/app_versions.json index 1bb77f8538..439f24ad3f 100644 --- a/trains/test/nginx/app_versions.json +++ b/trains/test/nginx/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/test/nginx/1.0.6", - "last_update": "2024-10-15 12:57:40", + "last_update": "2024-10-16 17:50:40", "required_features": [], "human_version": "v1_1.0.6", "version": "1.0.6", @@ -107,7 +107,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/test/nginx/1.0.5", - "last_update": "2024-10-15 12:57:40", + "last_update": "2024-10-16 17:50:40", "required_features": [], "human_version": "v1_1.0.5", "version": "1.0.5", @@ -200,7 +200,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/test/nginx/1.0.4", - "last_update": "2024-10-15 12:57:40", + "last_update": "2024-10-16 17:50:40", "required_features": [], "human_version": "v1_1.0.4", "version": "1.0.4", @@ -293,7 +293,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/test/nginx/1.0.3", - "last_update": "2024-10-15 12:57:40", + "last_update": "2024-10-16 17:50:40", "required_features": [], "human_version": "v1_1.0.3", "version": "1.0.3", diff --git a/trains/test/other-nginx/app_versions.json b/trains/test/other-nginx/app_versions.json index c20765eb73..95b9dc6234 100644 --- a/trains/test/other-nginx/app_versions.json +++ b/trains/test/other-nginx/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/test/other-nginx/1.0.1", - "last_update": "2024-10-15 12:57:40", + "last_update": "2024-10-16 17:50:40", "required_features": [], "human_version": "v1_1.0.1", "version": "1.0.1", @@ -97,7 +97,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/test/other-nginx/1.0.0", - "last_update": "2024-10-15 12:57:40", + "last_update": "2024-10-16 17:50:40", "required_features": [], "human_version": "v1_1.0.0", "version": "1.0.0", From 38225e8e7757677f6da90d79da00c694c6f1164d Mon Sep 17 00:00:00 2001 From: truenasbot <113129203+truenasbot@users.noreply.github.com> Date: Wed, 16 Oct 2024 15:05:21 -0400 Subject: [PATCH 04/13] chore(deps): update updates-patch-minor (#665) Co-authored-by: bugclerk --- ix-dev/community/castopod/app.yaml | 4 ++-- ix-dev/community/castopod/ix_values.yaml | 4 ++-- ix-dev/community/homepage/app.yaml | 4 ++-- ix-dev/community/homepage/ix_values.yaml | 2 +- ix-dev/community/immich/app.yaml | 4 ++-- ix-dev/community/immich/ix_values.yaml | 8 ++++---- ix-dev/community/ipfs/app.yaml | 4 ++-- ix-dev/community/ipfs/ix_values.yaml | 2 +- ix-dev/community/n8n/app.yaml | 4 ++-- ix-dev/community/n8n/ix_values.yaml | 2 +- ix-dev/community/nginx-proxy-manager/app.yaml | 4 ++-- ix-dev/community/nginx-proxy-manager/ix_values.yaml | 2 +- ix-dev/stable/syncthing/app.yaml | 4 ++-- ix-dev/stable/syncthing/ix_values.yaml | 2 +- 14 files changed, 25 insertions(+), 25 deletions(-) diff --git a/ix-dev/community/castopod/app.yaml b/ix-dev/community/castopod/app.yaml index 90868bbbcb..4645ecf9d6 100644 --- a/ix-dev/community/castopod/app.yaml +++ b/ix-dev/community/castopod/app.yaml @@ -1,4 +1,4 @@ -app_version: 1.12.10 +app_version: 1.12.11 capabilities: - description: Castopod is able to chown files. name: CHOWN @@ -49,4 +49,4 @@ sources: - https://code.castopod.org/adaures/castopod title: Castopod train: community -version: 1.0.9 +version: 1.0.10 diff --git a/ix-dev/community/castopod/ix_values.yaml b/ix-dev/community/castopod/ix_values.yaml index 80c83b0f7e..c95ed9e38f 100644 --- a/ix-dev/community/castopod/ix_values.yaml +++ b/ix-dev/community/castopod/ix_values.yaml @@ -1,10 +1,10 @@ images: image: repository: castopod/app - tag: "1.12.10" + tag: "1.12.11" web_image: repository: castopod/web-server - tag: "1.12.10" + tag: "1.12.11" mariadb_image: repository: mariadb tag: "10.11.9" diff --git a/ix-dev/community/homepage/app.yaml b/ix-dev/community/homepage/app.yaml index adde8e9804..7504723007 100644 --- a/ix-dev/community/homepage/app.yaml +++ b/ix-dev/community/homepage/app.yaml @@ -1,4 +1,4 @@ -app_version: v0.9.10 +app_version: v0.9.11 capabilities: [] categories: - productivity @@ -33,4 +33,4 @@ sources: - https://github.com/benphelps/homepage title: Homepage train: community -version: 1.0.22 +version: 1.0.23 diff --git a/ix-dev/community/homepage/ix_values.yaml b/ix-dev/community/homepage/ix_values.yaml index 54b5f593dd..c0f7c003a7 100644 --- a/ix-dev/community/homepage/ix_values.yaml +++ b/ix-dev/community/homepage/ix_values.yaml @@ -1,7 +1,7 @@ images: image: repository: ghcr.io/gethomepage/homepage - tag: v0.9.10 + tag: v0.9.11 consts: perms_container_name: permissions diff --git a/ix-dev/community/immich/app.yaml b/ix-dev/community/immich/app.yaml index 24c6bc2296..f296ae9a06 100644 --- a/ix-dev/community/immich/app.yaml +++ b/ix-dev/community/immich/app.yaml @@ -1,4 +1,4 @@ -app_version: v1.118.0 +app_version: v1.118.1 capabilities: - description: Immich Proxy is able to chown files. name: CHOWN @@ -45,4 +45,4 @@ sources: - https://github.com/immich-app/immich title: Immich train: community -version: 1.6.19 +version: 1.6.20 diff --git a/ix-dev/community/immich/ix_values.yaml b/ix-dev/community/immich/ix_values.yaml index 62498af975..5ef22a48c0 100644 --- a/ix-dev/community/immich/ix_values.yaml +++ b/ix-dev/community/immich/ix_values.yaml @@ -1,16 +1,16 @@ images: image: repository: altran1502/immich-server - tag: v1.118.0 + tag: v1.118.1 ml_image: repository: altran1502/immich-machine-learning - tag: v1.118.0 + tag: v1.118.1 ml_cuda_image: repository: altran1502/immich-machine-learning - tag: v1.118.0-cuda + tag: v1.118.1-cuda ml_openvino_image: repository: altran1502/immich-machine-learning - tag: v1.118.0-openvino + tag: v1.118.1-openvino pgvecto_image: repository: tensorchord/pgvecto-rs tag: pg15-v0.2.0 diff --git a/ix-dev/community/ipfs/app.yaml b/ix-dev/community/ipfs/app.yaml index d05581545b..2cacf1cff5 100644 --- a/ix-dev/community/ipfs/app.yaml +++ b/ix-dev/community/ipfs/app.yaml @@ -1,4 +1,4 @@ -app_version: v0.30.0 +app_version: v0.31.0 capabilities: [] categories: - storage @@ -33,4 +33,4 @@ sources: - https://ipfs.tech/ title: IPFS train: community -version: 1.0.19 +version: 1.0.20 diff --git a/ix-dev/community/ipfs/ix_values.yaml b/ix-dev/community/ipfs/ix_values.yaml index 823aa12838..a1f91c9921 100644 --- a/ix-dev/community/ipfs/ix_values.yaml +++ b/ix-dev/community/ipfs/ix_values.yaml @@ -1,7 +1,7 @@ images: image: repository: ipfs/kubo - tag: v0.30.0 + tag: v0.31.0 consts: ipfs_container_name: ipfs diff --git a/ix-dev/community/n8n/app.yaml b/ix-dev/community/n8n/app.yaml index 7f220747a4..799cca574b 100644 --- a/ix-dev/community/n8n/app.yaml +++ b/ix-dev/community/n8n/app.yaml @@ -1,4 +1,4 @@ -app_version: 1.63.2 +app_version: 1.64.0 capabilities: [] categories: - productivity @@ -42,4 +42,4 @@ sources: - https://hub.docker.com/r/n8nio/n8n title: n8n train: community -version: 1.3.23 +version: 1.3.24 diff --git a/ix-dev/community/n8n/ix_values.yaml b/ix-dev/community/n8n/ix_values.yaml index 8a54760685..f3e63e3451 100644 --- a/ix-dev/community/n8n/ix_values.yaml +++ b/ix-dev/community/n8n/ix_values.yaml @@ -1,7 +1,7 @@ images: image: repository: n8nio/n8n - tag: "1.63.2" + tag: "1.64.0" postgres_image: repository: postgres tag: "15.8" diff --git a/ix-dev/community/nginx-proxy-manager/app.yaml b/ix-dev/community/nginx-proxy-manager/app.yaml index 5d13748073..a1b8b97dae 100644 --- a/ix-dev/community/nginx-proxy-manager/app.yaml +++ b/ix-dev/community/nginx-proxy-manager/app.yaml @@ -1,4 +1,4 @@ -app_version: 2.11.3 +app_version: 2.12.0 capabilities: - description: Nginx Proxy Manager requires this ability to switch user for sub-processes. name: SETUID @@ -44,4 +44,4 @@ sources: - https://hub.docker.com/r/jc21/nginx-proxy-manager title: Nginx Proxy Manager train: community -version: 1.0.20 +version: 1.0.21 diff --git a/ix-dev/community/nginx-proxy-manager/ix_values.yaml b/ix-dev/community/nginx-proxy-manager/ix_values.yaml index 32fcdc91ba..3eab502535 100644 --- a/ix-dev/community/nginx-proxy-manager/ix_values.yaml +++ b/ix-dev/community/nginx-proxy-manager/ix_values.yaml @@ -1,7 +1,7 @@ images: image: repository: jc21/nginx-proxy-manager - tag: 2.11.3 + tag: 2.12.0 consts: npm_container_name: npm data_path: /data diff --git a/ix-dev/stable/syncthing/app.yaml b/ix-dev/stable/syncthing/app.yaml index f1609e4af0..a961758344 100644 --- a/ix-dev/stable/syncthing/app.yaml +++ b/ix-dev/stable/syncthing/app.yaml @@ -1,4 +1,4 @@ -app_version: 1.27.12 +app_version: 1.28.0 capabilities: - description: Syncthing is able to chown files. name: CHOWN @@ -50,4 +50,4 @@ sources: - https://hub.docker.com/r/syncthing/syncthing title: Syncthing train: stable -version: 1.0.27 +version: 1.0.28 diff --git a/ix-dev/stable/syncthing/ix_values.yaml b/ix-dev/stable/syncthing/ix_values.yaml index da4c7e8422..a26536f43a 100644 --- a/ix-dev/stable/syncthing/ix_values.yaml +++ b/ix-dev/stable/syncthing/ix_values.yaml @@ -1,7 +1,7 @@ images: image: repository: syncthing/syncthing - tag: 1.27.12 + tag: 1.28.0 consts: syncthing_container_name: syncthing From 3045f9fe6f779387051bf460ff97e97083f88b98 Mon Sep 17 00:00:00 2001 From: sonicaj Date: Wed, 16 Oct 2024 19:06:56 +0000 Subject: [PATCH 05/13] Publish new changes in catalog [skip ci] --- trains/community/castopod/{1.0.9 => 1.0.10}/README.md | 0 trains/community/castopod/{1.0.9 => 1.0.10}/app.yaml | 4 ++-- .../community/castopod/{1.0.9 => 1.0.10}/ix_values.yaml | 4 ++-- .../{1.0.9 => 1.0.10}/migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../{1.0.9 => 1.0.10}/migrations/migration_helpers/cpu.py | 0 .../migrations/migration_helpers/dns_config.py | 0 .../migrations/migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../community/castopod/{1.0.9 => 1.0.10}/questions.yaml | 0 .../{1.0.9 => 1.0.10}/templates/docker-compose.yaml | 0 .../templates/library/base_v1_1_4/__init__.py | 0 .../templates/library/base_v1_1_4/environment.py | 0 .../templates/library/base_v1_1_4/healthchecks.py | 0 .../templates/library/base_v1_1_4/mariadb.py | 0 .../templates/library/base_v1_1_4/metadata.py | 0 .../templates/library/base_v1_1_4/network.py | 0 .../templates/library/base_v1_1_4/permissions.py | 0 .../templates/library/base_v1_1_4/ports.py | 0 .../templates/library/base_v1_1_4/postgres.py | 0 .../templates/library/base_v1_1_4/redis.py | 0 .../templates/library/base_v1_1_4/resources.py | 0 .../templates/library/base_v1_1_4/security.py | 0 .../templates/library/base_v1_1_4/storage.py | 0 .../templates/library/base_v1_1_4/utils.py | 0 .../templates/test_values/2fa-values.yaml | 0 .../templates/test_values/basic-values.yaml | 0 .../templates/test_values/redirect-values.yaml | 0 trains/community/homepage/{1.0.22 => 1.0.23}/README.md | 0 trains/community/homepage/{1.0.22 => 1.0.23}/app.yaml | 4 ++-- .../community/homepage/{1.0.22 => 1.0.23}/ix_values.yaml | 2 +- .../{1.0.22 => 1.0.23}/migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migrations/migration_helpers/dns_config.py | 0 .../migrations/migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../community/homepage/{1.0.22 => 1.0.23}/questions.yaml | 0 .../{1.0.22 => 1.0.23}/templates/docker-compose.yaml | 0 .../templates/library/base_v1_1_4/__init__.py | 0 .../templates/library/base_v1_1_4/environment.py | 0 .../templates/library/base_v1_1_4/healthchecks.py | 0 .../templates/library/base_v1_1_4/mariadb.py | 0 .../templates/library/base_v1_1_4/metadata.py | 0 .../templates/library/base_v1_1_4/network.py | 0 .../templates/library/base_v1_1_4/permissions.py | 0 .../templates/library/base_v1_1_4/ports.py | 0 .../templates/library/base_v1_1_4/postgres.py | 0 .../templates/library/base_v1_1_4/redis.py | 0 .../templates/library/base_v1_1_4/resources.py | 0 .../templates/library/base_v1_1_4/security.py | 0 .../templates/library/base_v1_1_4/storage.py | 0 .../templates/library/base_v1_1_4/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 trains/community/immich/{1.6.19 => 1.6.20}/README.md | 0 trains/community/immich/{1.6.19 => 1.6.20}/app.yaml | 4 ++-- trains/community/immich/{1.6.19 => 1.6.20}/ix_values.yaml | 8 ++++---- .../{1.6.19 => 1.6.20}/migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migrations/migration_helpers/dns_config.py | 0 .../migrations/migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 trains/community/immich/{1.6.19 => 1.6.20}/questions.yaml | 0 .../{1.6.19 => 1.6.20}/templates/docker-compose.yaml | 0 .../templates/library/base_v1_1_4/__init__.py | 0 .../templates/library/base_v1_1_4/environment.py | 0 .../templates/library/base_v1_1_4/healthchecks.py | 0 .../templates/library/base_v1_1_4/mariadb.py | 0 .../templates/library/base_v1_1_4/metadata.py | 0 .../templates/library/base_v1_1_4/network.py | 0 .../templates/library/base_v1_1_4/permissions.py | 0 .../templates/library/base_v1_1_4/ports.py | 0 .../templates/library/base_v1_1_4/postgres.py | 0 .../templates/library/base_v1_1_4/redis.py | 0 .../templates/library/base_v1_1_4/resources.py | 0 .../templates/library/base_v1_1_4/security.py | 0 .../templates/library/base_v1_1_4/storage.py | 0 .../templates/library/base_v1_1_4/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 trains/community/ipfs/{1.0.19 => 1.0.20}/README.md | 0 trains/community/ipfs/{1.0.19 => 1.0.20}/app.yaml | 4 ++-- trains/community/ipfs/{1.0.19 => 1.0.20}/ix_values.yaml | 2 +- .../{1.0.19 => 1.0.20}/migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migrations/migration_helpers/dns_config.py | 0 .../migrations/migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 trains/community/ipfs/{1.0.19 => 1.0.20}/questions.yaml | 0 .../ipfs/{1.0.19 => 1.0.20}/templates/docker-compose.yaml | 0 .../templates/library/base_v1_1_4/__init__.py | 0 .../templates/library/base_v1_1_4/environment.py | 0 .../templates/library/base_v1_1_4/healthchecks.py | 0 .../templates/library/base_v1_1_4/mariadb.py | 0 .../templates/library/base_v1_1_4/metadata.py | 0 .../templates/library/base_v1_1_4/network.py | 0 .../templates/library/base_v1_1_4/permissions.py | 0 .../templates/library/base_v1_1_4/ports.py | 0 .../templates/library/base_v1_1_4/postgres.py | 0 .../templates/library/base_v1_1_4/redis.py | 0 .../templates/library/base_v1_1_4/resources.py | 0 .../templates/library/base_v1_1_4/security.py | 0 .../templates/library/base_v1_1_4/storage.py | 0 .../templates/library/base_v1_1_4/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 trains/community/n8n/{1.3.23 => 1.3.24}/README.md | 0 trains/community/n8n/{1.3.23 => 1.3.24}/app.yaml | 4 ++-- trains/community/n8n/{1.3.23 => 1.3.24}/ix_values.yaml | 2 +- .../{1.3.23 => 1.3.24}/migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migrations/migration_helpers/dns_config.py | 0 .../migrations/migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 trains/community/n8n/{1.3.23 => 1.3.24}/questions.yaml | 0 .../n8n/{1.3.23 => 1.3.24}/templates/docker-compose.yaml | 0 .../templates/library/base_v1_1_4/__init__.py | 0 .../templates/library/base_v1_1_4/environment.py | 0 .../templates/library/base_v1_1_4/healthchecks.py | 0 .../templates/library/base_v1_1_4/mariadb.py | 0 .../templates/library/base_v1_1_4/metadata.py | 0 .../templates/library/base_v1_1_4/network.py | 0 .../templates/library/base_v1_1_4/permissions.py | 0 .../templates/library/base_v1_1_4/ports.py | 0 .../templates/library/base_v1_1_4/postgres.py | 0 .../templates/library/base_v1_1_4/redis.py | 0 .../templates/library/base_v1_1_4/resources.py | 0 .../templates/library/base_v1_1_4/security.py | 0 .../templates/library/base_v1_1_4/storage.py | 0 .../templates/library/base_v1_1_4/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../templates/test_values/https-values.yaml | 0 .../nginx-proxy-manager/{1.0.20 => 1.0.21}/README.md | 0 .../nginx-proxy-manager/{1.0.20 => 1.0.21}/app.yaml | 4 ++-- .../nginx-proxy-manager/{1.0.20 => 1.0.21}/ix_values.yaml | 2 +- .../{1.0.20 => 1.0.21}/migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migrations/migration_helpers/dns_config.py | 0 .../migrations/migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../nginx-proxy-manager/{1.0.20 => 1.0.21}/questions.yaml | 0 .../{1.0.20 => 1.0.21}/templates/docker-compose.yaml | 0 .../templates/library/base_v1_1_4/__init__.py | 0 .../templates/library/base_v1_1_4/environment.py | 0 .../templates/library/base_v1_1_4/healthchecks.py | 0 .../templates/library/base_v1_1_4/mariadb.py | 0 .../templates/library/base_v1_1_4/metadata.py | 0 .../templates/library/base_v1_1_4/network.py | 0 .../templates/library/base_v1_1_4/permissions.py | 0 .../templates/library/base_v1_1_4/ports.py | 0 .../templates/library/base_v1_1_4/postgres.py | 0 .../templates/library/base_v1_1_4/redis.py | 0 .../templates/library/base_v1_1_4/resources.py | 0 .../templates/library/base_v1_1_4/security.py | 0 .../templates/library/base_v1_1_4/storage.py | 0 .../templates/library/base_v1_1_4/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 trains/stable/syncthing/{1.0.27 => 1.0.28}/README.md | 0 trains/stable/syncthing/{1.0.27 => 1.0.28}/app.yaml | 4 ++-- trains/stable/syncthing/{1.0.27 => 1.0.28}/ix_values.yaml | 2 +- .../{1.0.27 => 1.0.28}/migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migrations/migration_helpers/dns_config.py | 0 .../migrations/migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 trains/stable/syncthing/{1.0.27 => 1.0.28}/questions.yaml | 0 .../{1.0.27 => 1.0.28}/templates/docker-compose.yaml | 0 .../templates/library/base_v1_1_4/__init__.py | 0 .../templates/library/base_v1_1_4/environment.py | 0 .../templates/library/base_v1_1_4/healthchecks.py | 0 .../templates/library/base_v1_1_4/mariadb.py | 0 .../templates/library/base_v1_1_4/metadata.py | 0 .../templates/library/base_v1_1_4/network.py | 0 .../templates/library/base_v1_1_4/permissions.py | 0 .../templates/library/base_v1_1_4/ports.py | 0 .../templates/library/base_v1_1_4/postgres.py | 0 .../templates/library/base_v1_1_4/redis.py | 0 .../templates/library/base_v1_1_4/resources.py | 0 .../templates/library/base_v1_1_4/security.py | 0 .../templates/library/base_v1_1_4/storage.py | 0 .../templates/library/base_v1_1_4/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../templates/test_values/host-values.yaml | 0 200 files changed, 25 insertions(+), 25 deletions(-) rename trains/community/castopod/{1.0.9 => 1.0.10}/README.md (100%) rename trains/community/castopod/{1.0.9 => 1.0.10}/app.yaml (97%) rename trains/community/castopod/{1.0.9 => 1.0.10}/ix_values.yaml (93%) rename trains/community/castopod/{1.0.9 => 1.0.10}/migrations/migrate_from_kubernetes (100%) rename trains/community/castopod/{1.0.9 => 1.0.10}/migrations/migration_helpers/__init__.py (100%) rename trains/community/castopod/{1.0.9 => 1.0.10}/migrations/migration_helpers/cpu.py (100%) rename trains/community/castopod/{1.0.9 => 1.0.10}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/castopod/{1.0.9 => 1.0.10}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/castopod/{1.0.9 => 1.0.10}/migrations/migration_helpers/memory.py (100%) rename trains/community/castopod/{1.0.9 => 1.0.10}/migrations/migration_helpers/resources.py (100%) rename trains/community/castopod/{1.0.9 => 1.0.10}/migrations/migration_helpers/storage.py (100%) rename trains/community/castopod/{1.0.9 => 1.0.10}/questions.yaml (100%) rename trains/community/castopod/{1.0.9 => 1.0.10}/templates/docker-compose.yaml (100%) rename trains/community/castopod/{1.0.9 => 1.0.10}/templates/library/base_v1_1_4/__init__.py (100%) rename trains/community/castopod/{1.0.9 => 1.0.10}/templates/library/base_v1_1_4/environment.py (100%) rename trains/community/castopod/{1.0.9 => 1.0.10}/templates/library/base_v1_1_4/healthchecks.py (100%) rename trains/community/castopod/{1.0.9 => 1.0.10}/templates/library/base_v1_1_4/mariadb.py (100%) rename trains/community/castopod/{1.0.9 => 1.0.10}/templates/library/base_v1_1_4/metadata.py (100%) rename trains/community/castopod/{1.0.9 => 1.0.10}/templates/library/base_v1_1_4/network.py (100%) rename trains/community/castopod/{1.0.9 => 1.0.10}/templates/library/base_v1_1_4/permissions.py (100%) rename trains/community/castopod/{1.0.9 => 1.0.10}/templates/library/base_v1_1_4/ports.py (100%) rename trains/community/castopod/{1.0.9 => 1.0.10}/templates/library/base_v1_1_4/postgres.py (100%) rename trains/community/castopod/{1.0.9 => 1.0.10}/templates/library/base_v1_1_4/redis.py (100%) rename trains/community/castopod/{1.0.9 => 1.0.10}/templates/library/base_v1_1_4/resources.py (100%) rename trains/community/castopod/{1.0.9 => 1.0.10}/templates/library/base_v1_1_4/security.py (100%) rename trains/community/castopod/{1.0.9 => 1.0.10}/templates/library/base_v1_1_4/storage.py (100%) rename trains/community/castopod/{1.0.9 => 1.0.10}/templates/library/base_v1_1_4/utils.py (100%) rename trains/community/castopod/{1.0.9 => 1.0.10}/templates/test_values/2fa-values.yaml (100%) rename trains/community/castopod/{1.0.9 => 1.0.10}/templates/test_values/basic-values.yaml (100%) rename trains/community/castopod/{1.0.9 => 1.0.10}/templates/test_values/redirect-values.yaml (100%) rename trains/community/homepage/{1.0.22 => 1.0.23}/README.md (100%) rename trains/community/homepage/{1.0.22 => 1.0.23}/app.yaml (96%) rename trains/community/homepage/{1.0.22 => 1.0.23}/ix_values.yaml (91%) rename trains/community/homepage/{1.0.22 => 1.0.23}/migrations/migrate_from_kubernetes (100%) rename trains/community/homepage/{1.0.22 => 1.0.23}/migrations/migration_helpers/__init__.py (100%) rename trains/community/homepage/{1.0.22 => 1.0.23}/migrations/migration_helpers/cpu.py (100%) rename trains/community/homepage/{1.0.22 => 1.0.23}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/homepage/{1.0.22 => 1.0.23}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/homepage/{1.0.22 => 1.0.23}/migrations/migration_helpers/memory.py (100%) rename trains/community/homepage/{1.0.22 => 1.0.23}/migrations/migration_helpers/resources.py (100%) rename trains/community/homepage/{1.0.22 => 1.0.23}/migrations/migration_helpers/storage.py (100%) rename trains/community/homepage/{1.0.22 => 1.0.23}/questions.yaml (100%) rename trains/community/homepage/{1.0.22 => 1.0.23}/templates/docker-compose.yaml (100%) rename trains/community/homepage/{1.0.22 => 1.0.23}/templates/library/base_v1_1_4/__init__.py (100%) rename trains/community/homepage/{1.0.22 => 1.0.23}/templates/library/base_v1_1_4/environment.py (100%) rename trains/community/homepage/{1.0.22 => 1.0.23}/templates/library/base_v1_1_4/healthchecks.py (100%) rename trains/community/homepage/{1.0.22 => 1.0.23}/templates/library/base_v1_1_4/mariadb.py (100%) rename trains/community/homepage/{1.0.22 => 1.0.23}/templates/library/base_v1_1_4/metadata.py (100%) rename trains/community/homepage/{1.0.22 => 1.0.23}/templates/library/base_v1_1_4/network.py (100%) rename trains/community/homepage/{1.0.22 => 1.0.23}/templates/library/base_v1_1_4/permissions.py (100%) rename trains/community/homepage/{1.0.22 => 1.0.23}/templates/library/base_v1_1_4/ports.py (100%) rename trains/community/homepage/{1.0.22 => 1.0.23}/templates/library/base_v1_1_4/postgres.py (100%) rename trains/community/homepage/{1.0.22 => 1.0.23}/templates/library/base_v1_1_4/redis.py (100%) rename trains/community/homepage/{1.0.22 => 1.0.23}/templates/library/base_v1_1_4/resources.py (100%) rename trains/community/homepage/{1.0.22 => 1.0.23}/templates/library/base_v1_1_4/security.py (100%) rename trains/community/homepage/{1.0.22 => 1.0.23}/templates/library/base_v1_1_4/storage.py (100%) rename trains/community/homepage/{1.0.22 => 1.0.23}/templates/library/base_v1_1_4/utils.py (100%) rename trains/community/homepage/{1.0.22 => 1.0.23}/templates/test_values/basic-values.yaml (100%) rename trains/community/immich/{1.6.19 => 1.6.20}/README.md (100%) rename trains/community/immich/{1.6.19 => 1.6.20}/app.yaml (96%) rename trains/community/immich/{1.6.19 => 1.6.20}/ix_values.yaml (89%) rename trains/community/immich/{1.6.19 => 1.6.20}/migrations/migrate_from_kubernetes (100%) rename trains/community/immich/{1.6.19 => 1.6.20}/migrations/migration_helpers/__init__.py (100%) rename trains/community/immich/{1.6.19 => 1.6.20}/migrations/migration_helpers/cpu.py (100%) rename trains/community/immich/{1.6.19 => 1.6.20}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/immich/{1.6.19 => 1.6.20}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/immich/{1.6.19 => 1.6.20}/migrations/migration_helpers/memory.py (100%) rename trains/community/immich/{1.6.19 => 1.6.20}/migrations/migration_helpers/resources.py (100%) rename trains/community/immich/{1.6.19 => 1.6.20}/migrations/migration_helpers/storage.py (100%) rename trains/community/immich/{1.6.19 => 1.6.20}/questions.yaml (100%) rename trains/community/immich/{1.6.19 => 1.6.20}/templates/docker-compose.yaml (100%) rename trains/community/immich/{1.6.19 => 1.6.20}/templates/library/base_v1_1_4/__init__.py (100%) rename trains/community/immich/{1.6.19 => 1.6.20}/templates/library/base_v1_1_4/environment.py (100%) rename trains/community/immich/{1.6.19 => 1.6.20}/templates/library/base_v1_1_4/healthchecks.py (100%) rename trains/community/immich/{1.6.19 => 1.6.20}/templates/library/base_v1_1_4/mariadb.py (100%) rename trains/community/immich/{1.6.19 => 1.6.20}/templates/library/base_v1_1_4/metadata.py (100%) rename trains/community/immich/{1.6.19 => 1.6.20}/templates/library/base_v1_1_4/network.py (100%) rename trains/community/immich/{1.6.19 => 1.6.20}/templates/library/base_v1_1_4/permissions.py (100%) rename trains/community/immich/{1.6.19 => 1.6.20}/templates/library/base_v1_1_4/ports.py (100%) rename trains/community/immich/{1.6.19 => 1.6.20}/templates/library/base_v1_1_4/postgres.py (100%) rename trains/community/immich/{1.6.19 => 1.6.20}/templates/library/base_v1_1_4/redis.py (100%) rename trains/community/immich/{1.6.19 => 1.6.20}/templates/library/base_v1_1_4/resources.py (100%) rename trains/community/immich/{1.6.19 => 1.6.20}/templates/library/base_v1_1_4/security.py (100%) rename trains/community/immich/{1.6.19 => 1.6.20}/templates/library/base_v1_1_4/storage.py (100%) rename trains/community/immich/{1.6.19 => 1.6.20}/templates/library/base_v1_1_4/utils.py (100%) rename trains/community/immich/{1.6.19 => 1.6.20}/templates/test_values/basic-values.yaml (100%) rename trains/community/ipfs/{1.0.19 => 1.0.20}/README.md (100%) rename trains/community/ipfs/{1.0.19 => 1.0.20}/app.yaml (95%) rename trains/community/ipfs/{1.0.19 => 1.0.20}/ix_values.yaml (90%) rename trains/community/ipfs/{1.0.19 => 1.0.20}/migrations/migrate_from_kubernetes (100%) rename trains/community/ipfs/{1.0.19 => 1.0.20}/migrations/migration_helpers/__init__.py (100%) rename trains/community/ipfs/{1.0.19 => 1.0.20}/migrations/migration_helpers/cpu.py (100%) rename trains/community/ipfs/{1.0.19 => 1.0.20}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/ipfs/{1.0.19 => 1.0.20}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/ipfs/{1.0.19 => 1.0.20}/migrations/migration_helpers/memory.py (100%) rename trains/community/ipfs/{1.0.19 => 1.0.20}/migrations/migration_helpers/resources.py (100%) rename trains/community/ipfs/{1.0.19 => 1.0.20}/migrations/migration_helpers/storage.py (100%) rename trains/community/ipfs/{1.0.19 => 1.0.20}/questions.yaml (100%) rename trains/community/ipfs/{1.0.19 => 1.0.20}/templates/docker-compose.yaml (100%) rename trains/community/ipfs/{1.0.19 => 1.0.20}/templates/library/base_v1_1_4/__init__.py (100%) rename trains/community/ipfs/{1.0.19 => 1.0.20}/templates/library/base_v1_1_4/environment.py (100%) rename trains/community/ipfs/{1.0.19 => 1.0.20}/templates/library/base_v1_1_4/healthchecks.py (100%) rename trains/community/ipfs/{1.0.19 => 1.0.20}/templates/library/base_v1_1_4/mariadb.py (100%) rename trains/community/ipfs/{1.0.19 => 1.0.20}/templates/library/base_v1_1_4/metadata.py (100%) rename trains/community/ipfs/{1.0.19 => 1.0.20}/templates/library/base_v1_1_4/network.py (100%) rename trains/community/ipfs/{1.0.19 => 1.0.20}/templates/library/base_v1_1_4/permissions.py (100%) rename trains/community/ipfs/{1.0.19 => 1.0.20}/templates/library/base_v1_1_4/ports.py (100%) rename trains/community/ipfs/{1.0.19 => 1.0.20}/templates/library/base_v1_1_4/postgres.py (100%) rename trains/community/ipfs/{1.0.19 => 1.0.20}/templates/library/base_v1_1_4/redis.py (100%) rename trains/community/ipfs/{1.0.19 => 1.0.20}/templates/library/base_v1_1_4/resources.py (100%) rename trains/community/ipfs/{1.0.19 => 1.0.20}/templates/library/base_v1_1_4/security.py (100%) rename trains/community/ipfs/{1.0.19 => 1.0.20}/templates/library/base_v1_1_4/storage.py (100%) rename trains/community/ipfs/{1.0.19 => 1.0.20}/templates/library/base_v1_1_4/utils.py (100%) rename trains/community/ipfs/{1.0.19 => 1.0.20}/templates/test_values/basic-values.yaml (100%) rename trains/community/n8n/{1.3.23 => 1.3.24}/README.md (100%) rename trains/community/n8n/{1.3.23 => 1.3.24}/app.yaml (97%) rename trains/community/n8n/{1.3.23 => 1.3.24}/ix_values.yaml (96%) rename trains/community/n8n/{1.3.23 => 1.3.24}/migrations/migrate_from_kubernetes (100%) rename trains/community/n8n/{1.3.23 => 1.3.24}/migrations/migration_helpers/__init__.py (100%) rename trains/community/n8n/{1.3.23 => 1.3.24}/migrations/migration_helpers/cpu.py (100%) rename trains/community/n8n/{1.3.23 => 1.3.24}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/n8n/{1.3.23 => 1.3.24}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/n8n/{1.3.23 => 1.3.24}/migrations/migration_helpers/memory.py (100%) rename trains/community/n8n/{1.3.23 => 1.3.24}/migrations/migration_helpers/resources.py (100%) rename trains/community/n8n/{1.3.23 => 1.3.24}/migrations/migration_helpers/storage.py (100%) rename trains/community/n8n/{1.3.23 => 1.3.24}/questions.yaml (100%) rename trains/community/n8n/{1.3.23 => 1.3.24}/templates/docker-compose.yaml (100%) rename trains/community/n8n/{1.3.23 => 1.3.24}/templates/library/base_v1_1_4/__init__.py (100%) rename trains/community/n8n/{1.3.23 => 1.3.24}/templates/library/base_v1_1_4/environment.py (100%) rename trains/community/n8n/{1.3.23 => 1.3.24}/templates/library/base_v1_1_4/healthchecks.py (100%) rename trains/community/n8n/{1.3.23 => 1.3.24}/templates/library/base_v1_1_4/mariadb.py (100%) rename trains/community/n8n/{1.3.23 => 1.3.24}/templates/library/base_v1_1_4/metadata.py (100%) rename trains/community/n8n/{1.3.23 => 1.3.24}/templates/library/base_v1_1_4/network.py (100%) rename trains/community/n8n/{1.3.23 => 1.3.24}/templates/library/base_v1_1_4/permissions.py (100%) rename trains/community/n8n/{1.3.23 => 1.3.24}/templates/library/base_v1_1_4/ports.py (100%) rename trains/community/n8n/{1.3.23 => 1.3.24}/templates/library/base_v1_1_4/postgres.py (100%) rename trains/community/n8n/{1.3.23 => 1.3.24}/templates/library/base_v1_1_4/redis.py (100%) rename trains/community/n8n/{1.3.23 => 1.3.24}/templates/library/base_v1_1_4/resources.py (100%) rename trains/community/n8n/{1.3.23 => 1.3.24}/templates/library/base_v1_1_4/security.py (100%) rename trains/community/n8n/{1.3.23 => 1.3.24}/templates/library/base_v1_1_4/storage.py (100%) rename trains/community/n8n/{1.3.23 => 1.3.24}/templates/library/base_v1_1_4/utils.py (100%) rename trains/community/n8n/{1.3.23 => 1.3.24}/templates/test_values/basic-values.yaml (100%) rename trains/community/n8n/{1.3.23 => 1.3.24}/templates/test_values/https-values.yaml (100%) rename trains/community/nginx-proxy-manager/{1.0.20 => 1.0.21}/README.md (100%) rename trains/community/nginx-proxy-manager/{1.0.20 => 1.0.21}/app.yaml (97%) rename trains/community/nginx-proxy-manager/{1.0.20 => 1.0.21}/ix_values.yaml (95%) rename trains/community/nginx-proxy-manager/{1.0.20 => 1.0.21}/migrations/migrate_from_kubernetes (100%) rename trains/community/nginx-proxy-manager/{1.0.20 => 1.0.21}/migrations/migration_helpers/__init__.py (100%) rename trains/community/nginx-proxy-manager/{1.0.20 => 1.0.21}/migrations/migration_helpers/cpu.py (100%) rename trains/community/nginx-proxy-manager/{1.0.20 => 1.0.21}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/nginx-proxy-manager/{1.0.20 => 1.0.21}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/nginx-proxy-manager/{1.0.20 => 1.0.21}/migrations/migration_helpers/memory.py (100%) rename trains/community/nginx-proxy-manager/{1.0.20 => 1.0.21}/migrations/migration_helpers/resources.py (100%) rename trains/community/nginx-proxy-manager/{1.0.20 => 1.0.21}/migrations/migration_helpers/storage.py (100%) rename trains/community/nginx-proxy-manager/{1.0.20 => 1.0.21}/questions.yaml (100%) rename trains/community/nginx-proxy-manager/{1.0.20 => 1.0.21}/templates/docker-compose.yaml (100%) rename trains/community/nginx-proxy-manager/{1.0.20 => 1.0.21}/templates/library/base_v1_1_4/__init__.py (100%) rename trains/community/nginx-proxy-manager/{1.0.20 => 1.0.21}/templates/library/base_v1_1_4/environment.py (100%) rename trains/community/nginx-proxy-manager/{1.0.20 => 1.0.21}/templates/library/base_v1_1_4/healthchecks.py (100%) rename trains/community/nginx-proxy-manager/{1.0.20 => 1.0.21}/templates/library/base_v1_1_4/mariadb.py (100%) rename trains/community/nginx-proxy-manager/{1.0.20 => 1.0.21}/templates/library/base_v1_1_4/metadata.py (100%) rename trains/community/nginx-proxy-manager/{1.0.20 => 1.0.21}/templates/library/base_v1_1_4/network.py (100%) rename trains/community/nginx-proxy-manager/{1.0.20 => 1.0.21}/templates/library/base_v1_1_4/permissions.py (100%) rename trains/community/nginx-proxy-manager/{1.0.20 => 1.0.21}/templates/library/base_v1_1_4/ports.py (100%) rename trains/community/nginx-proxy-manager/{1.0.20 => 1.0.21}/templates/library/base_v1_1_4/postgres.py (100%) rename trains/community/nginx-proxy-manager/{1.0.20 => 1.0.21}/templates/library/base_v1_1_4/redis.py (100%) rename trains/community/nginx-proxy-manager/{1.0.20 => 1.0.21}/templates/library/base_v1_1_4/resources.py (100%) rename trains/community/nginx-proxy-manager/{1.0.20 => 1.0.21}/templates/library/base_v1_1_4/security.py (100%) rename trains/community/nginx-proxy-manager/{1.0.20 => 1.0.21}/templates/library/base_v1_1_4/storage.py (100%) rename trains/community/nginx-proxy-manager/{1.0.20 => 1.0.21}/templates/library/base_v1_1_4/utils.py (100%) rename trains/community/nginx-proxy-manager/{1.0.20 => 1.0.21}/templates/test_values/basic-values.yaml (100%) rename trains/stable/syncthing/{1.0.27 => 1.0.28}/README.md (100%) rename trains/stable/syncthing/{1.0.27 => 1.0.28}/app.yaml (97%) rename trains/stable/syncthing/{1.0.27 => 1.0.28}/ix_values.yaml (85%) rename trains/stable/syncthing/{1.0.27 => 1.0.28}/migrations/migrate_from_kubernetes (100%) rename trains/stable/syncthing/{1.0.27 => 1.0.28}/migrations/migration_helpers/__init__.py (100%) rename trains/stable/syncthing/{1.0.27 => 1.0.28}/migrations/migration_helpers/cpu.py (100%) rename trains/stable/syncthing/{1.0.27 => 1.0.28}/migrations/migration_helpers/dns_config.py (100%) rename trains/stable/syncthing/{1.0.27 => 1.0.28}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/stable/syncthing/{1.0.27 => 1.0.28}/migrations/migration_helpers/memory.py (100%) rename trains/stable/syncthing/{1.0.27 => 1.0.28}/migrations/migration_helpers/resources.py (100%) rename trains/stable/syncthing/{1.0.27 => 1.0.28}/migrations/migration_helpers/storage.py (100%) rename trains/stable/syncthing/{1.0.27 => 1.0.28}/questions.yaml (100%) rename trains/stable/syncthing/{1.0.27 => 1.0.28}/templates/docker-compose.yaml (100%) rename trains/stable/syncthing/{1.0.27 => 1.0.28}/templates/library/base_v1_1_4/__init__.py (100%) rename trains/stable/syncthing/{1.0.27 => 1.0.28}/templates/library/base_v1_1_4/environment.py (100%) rename trains/stable/syncthing/{1.0.27 => 1.0.28}/templates/library/base_v1_1_4/healthchecks.py (100%) rename trains/stable/syncthing/{1.0.27 => 1.0.28}/templates/library/base_v1_1_4/mariadb.py (100%) rename trains/stable/syncthing/{1.0.27 => 1.0.28}/templates/library/base_v1_1_4/metadata.py (100%) rename trains/stable/syncthing/{1.0.27 => 1.0.28}/templates/library/base_v1_1_4/network.py (100%) rename trains/stable/syncthing/{1.0.27 => 1.0.28}/templates/library/base_v1_1_4/permissions.py (100%) rename trains/stable/syncthing/{1.0.27 => 1.0.28}/templates/library/base_v1_1_4/ports.py (100%) rename trains/stable/syncthing/{1.0.27 => 1.0.28}/templates/library/base_v1_1_4/postgres.py (100%) rename trains/stable/syncthing/{1.0.27 => 1.0.28}/templates/library/base_v1_1_4/redis.py (100%) rename trains/stable/syncthing/{1.0.27 => 1.0.28}/templates/library/base_v1_1_4/resources.py (100%) rename trains/stable/syncthing/{1.0.27 => 1.0.28}/templates/library/base_v1_1_4/security.py (100%) rename trains/stable/syncthing/{1.0.27 => 1.0.28}/templates/library/base_v1_1_4/storage.py (100%) rename trains/stable/syncthing/{1.0.27 => 1.0.28}/templates/library/base_v1_1_4/utils.py (100%) rename trains/stable/syncthing/{1.0.27 => 1.0.28}/templates/test_values/basic-values.yaml (100%) rename trains/stable/syncthing/{1.0.27 => 1.0.28}/templates/test_values/host-values.yaml (100%) diff --git a/trains/community/castopod/1.0.9/README.md b/trains/community/castopod/1.0.10/README.md similarity index 100% rename from trains/community/castopod/1.0.9/README.md rename to trains/community/castopod/1.0.10/README.md diff --git a/trains/community/castopod/1.0.9/app.yaml b/trains/community/castopod/1.0.10/app.yaml similarity index 97% rename from trains/community/castopod/1.0.9/app.yaml rename to trains/community/castopod/1.0.10/app.yaml index 90868bbbcb..4645ecf9d6 100644 --- a/trains/community/castopod/1.0.9/app.yaml +++ b/trains/community/castopod/1.0.10/app.yaml @@ -1,4 +1,4 @@ -app_version: 1.12.10 +app_version: 1.12.11 capabilities: - description: Castopod is able to chown files. name: CHOWN @@ -49,4 +49,4 @@ sources: - https://code.castopod.org/adaures/castopod title: Castopod train: community -version: 1.0.9 +version: 1.0.10 diff --git a/trains/community/castopod/1.0.9/ix_values.yaml b/trains/community/castopod/1.0.10/ix_values.yaml similarity index 93% rename from trains/community/castopod/1.0.9/ix_values.yaml rename to trains/community/castopod/1.0.10/ix_values.yaml index 80c83b0f7e..c95ed9e38f 100644 --- a/trains/community/castopod/1.0.9/ix_values.yaml +++ b/trains/community/castopod/1.0.10/ix_values.yaml @@ -1,10 +1,10 @@ images: image: repository: castopod/app - tag: "1.12.10" + tag: "1.12.11" web_image: repository: castopod/web-server - tag: "1.12.10" + tag: "1.12.11" mariadb_image: repository: mariadb tag: "10.11.9" diff --git a/trains/community/castopod/1.0.9/migrations/migrate_from_kubernetes b/trains/community/castopod/1.0.10/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/castopod/1.0.9/migrations/migrate_from_kubernetes rename to trains/community/castopod/1.0.10/migrations/migrate_from_kubernetes diff --git a/trains/community/castopod/1.0.9/migrations/migration_helpers/__init__.py b/trains/community/castopod/1.0.10/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/castopod/1.0.9/migrations/migration_helpers/__init__.py rename to trains/community/castopod/1.0.10/migrations/migration_helpers/__init__.py diff --git a/trains/community/castopod/1.0.9/migrations/migration_helpers/cpu.py b/trains/community/castopod/1.0.10/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/castopod/1.0.9/migrations/migration_helpers/cpu.py rename to trains/community/castopod/1.0.10/migrations/migration_helpers/cpu.py diff --git a/trains/community/castopod/1.0.9/migrations/migration_helpers/dns_config.py b/trains/community/castopod/1.0.10/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/castopod/1.0.9/migrations/migration_helpers/dns_config.py rename to trains/community/castopod/1.0.10/migrations/migration_helpers/dns_config.py diff --git a/trains/community/castopod/1.0.9/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/castopod/1.0.10/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/castopod/1.0.9/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/castopod/1.0.10/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/castopod/1.0.9/migrations/migration_helpers/memory.py b/trains/community/castopod/1.0.10/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/castopod/1.0.9/migrations/migration_helpers/memory.py rename to trains/community/castopod/1.0.10/migrations/migration_helpers/memory.py diff --git a/trains/community/castopod/1.0.9/migrations/migration_helpers/resources.py b/trains/community/castopod/1.0.10/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/castopod/1.0.9/migrations/migration_helpers/resources.py rename to trains/community/castopod/1.0.10/migrations/migration_helpers/resources.py diff --git a/trains/community/castopod/1.0.9/migrations/migration_helpers/storage.py b/trains/community/castopod/1.0.10/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/castopod/1.0.9/migrations/migration_helpers/storage.py rename to trains/community/castopod/1.0.10/migrations/migration_helpers/storage.py diff --git a/trains/community/castopod/1.0.9/questions.yaml b/trains/community/castopod/1.0.10/questions.yaml similarity index 100% rename from trains/community/castopod/1.0.9/questions.yaml rename to trains/community/castopod/1.0.10/questions.yaml diff --git a/trains/community/castopod/1.0.9/templates/docker-compose.yaml b/trains/community/castopod/1.0.10/templates/docker-compose.yaml similarity index 100% rename from trains/community/castopod/1.0.9/templates/docker-compose.yaml rename to trains/community/castopod/1.0.10/templates/docker-compose.yaml diff --git a/trains/community/castopod/1.0.9/templates/library/base_v1_1_4/__init__.py b/trains/community/castopod/1.0.10/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/castopod/1.0.9/templates/library/base_v1_1_4/__init__.py rename to trains/community/castopod/1.0.10/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/castopod/1.0.9/templates/library/base_v1_1_4/environment.py b/trains/community/castopod/1.0.10/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/castopod/1.0.9/templates/library/base_v1_1_4/environment.py rename to trains/community/castopod/1.0.10/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/castopod/1.0.9/templates/library/base_v1_1_4/healthchecks.py b/trains/community/castopod/1.0.10/templates/library/base_v1_1_4/healthchecks.py similarity index 100% rename from trains/community/castopod/1.0.9/templates/library/base_v1_1_4/healthchecks.py rename to trains/community/castopod/1.0.10/templates/library/base_v1_1_4/healthchecks.py diff --git a/trains/community/castopod/1.0.9/templates/library/base_v1_1_4/mariadb.py b/trains/community/castopod/1.0.10/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/castopod/1.0.9/templates/library/base_v1_1_4/mariadb.py rename to trains/community/castopod/1.0.10/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/castopod/1.0.9/templates/library/base_v1_1_4/metadata.py b/trains/community/castopod/1.0.10/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/castopod/1.0.9/templates/library/base_v1_1_4/metadata.py rename to trains/community/castopod/1.0.10/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/castopod/1.0.9/templates/library/base_v1_1_4/network.py b/trains/community/castopod/1.0.10/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/castopod/1.0.9/templates/library/base_v1_1_4/network.py rename to trains/community/castopod/1.0.10/templates/library/base_v1_1_4/network.py diff --git a/trains/community/castopod/1.0.9/templates/library/base_v1_1_4/permissions.py b/trains/community/castopod/1.0.10/templates/library/base_v1_1_4/permissions.py similarity index 100% rename from trains/community/castopod/1.0.9/templates/library/base_v1_1_4/permissions.py rename to trains/community/castopod/1.0.10/templates/library/base_v1_1_4/permissions.py diff --git a/trains/community/castopod/1.0.9/templates/library/base_v1_1_4/ports.py b/trains/community/castopod/1.0.10/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/castopod/1.0.9/templates/library/base_v1_1_4/ports.py rename to trains/community/castopod/1.0.10/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/castopod/1.0.9/templates/library/base_v1_1_4/postgres.py b/trains/community/castopod/1.0.10/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/castopod/1.0.9/templates/library/base_v1_1_4/postgres.py rename to trains/community/castopod/1.0.10/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/castopod/1.0.9/templates/library/base_v1_1_4/redis.py b/trains/community/castopod/1.0.10/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/castopod/1.0.9/templates/library/base_v1_1_4/redis.py rename to trains/community/castopod/1.0.10/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/castopod/1.0.9/templates/library/base_v1_1_4/resources.py b/trains/community/castopod/1.0.10/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/castopod/1.0.9/templates/library/base_v1_1_4/resources.py rename to trains/community/castopod/1.0.10/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/castopod/1.0.9/templates/library/base_v1_1_4/security.py b/trains/community/castopod/1.0.10/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/castopod/1.0.9/templates/library/base_v1_1_4/security.py rename to trains/community/castopod/1.0.10/templates/library/base_v1_1_4/security.py diff --git a/trains/community/castopod/1.0.9/templates/library/base_v1_1_4/storage.py b/trains/community/castopod/1.0.10/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/castopod/1.0.9/templates/library/base_v1_1_4/storage.py rename to trains/community/castopod/1.0.10/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/castopod/1.0.9/templates/library/base_v1_1_4/utils.py b/trains/community/castopod/1.0.10/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/castopod/1.0.9/templates/library/base_v1_1_4/utils.py rename to trains/community/castopod/1.0.10/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/castopod/1.0.9/templates/test_values/2fa-values.yaml b/trains/community/castopod/1.0.10/templates/test_values/2fa-values.yaml similarity index 100% rename from trains/community/castopod/1.0.9/templates/test_values/2fa-values.yaml rename to trains/community/castopod/1.0.10/templates/test_values/2fa-values.yaml diff --git a/trains/community/castopod/1.0.9/templates/test_values/basic-values.yaml b/trains/community/castopod/1.0.10/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/castopod/1.0.9/templates/test_values/basic-values.yaml rename to trains/community/castopod/1.0.10/templates/test_values/basic-values.yaml diff --git a/trains/community/castopod/1.0.9/templates/test_values/redirect-values.yaml b/trains/community/castopod/1.0.10/templates/test_values/redirect-values.yaml similarity index 100% rename from trains/community/castopod/1.0.9/templates/test_values/redirect-values.yaml rename to trains/community/castopod/1.0.10/templates/test_values/redirect-values.yaml diff --git a/trains/community/homepage/1.0.22/README.md b/trains/community/homepage/1.0.23/README.md similarity index 100% rename from trains/community/homepage/1.0.22/README.md rename to trains/community/homepage/1.0.23/README.md diff --git a/trains/community/homepage/1.0.22/app.yaml b/trains/community/homepage/1.0.23/app.yaml similarity index 96% rename from trains/community/homepage/1.0.22/app.yaml rename to trains/community/homepage/1.0.23/app.yaml index adde8e9804..7504723007 100644 --- a/trains/community/homepage/1.0.22/app.yaml +++ b/trains/community/homepage/1.0.23/app.yaml @@ -1,4 +1,4 @@ -app_version: v0.9.10 +app_version: v0.9.11 capabilities: [] categories: - productivity @@ -33,4 +33,4 @@ sources: - https://github.com/benphelps/homepage title: Homepage train: community -version: 1.0.22 +version: 1.0.23 diff --git a/trains/community/homepage/1.0.22/ix_values.yaml b/trains/community/homepage/1.0.23/ix_values.yaml similarity index 91% rename from trains/community/homepage/1.0.22/ix_values.yaml rename to trains/community/homepage/1.0.23/ix_values.yaml index 54b5f593dd..c0f7c003a7 100644 --- a/trains/community/homepage/1.0.22/ix_values.yaml +++ b/trains/community/homepage/1.0.23/ix_values.yaml @@ -1,7 +1,7 @@ images: image: repository: ghcr.io/gethomepage/homepage - tag: v0.9.10 + tag: v0.9.11 consts: perms_container_name: permissions diff --git a/trains/community/homepage/1.0.22/migrations/migrate_from_kubernetes b/trains/community/homepage/1.0.23/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/homepage/1.0.22/migrations/migrate_from_kubernetes rename to trains/community/homepage/1.0.23/migrations/migrate_from_kubernetes diff --git a/trains/community/homepage/1.0.22/migrations/migration_helpers/__init__.py b/trains/community/homepage/1.0.23/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/homepage/1.0.22/migrations/migration_helpers/__init__.py rename to trains/community/homepage/1.0.23/migrations/migration_helpers/__init__.py diff --git a/trains/community/homepage/1.0.22/migrations/migration_helpers/cpu.py b/trains/community/homepage/1.0.23/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/homepage/1.0.22/migrations/migration_helpers/cpu.py rename to trains/community/homepage/1.0.23/migrations/migration_helpers/cpu.py diff --git a/trains/community/homepage/1.0.22/migrations/migration_helpers/dns_config.py b/trains/community/homepage/1.0.23/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/homepage/1.0.22/migrations/migration_helpers/dns_config.py rename to trains/community/homepage/1.0.23/migrations/migration_helpers/dns_config.py diff --git a/trains/community/homepage/1.0.22/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/homepage/1.0.23/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/homepage/1.0.22/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/homepage/1.0.23/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/homepage/1.0.22/migrations/migration_helpers/memory.py b/trains/community/homepage/1.0.23/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/homepage/1.0.22/migrations/migration_helpers/memory.py rename to trains/community/homepage/1.0.23/migrations/migration_helpers/memory.py diff --git a/trains/community/homepage/1.0.22/migrations/migration_helpers/resources.py b/trains/community/homepage/1.0.23/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/homepage/1.0.22/migrations/migration_helpers/resources.py rename to trains/community/homepage/1.0.23/migrations/migration_helpers/resources.py diff --git a/trains/community/homepage/1.0.22/migrations/migration_helpers/storage.py b/trains/community/homepage/1.0.23/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/homepage/1.0.22/migrations/migration_helpers/storage.py rename to trains/community/homepage/1.0.23/migrations/migration_helpers/storage.py diff --git a/trains/community/homepage/1.0.22/questions.yaml b/trains/community/homepage/1.0.23/questions.yaml similarity index 100% rename from trains/community/homepage/1.0.22/questions.yaml rename to trains/community/homepage/1.0.23/questions.yaml diff --git a/trains/community/homepage/1.0.22/templates/docker-compose.yaml b/trains/community/homepage/1.0.23/templates/docker-compose.yaml similarity index 100% rename from trains/community/homepage/1.0.22/templates/docker-compose.yaml rename to trains/community/homepage/1.0.23/templates/docker-compose.yaml diff --git a/trains/community/homepage/1.0.22/templates/library/base_v1_1_4/__init__.py b/trains/community/homepage/1.0.23/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/homepage/1.0.22/templates/library/base_v1_1_4/__init__.py rename to trains/community/homepage/1.0.23/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/homepage/1.0.22/templates/library/base_v1_1_4/environment.py b/trains/community/homepage/1.0.23/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/homepage/1.0.22/templates/library/base_v1_1_4/environment.py rename to trains/community/homepage/1.0.23/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/homepage/1.0.22/templates/library/base_v1_1_4/healthchecks.py b/trains/community/homepage/1.0.23/templates/library/base_v1_1_4/healthchecks.py similarity index 100% rename from trains/community/homepage/1.0.22/templates/library/base_v1_1_4/healthchecks.py rename to trains/community/homepage/1.0.23/templates/library/base_v1_1_4/healthchecks.py diff --git a/trains/community/homepage/1.0.22/templates/library/base_v1_1_4/mariadb.py b/trains/community/homepage/1.0.23/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/homepage/1.0.22/templates/library/base_v1_1_4/mariadb.py rename to trains/community/homepage/1.0.23/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/homepage/1.0.22/templates/library/base_v1_1_4/metadata.py b/trains/community/homepage/1.0.23/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/homepage/1.0.22/templates/library/base_v1_1_4/metadata.py rename to trains/community/homepage/1.0.23/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/homepage/1.0.22/templates/library/base_v1_1_4/network.py b/trains/community/homepage/1.0.23/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/homepage/1.0.22/templates/library/base_v1_1_4/network.py rename to trains/community/homepage/1.0.23/templates/library/base_v1_1_4/network.py diff --git a/trains/community/homepage/1.0.22/templates/library/base_v1_1_4/permissions.py b/trains/community/homepage/1.0.23/templates/library/base_v1_1_4/permissions.py similarity index 100% rename from trains/community/homepage/1.0.22/templates/library/base_v1_1_4/permissions.py rename to trains/community/homepage/1.0.23/templates/library/base_v1_1_4/permissions.py diff --git a/trains/community/homepage/1.0.22/templates/library/base_v1_1_4/ports.py b/trains/community/homepage/1.0.23/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/homepage/1.0.22/templates/library/base_v1_1_4/ports.py rename to trains/community/homepage/1.0.23/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/homepage/1.0.22/templates/library/base_v1_1_4/postgres.py b/trains/community/homepage/1.0.23/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/homepage/1.0.22/templates/library/base_v1_1_4/postgres.py rename to trains/community/homepage/1.0.23/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/homepage/1.0.22/templates/library/base_v1_1_4/redis.py b/trains/community/homepage/1.0.23/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/homepage/1.0.22/templates/library/base_v1_1_4/redis.py rename to trains/community/homepage/1.0.23/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/homepage/1.0.22/templates/library/base_v1_1_4/resources.py b/trains/community/homepage/1.0.23/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/homepage/1.0.22/templates/library/base_v1_1_4/resources.py rename to trains/community/homepage/1.0.23/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/homepage/1.0.22/templates/library/base_v1_1_4/security.py b/trains/community/homepage/1.0.23/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/homepage/1.0.22/templates/library/base_v1_1_4/security.py rename to trains/community/homepage/1.0.23/templates/library/base_v1_1_4/security.py diff --git a/trains/community/homepage/1.0.22/templates/library/base_v1_1_4/storage.py b/trains/community/homepage/1.0.23/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/homepage/1.0.22/templates/library/base_v1_1_4/storage.py rename to trains/community/homepage/1.0.23/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/homepage/1.0.22/templates/library/base_v1_1_4/utils.py b/trains/community/homepage/1.0.23/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/homepage/1.0.22/templates/library/base_v1_1_4/utils.py rename to trains/community/homepage/1.0.23/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/homepage/1.0.22/templates/test_values/basic-values.yaml b/trains/community/homepage/1.0.23/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/homepage/1.0.22/templates/test_values/basic-values.yaml rename to trains/community/homepage/1.0.23/templates/test_values/basic-values.yaml diff --git a/trains/community/immich/1.6.19/README.md b/trains/community/immich/1.6.20/README.md similarity index 100% rename from trains/community/immich/1.6.19/README.md rename to trains/community/immich/1.6.20/README.md diff --git a/trains/community/immich/1.6.19/app.yaml b/trains/community/immich/1.6.20/app.yaml similarity index 96% rename from trains/community/immich/1.6.19/app.yaml rename to trains/community/immich/1.6.20/app.yaml index 24c6bc2296..f296ae9a06 100644 --- a/trains/community/immich/1.6.19/app.yaml +++ b/trains/community/immich/1.6.20/app.yaml @@ -1,4 +1,4 @@ -app_version: v1.118.0 +app_version: v1.118.1 capabilities: - description: Immich Proxy is able to chown files. name: CHOWN @@ -45,4 +45,4 @@ sources: - https://github.com/immich-app/immich title: Immich train: community -version: 1.6.19 +version: 1.6.20 diff --git a/trains/community/immich/1.6.19/ix_values.yaml b/trains/community/immich/1.6.20/ix_values.yaml similarity index 89% rename from trains/community/immich/1.6.19/ix_values.yaml rename to trains/community/immich/1.6.20/ix_values.yaml index 62498af975..5ef22a48c0 100644 --- a/trains/community/immich/1.6.19/ix_values.yaml +++ b/trains/community/immich/1.6.20/ix_values.yaml @@ -1,16 +1,16 @@ images: image: repository: altran1502/immich-server - tag: v1.118.0 + tag: v1.118.1 ml_image: repository: altran1502/immich-machine-learning - tag: v1.118.0 + tag: v1.118.1 ml_cuda_image: repository: altran1502/immich-machine-learning - tag: v1.118.0-cuda + tag: v1.118.1-cuda ml_openvino_image: repository: altran1502/immich-machine-learning - tag: v1.118.0-openvino + tag: v1.118.1-openvino pgvecto_image: repository: tensorchord/pgvecto-rs tag: pg15-v0.2.0 diff --git a/trains/community/immich/1.6.19/migrations/migrate_from_kubernetes b/trains/community/immich/1.6.20/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/immich/1.6.19/migrations/migrate_from_kubernetes rename to trains/community/immich/1.6.20/migrations/migrate_from_kubernetes diff --git a/trains/community/immich/1.6.19/migrations/migration_helpers/__init__.py b/trains/community/immich/1.6.20/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/immich/1.6.19/migrations/migration_helpers/__init__.py rename to trains/community/immich/1.6.20/migrations/migration_helpers/__init__.py diff --git a/trains/community/immich/1.6.19/migrations/migration_helpers/cpu.py b/trains/community/immich/1.6.20/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/immich/1.6.19/migrations/migration_helpers/cpu.py rename to trains/community/immich/1.6.20/migrations/migration_helpers/cpu.py diff --git a/trains/community/immich/1.6.19/migrations/migration_helpers/dns_config.py b/trains/community/immich/1.6.20/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/immich/1.6.19/migrations/migration_helpers/dns_config.py rename to trains/community/immich/1.6.20/migrations/migration_helpers/dns_config.py diff --git a/trains/community/immich/1.6.19/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/immich/1.6.20/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/immich/1.6.19/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/immich/1.6.20/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/immich/1.6.19/migrations/migration_helpers/memory.py b/trains/community/immich/1.6.20/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/immich/1.6.19/migrations/migration_helpers/memory.py rename to trains/community/immich/1.6.20/migrations/migration_helpers/memory.py diff --git a/trains/community/immich/1.6.19/migrations/migration_helpers/resources.py b/trains/community/immich/1.6.20/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/immich/1.6.19/migrations/migration_helpers/resources.py rename to trains/community/immich/1.6.20/migrations/migration_helpers/resources.py diff --git a/trains/community/immich/1.6.19/migrations/migration_helpers/storage.py b/trains/community/immich/1.6.20/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/immich/1.6.19/migrations/migration_helpers/storage.py rename to trains/community/immich/1.6.20/migrations/migration_helpers/storage.py diff --git a/trains/community/immich/1.6.19/questions.yaml b/trains/community/immich/1.6.20/questions.yaml similarity index 100% rename from trains/community/immich/1.6.19/questions.yaml rename to trains/community/immich/1.6.20/questions.yaml diff --git a/trains/community/immich/1.6.19/templates/docker-compose.yaml b/trains/community/immich/1.6.20/templates/docker-compose.yaml similarity index 100% rename from trains/community/immich/1.6.19/templates/docker-compose.yaml rename to trains/community/immich/1.6.20/templates/docker-compose.yaml diff --git a/trains/community/immich/1.6.19/templates/library/base_v1_1_4/__init__.py b/trains/community/immich/1.6.20/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/immich/1.6.19/templates/library/base_v1_1_4/__init__.py rename to trains/community/immich/1.6.20/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/immich/1.6.19/templates/library/base_v1_1_4/environment.py b/trains/community/immich/1.6.20/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/immich/1.6.19/templates/library/base_v1_1_4/environment.py rename to trains/community/immich/1.6.20/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/immich/1.6.19/templates/library/base_v1_1_4/healthchecks.py b/trains/community/immich/1.6.20/templates/library/base_v1_1_4/healthchecks.py similarity index 100% rename from trains/community/immich/1.6.19/templates/library/base_v1_1_4/healthchecks.py rename to trains/community/immich/1.6.20/templates/library/base_v1_1_4/healthchecks.py diff --git a/trains/community/immich/1.6.19/templates/library/base_v1_1_4/mariadb.py b/trains/community/immich/1.6.20/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/immich/1.6.19/templates/library/base_v1_1_4/mariadb.py rename to trains/community/immich/1.6.20/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/immich/1.6.19/templates/library/base_v1_1_4/metadata.py b/trains/community/immich/1.6.20/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/immich/1.6.19/templates/library/base_v1_1_4/metadata.py rename to trains/community/immich/1.6.20/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/immich/1.6.19/templates/library/base_v1_1_4/network.py b/trains/community/immich/1.6.20/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/immich/1.6.19/templates/library/base_v1_1_4/network.py rename to trains/community/immich/1.6.20/templates/library/base_v1_1_4/network.py diff --git a/trains/community/immich/1.6.19/templates/library/base_v1_1_4/permissions.py b/trains/community/immich/1.6.20/templates/library/base_v1_1_4/permissions.py similarity index 100% rename from trains/community/immich/1.6.19/templates/library/base_v1_1_4/permissions.py rename to trains/community/immich/1.6.20/templates/library/base_v1_1_4/permissions.py diff --git a/trains/community/immich/1.6.19/templates/library/base_v1_1_4/ports.py b/trains/community/immich/1.6.20/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/immich/1.6.19/templates/library/base_v1_1_4/ports.py rename to trains/community/immich/1.6.20/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/immich/1.6.19/templates/library/base_v1_1_4/postgres.py b/trains/community/immich/1.6.20/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/immich/1.6.19/templates/library/base_v1_1_4/postgres.py rename to trains/community/immich/1.6.20/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/immich/1.6.19/templates/library/base_v1_1_4/redis.py b/trains/community/immich/1.6.20/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/immich/1.6.19/templates/library/base_v1_1_4/redis.py rename to trains/community/immich/1.6.20/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/immich/1.6.19/templates/library/base_v1_1_4/resources.py b/trains/community/immich/1.6.20/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/immich/1.6.19/templates/library/base_v1_1_4/resources.py rename to trains/community/immich/1.6.20/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/immich/1.6.19/templates/library/base_v1_1_4/security.py b/trains/community/immich/1.6.20/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/immich/1.6.19/templates/library/base_v1_1_4/security.py rename to trains/community/immich/1.6.20/templates/library/base_v1_1_4/security.py diff --git a/trains/community/immich/1.6.19/templates/library/base_v1_1_4/storage.py b/trains/community/immich/1.6.20/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/immich/1.6.19/templates/library/base_v1_1_4/storage.py rename to trains/community/immich/1.6.20/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/immich/1.6.19/templates/library/base_v1_1_4/utils.py b/trains/community/immich/1.6.20/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/immich/1.6.19/templates/library/base_v1_1_4/utils.py rename to trains/community/immich/1.6.20/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/immich/1.6.19/templates/test_values/basic-values.yaml b/trains/community/immich/1.6.20/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/immich/1.6.19/templates/test_values/basic-values.yaml rename to trains/community/immich/1.6.20/templates/test_values/basic-values.yaml diff --git a/trains/community/ipfs/1.0.19/README.md b/trains/community/ipfs/1.0.20/README.md similarity index 100% rename from trains/community/ipfs/1.0.19/README.md rename to trains/community/ipfs/1.0.20/README.md diff --git a/trains/community/ipfs/1.0.19/app.yaml b/trains/community/ipfs/1.0.20/app.yaml similarity index 95% rename from trains/community/ipfs/1.0.19/app.yaml rename to trains/community/ipfs/1.0.20/app.yaml index d05581545b..2cacf1cff5 100644 --- a/trains/community/ipfs/1.0.19/app.yaml +++ b/trains/community/ipfs/1.0.20/app.yaml @@ -1,4 +1,4 @@ -app_version: v0.30.0 +app_version: v0.31.0 capabilities: [] categories: - storage @@ -33,4 +33,4 @@ sources: - https://ipfs.tech/ title: IPFS train: community -version: 1.0.19 +version: 1.0.20 diff --git a/trains/community/ipfs/1.0.19/ix_values.yaml b/trains/community/ipfs/1.0.20/ix_values.yaml similarity index 90% rename from trains/community/ipfs/1.0.19/ix_values.yaml rename to trains/community/ipfs/1.0.20/ix_values.yaml index 823aa12838..a1f91c9921 100644 --- a/trains/community/ipfs/1.0.19/ix_values.yaml +++ b/trains/community/ipfs/1.0.20/ix_values.yaml @@ -1,7 +1,7 @@ images: image: repository: ipfs/kubo - tag: v0.30.0 + tag: v0.31.0 consts: ipfs_container_name: ipfs diff --git a/trains/community/ipfs/1.0.19/migrations/migrate_from_kubernetes b/trains/community/ipfs/1.0.20/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/ipfs/1.0.19/migrations/migrate_from_kubernetes rename to trains/community/ipfs/1.0.20/migrations/migrate_from_kubernetes diff --git a/trains/community/ipfs/1.0.19/migrations/migration_helpers/__init__.py b/trains/community/ipfs/1.0.20/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/ipfs/1.0.19/migrations/migration_helpers/__init__.py rename to trains/community/ipfs/1.0.20/migrations/migration_helpers/__init__.py diff --git a/trains/community/ipfs/1.0.19/migrations/migration_helpers/cpu.py b/trains/community/ipfs/1.0.20/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/ipfs/1.0.19/migrations/migration_helpers/cpu.py rename to trains/community/ipfs/1.0.20/migrations/migration_helpers/cpu.py diff --git a/trains/community/ipfs/1.0.19/migrations/migration_helpers/dns_config.py b/trains/community/ipfs/1.0.20/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/ipfs/1.0.19/migrations/migration_helpers/dns_config.py rename to trains/community/ipfs/1.0.20/migrations/migration_helpers/dns_config.py diff --git a/trains/community/ipfs/1.0.19/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/ipfs/1.0.20/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/ipfs/1.0.19/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/ipfs/1.0.20/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/ipfs/1.0.19/migrations/migration_helpers/memory.py b/trains/community/ipfs/1.0.20/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/ipfs/1.0.19/migrations/migration_helpers/memory.py rename to trains/community/ipfs/1.0.20/migrations/migration_helpers/memory.py diff --git a/trains/community/ipfs/1.0.19/migrations/migration_helpers/resources.py b/trains/community/ipfs/1.0.20/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/ipfs/1.0.19/migrations/migration_helpers/resources.py rename to trains/community/ipfs/1.0.20/migrations/migration_helpers/resources.py diff --git a/trains/community/ipfs/1.0.19/migrations/migration_helpers/storage.py b/trains/community/ipfs/1.0.20/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/ipfs/1.0.19/migrations/migration_helpers/storage.py rename to trains/community/ipfs/1.0.20/migrations/migration_helpers/storage.py diff --git a/trains/community/ipfs/1.0.19/questions.yaml b/trains/community/ipfs/1.0.20/questions.yaml similarity index 100% rename from trains/community/ipfs/1.0.19/questions.yaml rename to trains/community/ipfs/1.0.20/questions.yaml diff --git a/trains/community/ipfs/1.0.19/templates/docker-compose.yaml b/trains/community/ipfs/1.0.20/templates/docker-compose.yaml similarity index 100% rename from trains/community/ipfs/1.0.19/templates/docker-compose.yaml rename to trains/community/ipfs/1.0.20/templates/docker-compose.yaml diff --git a/trains/community/ipfs/1.0.19/templates/library/base_v1_1_4/__init__.py b/trains/community/ipfs/1.0.20/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/ipfs/1.0.19/templates/library/base_v1_1_4/__init__.py rename to trains/community/ipfs/1.0.20/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/ipfs/1.0.19/templates/library/base_v1_1_4/environment.py b/trains/community/ipfs/1.0.20/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/ipfs/1.0.19/templates/library/base_v1_1_4/environment.py rename to trains/community/ipfs/1.0.20/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/ipfs/1.0.19/templates/library/base_v1_1_4/healthchecks.py b/trains/community/ipfs/1.0.20/templates/library/base_v1_1_4/healthchecks.py similarity index 100% rename from trains/community/ipfs/1.0.19/templates/library/base_v1_1_4/healthchecks.py rename to trains/community/ipfs/1.0.20/templates/library/base_v1_1_4/healthchecks.py diff --git a/trains/community/ipfs/1.0.19/templates/library/base_v1_1_4/mariadb.py b/trains/community/ipfs/1.0.20/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/ipfs/1.0.19/templates/library/base_v1_1_4/mariadb.py rename to trains/community/ipfs/1.0.20/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/ipfs/1.0.19/templates/library/base_v1_1_4/metadata.py b/trains/community/ipfs/1.0.20/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/ipfs/1.0.19/templates/library/base_v1_1_4/metadata.py rename to trains/community/ipfs/1.0.20/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/ipfs/1.0.19/templates/library/base_v1_1_4/network.py b/trains/community/ipfs/1.0.20/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/ipfs/1.0.19/templates/library/base_v1_1_4/network.py rename to trains/community/ipfs/1.0.20/templates/library/base_v1_1_4/network.py diff --git a/trains/community/ipfs/1.0.19/templates/library/base_v1_1_4/permissions.py b/trains/community/ipfs/1.0.20/templates/library/base_v1_1_4/permissions.py similarity index 100% rename from trains/community/ipfs/1.0.19/templates/library/base_v1_1_4/permissions.py rename to trains/community/ipfs/1.0.20/templates/library/base_v1_1_4/permissions.py diff --git a/trains/community/ipfs/1.0.19/templates/library/base_v1_1_4/ports.py b/trains/community/ipfs/1.0.20/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/ipfs/1.0.19/templates/library/base_v1_1_4/ports.py rename to trains/community/ipfs/1.0.20/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/ipfs/1.0.19/templates/library/base_v1_1_4/postgres.py b/trains/community/ipfs/1.0.20/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/ipfs/1.0.19/templates/library/base_v1_1_4/postgres.py rename to trains/community/ipfs/1.0.20/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/ipfs/1.0.19/templates/library/base_v1_1_4/redis.py b/trains/community/ipfs/1.0.20/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/ipfs/1.0.19/templates/library/base_v1_1_4/redis.py rename to trains/community/ipfs/1.0.20/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/ipfs/1.0.19/templates/library/base_v1_1_4/resources.py b/trains/community/ipfs/1.0.20/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/ipfs/1.0.19/templates/library/base_v1_1_4/resources.py rename to trains/community/ipfs/1.0.20/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/ipfs/1.0.19/templates/library/base_v1_1_4/security.py b/trains/community/ipfs/1.0.20/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/ipfs/1.0.19/templates/library/base_v1_1_4/security.py rename to trains/community/ipfs/1.0.20/templates/library/base_v1_1_4/security.py diff --git a/trains/community/ipfs/1.0.19/templates/library/base_v1_1_4/storage.py b/trains/community/ipfs/1.0.20/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/ipfs/1.0.19/templates/library/base_v1_1_4/storage.py rename to trains/community/ipfs/1.0.20/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/ipfs/1.0.19/templates/library/base_v1_1_4/utils.py b/trains/community/ipfs/1.0.20/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/ipfs/1.0.19/templates/library/base_v1_1_4/utils.py rename to trains/community/ipfs/1.0.20/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/ipfs/1.0.19/templates/test_values/basic-values.yaml b/trains/community/ipfs/1.0.20/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/ipfs/1.0.19/templates/test_values/basic-values.yaml rename to trains/community/ipfs/1.0.20/templates/test_values/basic-values.yaml diff --git a/trains/community/n8n/1.3.23/README.md b/trains/community/n8n/1.3.24/README.md similarity index 100% rename from trains/community/n8n/1.3.23/README.md rename to trains/community/n8n/1.3.24/README.md diff --git a/trains/community/n8n/1.3.23/app.yaml b/trains/community/n8n/1.3.24/app.yaml similarity index 97% rename from trains/community/n8n/1.3.23/app.yaml rename to trains/community/n8n/1.3.24/app.yaml index 7f220747a4..799cca574b 100644 --- a/trains/community/n8n/1.3.23/app.yaml +++ b/trains/community/n8n/1.3.24/app.yaml @@ -1,4 +1,4 @@ -app_version: 1.63.2 +app_version: 1.64.0 capabilities: [] categories: - productivity @@ -42,4 +42,4 @@ sources: - https://hub.docker.com/r/n8nio/n8n title: n8n train: community -version: 1.3.23 +version: 1.3.24 diff --git a/trains/community/n8n/1.3.23/ix_values.yaml b/trains/community/n8n/1.3.24/ix_values.yaml similarity index 96% rename from trains/community/n8n/1.3.23/ix_values.yaml rename to trains/community/n8n/1.3.24/ix_values.yaml index 8a54760685..f3e63e3451 100644 --- a/trains/community/n8n/1.3.23/ix_values.yaml +++ b/trains/community/n8n/1.3.24/ix_values.yaml @@ -1,7 +1,7 @@ images: image: repository: n8nio/n8n - tag: "1.63.2" + tag: "1.64.0" postgres_image: repository: postgres tag: "15.8" diff --git a/trains/community/n8n/1.3.23/migrations/migrate_from_kubernetes b/trains/community/n8n/1.3.24/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/n8n/1.3.23/migrations/migrate_from_kubernetes rename to trains/community/n8n/1.3.24/migrations/migrate_from_kubernetes diff --git a/trains/community/n8n/1.3.23/migrations/migration_helpers/__init__.py b/trains/community/n8n/1.3.24/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/n8n/1.3.23/migrations/migration_helpers/__init__.py rename to trains/community/n8n/1.3.24/migrations/migration_helpers/__init__.py diff --git a/trains/community/n8n/1.3.23/migrations/migration_helpers/cpu.py b/trains/community/n8n/1.3.24/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/n8n/1.3.23/migrations/migration_helpers/cpu.py rename to trains/community/n8n/1.3.24/migrations/migration_helpers/cpu.py diff --git a/trains/community/n8n/1.3.23/migrations/migration_helpers/dns_config.py b/trains/community/n8n/1.3.24/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/n8n/1.3.23/migrations/migration_helpers/dns_config.py rename to trains/community/n8n/1.3.24/migrations/migration_helpers/dns_config.py diff --git a/trains/community/n8n/1.3.23/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/n8n/1.3.24/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/n8n/1.3.23/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/n8n/1.3.24/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/n8n/1.3.23/migrations/migration_helpers/memory.py b/trains/community/n8n/1.3.24/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/n8n/1.3.23/migrations/migration_helpers/memory.py rename to trains/community/n8n/1.3.24/migrations/migration_helpers/memory.py diff --git a/trains/community/n8n/1.3.23/migrations/migration_helpers/resources.py b/trains/community/n8n/1.3.24/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/n8n/1.3.23/migrations/migration_helpers/resources.py rename to trains/community/n8n/1.3.24/migrations/migration_helpers/resources.py diff --git a/trains/community/n8n/1.3.23/migrations/migration_helpers/storage.py b/trains/community/n8n/1.3.24/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/n8n/1.3.23/migrations/migration_helpers/storage.py rename to trains/community/n8n/1.3.24/migrations/migration_helpers/storage.py diff --git a/trains/community/n8n/1.3.23/questions.yaml b/trains/community/n8n/1.3.24/questions.yaml similarity index 100% rename from trains/community/n8n/1.3.23/questions.yaml rename to trains/community/n8n/1.3.24/questions.yaml diff --git a/trains/community/n8n/1.3.23/templates/docker-compose.yaml b/trains/community/n8n/1.3.24/templates/docker-compose.yaml similarity index 100% rename from trains/community/n8n/1.3.23/templates/docker-compose.yaml rename to trains/community/n8n/1.3.24/templates/docker-compose.yaml diff --git a/trains/community/n8n/1.3.23/templates/library/base_v1_1_4/__init__.py b/trains/community/n8n/1.3.24/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/n8n/1.3.23/templates/library/base_v1_1_4/__init__.py rename to trains/community/n8n/1.3.24/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/n8n/1.3.23/templates/library/base_v1_1_4/environment.py b/trains/community/n8n/1.3.24/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/n8n/1.3.23/templates/library/base_v1_1_4/environment.py rename to trains/community/n8n/1.3.24/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/n8n/1.3.23/templates/library/base_v1_1_4/healthchecks.py b/trains/community/n8n/1.3.24/templates/library/base_v1_1_4/healthchecks.py similarity index 100% rename from trains/community/n8n/1.3.23/templates/library/base_v1_1_4/healthchecks.py rename to trains/community/n8n/1.3.24/templates/library/base_v1_1_4/healthchecks.py diff --git a/trains/community/n8n/1.3.23/templates/library/base_v1_1_4/mariadb.py b/trains/community/n8n/1.3.24/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/n8n/1.3.23/templates/library/base_v1_1_4/mariadb.py rename to trains/community/n8n/1.3.24/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/n8n/1.3.23/templates/library/base_v1_1_4/metadata.py b/trains/community/n8n/1.3.24/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/n8n/1.3.23/templates/library/base_v1_1_4/metadata.py rename to trains/community/n8n/1.3.24/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/n8n/1.3.23/templates/library/base_v1_1_4/network.py b/trains/community/n8n/1.3.24/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/n8n/1.3.23/templates/library/base_v1_1_4/network.py rename to trains/community/n8n/1.3.24/templates/library/base_v1_1_4/network.py diff --git a/trains/community/n8n/1.3.23/templates/library/base_v1_1_4/permissions.py b/trains/community/n8n/1.3.24/templates/library/base_v1_1_4/permissions.py similarity index 100% rename from trains/community/n8n/1.3.23/templates/library/base_v1_1_4/permissions.py rename to trains/community/n8n/1.3.24/templates/library/base_v1_1_4/permissions.py diff --git a/trains/community/n8n/1.3.23/templates/library/base_v1_1_4/ports.py b/trains/community/n8n/1.3.24/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/n8n/1.3.23/templates/library/base_v1_1_4/ports.py rename to trains/community/n8n/1.3.24/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/n8n/1.3.23/templates/library/base_v1_1_4/postgres.py b/trains/community/n8n/1.3.24/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/n8n/1.3.23/templates/library/base_v1_1_4/postgres.py rename to trains/community/n8n/1.3.24/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/n8n/1.3.23/templates/library/base_v1_1_4/redis.py b/trains/community/n8n/1.3.24/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/n8n/1.3.23/templates/library/base_v1_1_4/redis.py rename to trains/community/n8n/1.3.24/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/n8n/1.3.23/templates/library/base_v1_1_4/resources.py b/trains/community/n8n/1.3.24/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/n8n/1.3.23/templates/library/base_v1_1_4/resources.py rename to trains/community/n8n/1.3.24/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/n8n/1.3.23/templates/library/base_v1_1_4/security.py b/trains/community/n8n/1.3.24/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/n8n/1.3.23/templates/library/base_v1_1_4/security.py rename to trains/community/n8n/1.3.24/templates/library/base_v1_1_4/security.py diff --git a/trains/community/n8n/1.3.23/templates/library/base_v1_1_4/storage.py b/trains/community/n8n/1.3.24/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/n8n/1.3.23/templates/library/base_v1_1_4/storage.py rename to trains/community/n8n/1.3.24/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/n8n/1.3.23/templates/library/base_v1_1_4/utils.py b/trains/community/n8n/1.3.24/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/n8n/1.3.23/templates/library/base_v1_1_4/utils.py rename to trains/community/n8n/1.3.24/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/n8n/1.3.23/templates/test_values/basic-values.yaml b/trains/community/n8n/1.3.24/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/n8n/1.3.23/templates/test_values/basic-values.yaml rename to trains/community/n8n/1.3.24/templates/test_values/basic-values.yaml diff --git a/trains/community/n8n/1.3.23/templates/test_values/https-values.yaml b/trains/community/n8n/1.3.24/templates/test_values/https-values.yaml similarity index 100% rename from trains/community/n8n/1.3.23/templates/test_values/https-values.yaml rename to trains/community/n8n/1.3.24/templates/test_values/https-values.yaml diff --git a/trains/community/nginx-proxy-manager/1.0.20/README.md b/trains/community/nginx-proxy-manager/1.0.21/README.md similarity index 100% rename from trains/community/nginx-proxy-manager/1.0.20/README.md rename to trains/community/nginx-proxy-manager/1.0.21/README.md diff --git a/trains/community/nginx-proxy-manager/1.0.20/app.yaml b/trains/community/nginx-proxy-manager/1.0.21/app.yaml similarity index 97% rename from trains/community/nginx-proxy-manager/1.0.20/app.yaml rename to trains/community/nginx-proxy-manager/1.0.21/app.yaml index 5d13748073..a1b8b97dae 100644 --- a/trains/community/nginx-proxy-manager/1.0.20/app.yaml +++ b/trains/community/nginx-proxy-manager/1.0.21/app.yaml @@ -1,4 +1,4 @@ -app_version: 2.11.3 +app_version: 2.12.0 capabilities: - description: Nginx Proxy Manager requires this ability to switch user for sub-processes. name: SETUID @@ -44,4 +44,4 @@ sources: - https://hub.docker.com/r/jc21/nginx-proxy-manager title: Nginx Proxy Manager train: community -version: 1.0.20 +version: 1.0.21 diff --git a/trains/community/nginx-proxy-manager/1.0.20/ix_values.yaml b/trains/community/nginx-proxy-manager/1.0.21/ix_values.yaml similarity index 95% rename from trains/community/nginx-proxy-manager/1.0.20/ix_values.yaml rename to trains/community/nginx-proxy-manager/1.0.21/ix_values.yaml index 32fcdc91ba..3eab502535 100644 --- a/trains/community/nginx-proxy-manager/1.0.20/ix_values.yaml +++ b/trains/community/nginx-proxy-manager/1.0.21/ix_values.yaml @@ -1,7 +1,7 @@ images: image: repository: jc21/nginx-proxy-manager - tag: 2.11.3 + tag: 2.12.0 consts: npm_container_name: npm data_path: /data diff --git a/trains/community/nginx-proxy-manager/1.0.20/migrations/migrate_from_kubernetes b/trains/community/nginx-proxy-manager/1.0.21/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/nginx-proxy-manager/1.0.20/migrations/migrate_from_kubernetes rename to trains/community/nginx-proxy-manager/1.0.21/migrations/migrate_from_kubernetes diff --git a/trains/community/nginx-proxy-manager/1.0.20/migrations/migration_helpers/__init__.py b/trains/community/nginx-proxy-manager/1.0.21/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/nginx-proxy-manager/1.0.20/migrations/migration_helpers/__init__.py rename to trains/community/nginx-proxy-manager/1.0.21/migrations/migration_helpers/__init__.py diff --git a/trains/community/nginx-proxy-manager/1.0.20/migrations/migration_helpers/cpu.py b/trains/community/nginx-proxy-manager/1.0.21/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/nginx-proxy-manager/1.0.20/migrations/migration_helpers/cpu.py rename to trains/community/nginx-proxy-manager/1.0.21/migrations/migration_helpers/cpu.py diff --git a/trains/community/nginx-proxy-manager/1.0.20/migrations/migration_helpers/dns_config.py b/trains/community/nginx-proxy-manager/1.0.21/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/nginx-proxy-manager/1.0.20/migrations/migration_helpers/dns_config.py rename to trains/community/nginx-proxy-manager/1.0.21/migrations/migration_helpers/dns_config.py diff --git a/trains/community/nginx-proxy-manager/1.0.20/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/nginx-proxy-manager/1.0.21/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/nginx-proxy-manager/1.0.20/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/nginx-proxy-manager/1.0.21/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/nginx-proxy-manager/1.0.20/migrations/migration_helpers/memory.py b/trains/community/nginx-proxy-manager/1.0.21/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/nginx-proxy-manager/1.0.20/migrations/migration_helpers/memory.py rename to trains/community/nginx-proxy-manager/1.0.21/migrations/migration_helpers/memory.py diff --git a/trains/community/nginx-proxy-manager/1.0.20/migrations/migration_helpers/resources.py b/trains/community/nginx-proxy-manager/1.0.21/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/nginx-proxy-manager/1.0.20/migrations/migration_helpers/resources.py rename to trains/community/nginx-proxy-manager/1.0.21/migrations/migration_helpers/resources.py diff --git a/trains/community/nginx-proxy-manager/1.0.20/migrations/migration_helpers/storage.py b/trains/community/nginx-proxy-manager/1.0.21/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/nginx-proxy-manager/1.0.20/migrations/migration_helpers/storage.py rename to trains/community/nginx-proxy-manager/1.0.21/migrations/migration_helpers/storage.py diff --git a/trains/community/nginx-proxy-manager/1.0.20/questions.yaml b/trains/community/nginx-proxy-manager/1.0.21/questions.yaml similarity index 100% rename from trains/community/nginx-proxy-manager/1.0.20/questions.yaml rename to trains/community/nginx-proxy-manager/1.0.21/questions.yaml diff --git a/trains/community/nginx-proxy-manager/1.0.20/templates/docker-compose.yaml b/trains/community/nginx-proxy-manager/1.0.21/templates/docker-compose.yaml similarity index 100% rename from trains/community/nginx-proxy-manager/1.0.20/templates/docker-compose.yaml rename to trains/community/nginx-proxy-manager/1.0.21/templates/docker-compose.yaml diff --git a/trains/community/nginx-proxy-manager/1.0.20/templates/library/base_v1_1_4/__init__.py b/trains/community/nginx-proxy-manager/1.0.21/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/nginx-proxy-manager/1.0.20/templates/library/base_v1_1_4/__init__.py rename to trains/community/nginx-proxy-manager/1.0.21/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/nginx-proxy-manager/1.0.20/templates/library/base_v1_1_4/environment.py b/trains/community/nginx-proxy-manager/1.0.21/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/nginx-proxy-manager/1.0.20/templates/library/base_v1_1_4/environment.py rename to trains/community/nginx-proxy-manager/1.0.21/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/nginx-proxy-manager/1.0.20/templates/library/base_v1_1_4/healthchecks.py b/trains/community/nginx-proxy-manager/1.0.21/templates/library/base_v1_1_4/healthchecks.py similarity index 100% rename from trains/community/nginx-proxy-manager/1.0.20/templates/library/base_v1_1_4/healthchecks.py rename to trains/community/nginx-proxy-manager/1.0.21/templates/library/base_v1_1_4/healthchecks.py diff --git a/trains/community/nginx-proxy-manager/1.0.20/templates/library/base_v1_1_4/mariadb.py b/trains/community/nginx-proxy-manager/1.0.21/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/nginx-proxy-manager/1.0.20/templates/library/base_v1_1_4/mariadb.py rename to trains/community/nginx-proxy-manager/1.0.21/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/nginx-proxy-manager/1.0.20/templates/library/base_v1_1_4/metadata.py b/trains/community/nginx-proxy-manager/1.0.21/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/nginx-proxy-manager/1.0.20/templates/library/base_v1_1_4/metadata.py rename to trains/community/nginx-proxy-manager/1.0.21/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/nginx-proxy-manager/1.0.20/templates/library/base_v1_1_4/network.py b/trains/community/nginx-proxy-manager/1.0.21/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/nginx-proxy-manager/1.0.20/templates/library/base_v1_1_4/network.py rename to trains/community/nginx-proxy-manager/1.0.21/templates/library/base_v1_1_4/network.py diff --git a/trains/community/nginx-proxy-manager/1.0.20/templates/library/base_v1_1_4/permissions.py b/trains/community/nginx-proxy-manager/1.0.21/templates/library/base_v1_1_4/permissions.py similarity index 100% rename from trains/community/nginx-proxy-manager/1.0.20/templates/library/base_v1_1_4/permissions.py rename to trains/community/nginx-proxy-manager/1.0.21/templates/library/base_v1_1_4/permissions.py diff --git a/trains/community/nginx-proxy-manager/1.0.20/templates/library/base_v1_1_4/ports.py b/trains/community/nginx-proxy-manager/1.0.21/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/nginx-proxy-manager/1.0.20/templates/library/base_v1_1_4/ports.py rename to trains/community/nginx-proxy-manager/1.0.21/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/nginx-proxy-manager/1.0.20/templates/library/base_v1_1_4/postgres.py b/trains/community/nginx-proxy-manager/1.0.21/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/nginx-proxy-manager/1.0.20/templates/library/base_v1_1_4/postgres.py rename to trains/community/nginx-proxy-manager/1.0.21/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/nginx-proxy-manager/1.0.20/templates/library/base_v1_1_4/redis.py b/trains/community/nginx-proxy-manager/1.0.21/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/nginx-proxy-manager/1.0.20/templates/library/base_v1_1_4/redis.py rename to trains/community/nginx-proxy-manager/1.0.21/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/nginx-proxy-manager/1.0.20/templates/library/base_v1_1_4/resources.py b/trains/community/nginx-proxy-manager/1.0.21/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/nginx-proxy-manager/1.0.20/templates/library/base_v1_1_4/resources.py rename to trains/community/nginx-proxy-manager/1.0.21/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/nginx-proxy-manager/1.0.20/templates/library/base_v1_1_4/security.py b/trains/community/nginx-proxy-manager/1.0.21/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/nginx-proxy-manager/1.0.20/templates/library/base_v1_1_4/security.py rename to trains/community/nginx-proxy-manager/1.0.21/templates/library/base_v1_1_4/security.py diff --git a/trains/community/nginx-proxy-manager/1.0.20/templates/library/base_v1_1_4/storage.py b/trains/community/nginx-proxy-manager/1.0.21/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/nginx-proxy-manager/1.0.20/templates/library/base_v1_1_4/storage.py rename to trains/community/nginx-proxy-manager/1.0.21/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/nginx-proxy-manager/1.0.20/templates/library/base_v1_1_4/utils.py b/trains/community/nginx-proxy-manager/1.0.21/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/nginx-proxy-manager/1.0.20/templates/library/base_v1_1_4/utils.py rename to trains/community/nginx-proxy-manager/1.0.21/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/nginx-proxy-manager/1.0.20/templates/test_values/basic-values.yaml b/trains/community/nginx-proxy-manager/1.0.21/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/nginx-proxy-manager/1.0.20/templates/test_values/basic-values.yaml rename to trains/community/nginx-proxy-manager/1.0.21/templates/test_values/basic-values.yaml diff --git a/trains/stable/syncthing/1.0.27/README.md b/trains/stable/syncthing/1.0.28/README.md similarity index 100% rename from trains/stable/syncthing/1.0.27/README.md rename to trains/stable/syncthing/1.0.28/README.md diff --git a/trains/stable/syncthing/1.0.27/app.yaml b/trains/stable/syncthing/1.0.28/app.yaml similarity index 97% rename from trains/stable/syncthing/1.0.27/app.yaml rename to trains/stable/syncthing/1.0.28/app.yaml index f1609e4af0..a961758344 100644 --- a/trains/stable/syncthing/1.0.27/app.yaml +++ b/trains/stable/syncthing/1.0.28/app.yaml @@ -1,4 +1,4 @@ -app_version: 1.27.12 +app_version: 1.28.0 capabilities: - description: Syncthing is able to chown files. name: CHOWN @@ -50,4 +50,4 @@ sources: - https://hub.docker.com/r/syncthing/syncthing title: Syncthing train: stable -version: 1.0.27 +version: 1.0.28 diff --git a/trains/stable/syncthing/1.0.27/ix_values.yaml b/trains/stable/syncthing/1.0.28/ix_values.yaml similarity index 85% rename from trains/stable/syncthing/1.0.27/ix_values.yaml rename to trains/stable/syncthing/1.0.28/ix_values.yaml index da4c7e8422..a26536f43a 100644 --- a/trains/stable/syncthing/1.0.27/ix_values.yaml +++ b/trains/stable/syncthing/1.0.28/ix_values.yaml @@ -1,7 +1,7 @@ images: image: repository: syncthing/syncthing - tag: 1.27.12 + tag: 1.28.0 consts: syncthing_container_name: syncthing diff --git a/trains/stable/syncthing/1.0.27/migrations/migrate_from_kubernetes b/trains/stable/syncthing/1.0.28/migrations/migrate_from_kubernetes similarity index 100% rename from trains/stable/syncthing/1.0.27/migrations/migrate_from_kubernetes rename to trains/stable/syncthing/1.0.28/migrations/migrate_from_kubernetes diff --git a/trains/stable/syncthing/1.0.27/migrations/migration_helpers/__init__.py b/trains/stable/syncthing/1.0.28/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/stable/syncthing/1.0.27/migrations/migration_helpers/__init__.py rename to trains/stable/syncthing/1.0.28/migrations/migration_helpers/__init__.py diff --git a/trains/stable/syncthing/1.0.27/migrations/migration_helpers/cpu.py b/trains/stable/syncthing/1.0.28/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/stable/syncthing/1.0.27/migrations/migration_helpers/cpu.py rename to trains/stable/syncthing/1.0.28/migrations/migration_helpers/cpu.py diff --git a/trains/stable/syncthing/1.0.27/migrations/migration_helpers/dns_config.py b/trains/stable/syncthing/1.0.28/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/stable/syncthing/1.0.27/migrations/migration_helpers/dns_config.py rename to trains/stable/syncthing/1.0.28/migrations/migration_helpers/dns_config.py diff --git a/trains/stable/syncthing/1.0.27/migrations/migration_helpers/kubernetes_secrets.py b/trains/stable/syncthing/1.0.28/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/stable/syncthing/1.0.27/migrations/migration_helpers/kubernetes_secrets.py rename to trains/stable/syncthing/1.0.28/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/stable/syncthing/1.0.27/migrations/migration_helpers/memory.py b/trains/stable/syncthing/1.0.28/migrations/migration_helpers/memory.py similarity index 100% rename from trains/stable/syncthing/1.0.27/migrations/migration_helpers/memory.py rename to trains/stable/syncthing/1.0.28/migrations/migration_helpers/memory.py diff --git a/trains/stable/syncthing/1.0.27/migrations/migration_helpers/resources.py b/trains/stable/syncthing/1.0.28/migrations/migration_helpers/resources.py similarity index 100% rename from trains/stable/syncthing/1.0.27/migrations/migration_helpers/resources.py rename to trains/stable/syncthing/1.0.28/migrations/migration_helpers/resources.py diff --git a/trains/stable/syncthing/1.0.27/migrations/migration_helpers/storage.py b/trains/stable/syncthing/1.0.28/migrations/migration_helpers/storage.py similarity index 100% rename from trains/stable/syncthing/1.0.27/migrations/migration_helpers/storage.py rename to trains/stable/syncthing/1.0.28/migrations/migration_helpers/storage.py diff --git a/trains/stable/syncthing/1.0.27/questions.yaml b/trains/stable/syncthing/1.0.28/questions.yaml similarity index 100% rename from trains/stable/syncthing/1.0.27/questions.yaml rename to trains/stable/syncthing/1.0.28/questions.yaml diff --git a/trains/stable/syncthing/1.0.27/templates/docker-compose.yaml b/trains/stable/syncthing/1.0.28/templates/docker-compose.yaml similarity index 100% rename from trains/stable/syncthing/1.0.27/templates/docker-compose.yaml rename to trains/stable/syncthing/1.0.28/templates/docker-compose.yaml diff --git a/trains/stable/syncthing/1.0.27/templates/library/base_v1_1_4/__init__.py b/trains/stable/syncthing/1.0.28/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/stable/syncthing/1.0.27/templates/library/base_v1_1_4/__init__.py rename to trains/stable/syncthing/1.0.28/templates/library/base_v1_1_4/__init__.py diff --git a/trains/stable/syncthing/1.0.27/templates/library/base_v1_1_4/environment.py b/trains/stable/syncthing/1.0.28/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/stable/syncthing/1.0.27/templates/library/base_v1_1_4/environment.py rename to trains/stable/syncthing/1.0.28/templates/library/base_v1_1_4/environment.py diff --git a/trains/stable/syncthing/1.0.27/templates/library/base_v1_1_4/healthchecks.py b/trains/stable/syncthing/1.0.28/templates/library/base_v1_1_4/healthchecks.py similarity index 100% rename from trains/stable/syncthing/1.0.27/templates/library/base_v1_1_4/healthchecks.py rename to trains/stable/syncthing/1.0.28/templates/library/base_v1_1_4/healthchecks.py diff --git a/trains/stable/syncthing/1.0.27/templates/library/base_v1_1_4/mariadb.py b/trains/stable/syncthing/1.0.28/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/stable/syncthing/1.0.27/templates/library/base_v1_1_4/mariadb.py rename to trains/stable/syncthing/1.0.28/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/stable/syncthing/1.0.27/templates/library/base_v1_1_4/metadata.py b/trains/stable/syncthing/1.0.28/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/stable/syncthing/1.0.27/templates/library/base_v1_1_4/metadata.py rename to trains/stable/syncthing/1.0.28/templates/library/base_v1_1_4/metadata.py diff --git a/trains/stable/syncthing/1.0.27/templates/library/base_v1_1_4/network.py b/trains/stable/syncthing/1.0.28/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/stable/syncthing/1.0.27/templates/library/base_v1_1_4/network.py rename to trains/stable/syncthing/1.0.28/templates/library/base_v1_1_4/network.py diff --git a/trains/stable/syncthing/1.0.27/templates/library/base_v1_1_4/permissions.py b/trains/stable/syncthing/1.0.28/templates/library/base_v1_1_4/permissions.py similarity index 100% rename from trains/stable/syncthing/1.0.27/templates/library/base_v1_1_4/permissions.py rename to trains/stable/syncthing/1.0.28/templates/library/base_v1_1_4/permissions.py diff --git a/trains/stable/syncthing/1.0.27/templates/library/base_v1_1_4/ports.py b/trains/stable/syncthing/1.0.28/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/stable/syncthing/1.0.27/templates/library/base_v1_1_4/ports.py rename to trains/stable/syncthing/1.0.28/templates/library/base_v1_1_4/ports.py diff --git a/trains/stable/syncthing/1.0.27/templates/library/base_v1_1_4/postgres.py b/trains/stable/syncthing/1.0.28/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/stable/syncthing/1.0.27/templates/library/base_v1_1_4/postgres.py rename to trains/stable/syncthing/1.0.28/templates/library/base_v1_1_4/postgres.py diff --git a/trains/stable/syncthing/1.0.27/templates/library/base_v1_1_4/redis.py b/trains/stable/syncthing/1.0.28/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/stable/syncthing/1.0.27/templates/library/base_v1_1_4/redis.py rename to trains/stable/syncthing/1.0.28/templates/library/base_v1_1_4/redis.py diff --git a/trains/stable/syncthing/1.0.27/templates/library/base_v1_1_4/resources.py b/trains/stable/syncthing/1.0.28/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/stable/syncthing/1.0.27/templates/library/base_v1_1_4/resources.py rename to trains/stable/syncthing/1.0.28/templates/library/base_v1_1_4/resources.py diff --git a/trains/stable/syncthing/1.0.27/templates/library/base_v1_1_4/security.py b/trains/stable/syncthing/1.0.28/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/stable/syncthing/1.0.27/templates/library/base_v1_1_4/security.py rename to trains/stable/syncthing/1.0.28/templates/library/base_v1_1_4/security.py diff --git a/trains/stable/syncthing/1.0.27/templates/library/base_v1_1_4/storage.py b/trains/stable/syncthing/1.0.28/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/stable/syncthing/1.0.27/templates/library/base_v1_1_4/storage.py rename to trains/stable/syncthing/1.0.28/templates/library/base_v1_1_4/storage.py diff --git a/trains/stable/syncthing/1.0.27/templates/library/base_v1_1_4/utils.py b/trains/stable/syncthing/1.0.28/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/stable/syncthing/1.0.27/templates/library/base_v1_1_4/utils.py rename to trains/stable/syncthing/1.0.28/templates/library/base_v1_1_4/utils.py diff --git a/trains/stable/syncthing/1.0.27/templates/test_values/basic-values.yaml b/trains/stable/syncthing/1.0.28/templates/test_values/basic-values.yaml similarity index 100% rename from trains/stable/syncthing/1.0.27/templates/test_values/basic-values.yaml rename to trains/stable/syncthing/1.0.28/templates/test_values/basic-values.yaml diff --git a/trains/stable/syncthing/1.0.27/templates/test_values/host-values.yaml b/trains/stable/syncthing/1.0.28/templates/test_values/host-values.yaml similarity index 100% rename from trains/stable/syncthing/1.0.27/templates/test_values/host-values.yaml rename to trains/stable/syncthing/1.0.28/templates/test_values/host-values.yaml From fc526dbd1767887c2d6a9c2be23072416c5bcab9 Mon Sep 17 00:00:00 2001 From: sonicaj Date: Wed, 16 Oct 2024 19:07:19 +0000 Subject: [PATCH 06/13] Update catalog changes [skip ci] --- catalog.json | 270 +++++++++--------- .../community/actual-budget/app_versions.json | 2 +- .../community/adguard-home/app_versions.json | 2 +- .../audiobookshelf/app_versions.json | 2 +- trains/community/autobrr/app_versions.json | 2 +- trains/community/bazarr/app_versions.json | 2 +- .../community/briefkasten/app_versions.json | 2 +- trains/community/castopod/app_versions.json | 14 +- trains/community/chia/app_versions.json | 2 +- trains/community/clamav/app_versions.json | 2 +- .../community/cloudflared/app_versions.json | 2 +- trains/community/dashy/app_versions.json | 2 +- .../community/ddns-updater/app_versions.json | 2 +- trains/community/deluge/app_versions.json | 2 +- .../community/distribution/app_versions.json | 2 +- trains/community/dockge/app_versions.json | 2 +- trains/community/drawio/app_versions.json | 2 +- .../community/filebrowser/app_versions.json | 2 +- .../community/firefly-iii/app_versions.json | 2 +- trains/community/flame/app_versions.json | 2 +- trains/community/freshrss/app_versions.json | 2 +- trains/community/frigate/app_versions.json | 2 +- trains/community/fscrawler/app_versions.json | 2 +- trains/community/gitea/app_versions.json | 2 +- trains/community/grafana/app_versions.json | 2 +- trains/community/handbrake/app_versions.json | 2 +- trains/community/homarr/app_versions.json | 2 +- trains/community/homepage/app_versions.json | 14 +- trains/community/homer/app_versions.json | 2 +- trains/community/immich/app_versions.json | 14 +- trains/community/invidious/app_versions.json | 2 +- trains/community/ipfs/app_versions.json | 14 +- trains/community/jellyfin/app_versions.json | 2 +- trains/community/jellyseerr/app_versions.json | 2 +- trains/community/jenkins/app_versions.json | 2 +- trains/community/joplin/app_versions.json | 2 +- trains/community/kapowarr/app_versions.json | 2 +- trains/community/kavita/app_versions.json | 2 +- trains/community/komga/app_versions.json | 2 +- trains/community/lidarr/app_versions.json | 2 +- trains/community/linkding/app_versions.json | 2 +- trains/community/listmonk/app_versions.json | 2 +- trains/community/logseq/app_versions.json | 2 +- trains/community/mealie/app_versions.json | 2 +- trains/community/metube/app_versions.json | 2 +- trains/community/minecraft/app_versions.json | 2 +- trains/community/mineos/app_versions.json | 2 +- trains/community/mumble/app_versions.json | 2 +- trains/community/n8n/app_versions.json | 14 +- trains/community/navidrome/app_versions.json | 2 +- trains/community/netbootxyz/app_versions.json | 2 +- .../nginx-proxy-manager/app_versions.json | 14 +- trains/community/node-red/app_versions.json | 2 +- trains/community/odoo/app_versions.json | 2 +- .../omada-controller/app_versions.json | 2 +- trains/community/organizr/app_versions.json | 2 +- trains/community/overseerr/app_versions.json | 2 +- trains/community/palworld/app_versions.json | 2 +- .../community/paperless-ngx/app_versions.json | 2 +- trains/community/passbolt/app_versions.json | 2 +- trains/community/pgadmin/app_versions.json | 2 +- trains/community/pigallery2/app_versions.json | 2 +- trains/community/piwigo/app_versions.json | 2 +- trains/community/planka/app_versions.json | 2 +- .../plex-auto-languages/app_versions.json | 2 +- trains/community/portainer/app_versions.json | 2 +- trains/community/prowlarr/app_versions.json | 2 +- .../community/qbittorrent/app_versions.json | 2 +- trains/community/radarr/app_versions.json | 2 +- trains/community/readarr/app_versions.json | 2 +- trains/community/recyclarr/app_versions.json | 2 +- trains/community/redis/app_versions.json | 2 +- trains/community/roundcube/app_versions.json | 2 +- trains/community/rsyncd/app_versions.json | 2 +- trains/community/rust-desk/app_versions.json | 2 +- trains/community/sabnzbd/app_versions.json | 2 +- trains/community/searxng/app_versions.json | 2 +- trains/community/sftpgo/app_versions.json | 2 +- trains/community/sonarr/app_versions.json | 2 +- trains/community/tailscale/app_versions.json | 2 +- trains/community/tautulli/app_versions.json | 2 +- trains/community/tdarr/app_versions.json | 2 +- trains/community/terraria/app_versions.json | 2 +- trains/community/tftpd-hpa/app_versions.json | 2 +- .../tiny-media-manager/app_versions.json | 2 +- .../community/transmission/app_versions.json | 2 +- .../twofactor-auth/app_versions.json | 2 +- .../unifi-controller/app_versions.json | 2 +- .../unifi-protect-backup/app_versions.json | 2 +- .../community/vaultwarden/app_versions.json | 2 +- trains/community/vikunja/app_versions.json | 2 +- trains/community/webdav/app_versions.json | 2 +- trains/community/whoogle/app_versions.json | 2 +- trains/community/wordpress/app_versions.json | 2 +- trains/community/zerotier/app_versions.json | 2 +- trains/enterprise/minio/app_versions.json | 2 +- trains/enterprise/syncthing/app_versions.json | 2 +- trains/stable/collabora/app_versions.json | 2 +- trains/stable/diskoverdata/app_versions.json | 2 +- .../stable/elastic-search/app_versions.json | 2 +- trains/stable/emby/app_versions.json | 2 +- .../stable/home-assistant/app_versions.json | 2 +- trains/stable/ix-app/app_versions.json | 2 +- trains/stable/minio/app_versions.json | 2 +- trains/stable/netdata/app_versions.json | 2 +- trains/stable/nextcloud/app_versions.json | 2 +- trains/stable/photoprism/app_versions.json | 2 +- trains/stable/pihole/app_versions.json | 2 +- trains/stable/plex/app_versions.json | 2 +- trains/stable/prometheus/app_versions.json | 2 +- trains/stable/storj/app_versions.json | 2 +- trains/stable/syncthing/app_versions.json | 14 +- trains/stable/wg-easy/app_versions.json | 2 +- trains/test/nginx/app_versions.json | 8 +- trains/test/other-nginx/app_versions.json | 4 +- 115 files changed, 295 insertions(+), 295 deletions(-) diff --git a/catalog.json b/catalog.json index 277db1f23d..6debd433db 100644 --- a/catalog.json +++ b/catalog.json @@ -13,7 +13,7 @@ "latest_version": "1.1.15", "latest_app_version": "24.04.8.2.1", "latest_human_version": "24.04.8.2.1_1.1.15", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "collabora", "recommended": false, "title": "Collabora", @@ -102,7 +102,7 @@ "latest_version": "1.0.23", "latest_app_version": "1.40.2.8395-c67dce28e", "latest_human_version": "1.40.2.8395-c67dce28e_1.0.23", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "plex", "recommended": false, "title": "Plex", @@ -180,7 +180,7 @@ "latest_version": "1.2.21", "latest_app_version": "2024.10.2", "latest_human_version": "2024.10.2_1.2.21", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "home-assistant", "recommended": false, "title": "Home Assistant", @@ -255,7 +255,7 @@ "latest_version": "1.1.14", "latest_app_version": "240915", "latest_human_version": "240915_1.1.14", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "photoprism", "recommended": false, "title": "Photoprism", @@ -328,7 +328,7 @@ "latest_version": "1.1.13", "latest_app_version": "RELEASE.2024-10-13T13-34-11Z", "latest_human_version": "RELEASE.2024-10-13T13-34-11Z_1.1.13", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "minio", "recommended": false, "title": "MinIO", @@ -377,7 +377,7 @@ "latest_version": "1.1.13", "latest_app_version": "4.8.10.0", "latest_human_version": "4.8.10.0_1.1.13", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "emby", "recommended": false, "title": "Emby Server", @@ -456,7 +456,7 @@ "latest_version": "1.1.14", "latest_app_version": "v1.47.4", "latest_human_version": "v1.47.4_1.1.14", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "netdata", "recommended": false, "title": "Netdata", @@ -533,7 +533,7 @@ "latest_version": "1.0.20", "latest_app_version": "14", "latest_human_version": "14_1.0.20", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "wg-easy", "recommended": false, "title": "WG Easy", @@ -593,7 +593,7 @@ "latest_version": "1.1.11", "latest_app_version": "v2.54.1", "latest_human_version": "v2.54.1_1.1.11", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "prometheus", "recommended": false, "title": "Prometheus", @@ -638,10 +638,10 @@ "healthy_error": null, "home": "https://syncthing.net/", "location": "/__w/apps/apps/trains/stable/syncthing", - "latest_version": "1.0.27", - "latest_app_version": "1.27.12", - "latest_human_version": "1.27.12_1.0.27", - "last_update": "2024-10-16 17:52:00", + "latest_version": "1.0.28", + "latest_app_version": "1.28.0", + "latest_human_version": "1.28.0_1.0.28", + "last_update": "2024-10-16 19:06:56", "name": "syncthing", "recommended": false, "title": "Syncthing", @@ -726,7 +726,7 @@ "latest_version": "1.0.11", "latest_app_version": "1.0.0", "latest_human_version": "1.0.0_1.0.11", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "ix-app", "recommended": false, "title": "iX App", @@ -757,7 +757,7 @@ "latest_version": "1.3.20", "latest_app_version": "30.0.0", "latest_human_version": "30.0.0_1.3.20", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "nextcloud", "recommended": false, "title": "Nextcloud", @@ -861,7 +861,7 @@ "latest_version": "1.1.10", "latest_app_version": "6f87ea801-v1.71.2-go1.18.8", "latest_human_version": "6f87ea801-v1.71.2-go1.18.8_1.1.10", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "storj", "recommended": false, "title": "Storj", @@ -922,7 +922,7 @@ "latest_version": "1.3.8", "latest_app_version": "2.3.0", "latest_human_version": "2.3.0_1.3.8", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "diskoverdata", "recommended": false, "title": "Diskover Data", @@ -1005,7 +1005,7 @@ "latest_version": "1.1.11", "latest_app_version": "2024.07.0", "latest_human_version": "2024.07.0_1.1.11", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "pihole", "recommended": false, "title": "Pi-hole", @@ -1101,7 +1101,7 @@ "latest_version": "1.1.12", "latest_app_version": "8.15.2", "latest_human_version": "8.15.2_1.1.12", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "elastic-search", "recommended": false, "title": "Elastic Search", @@ -1149,7 +1149,7 @@ "latest_version": "1.0.1", "latest_app_version": "v1", "latest_human_version": "v1_1.0.1", - "last_update": "2024-10-16 17:50:40", + "last_update": "2024-10-16 19:05:21", "name": "other-nginx", "recommended": false, "title": "Other Nginx", @@ -1197,7 +1197,7 @@ "latest_version": "1.0.6", "latest_app_version": "v1", "latest_human_version": "v1_1.0.6", - "last_update": "2024-10-16 17:50:40", + "last_update": "2024-10-16 19:05:21", "name": "nginx", "recommended": false, "title": "Nginx", @@ -1247,7 +1247,7 @@ "latest_version": "1.1.7", "latest_app_version": "RELEASE.2024-08-26T15-33-07Z", "latest_human_version": "RELEASE.2024-08-26T15-33-07Z_1.1.7", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "minio", "recommended": false, "title": "MinIO", @@ -1296,7 +1296,7 @@ "latest_version": "1.0.15", "latest_app_version": "1.27.10", "latest_human_version": "1.27.10_1.0.15", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "syncthing", "recommended": false, "title": "Syncthing", @@ -1382,7 +1382,7 @@ "latest_version": "1.0.20", "latest_app_version": "0.9.0", "latest_human_version": "0.9.0_1.0.20", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "whoogle", "recommended": false, "title": "Whoogle", @@ -1430,7 +1430,7 @@ "latest_version": "1.0.14", "latest_app_version": "1.0.0", "latest_human_version": "1.0.0_1.0.14", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "rsyncd", "recommended": false, "title": "Rsync Daemon", @@ -1501,7 +1501,7 @@ "latest_version": "1.0.9", "latest_app_version": "v3.0.0", "latest_human_version": "v3.0.0_1.0.9", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "listmonk", "recommended": false, "title": "Listmonk", @@ -1557,7 +1557,7 @@ "latest_version": "1.11.18", "latest_app_version": "2024.10.1", "latest_human_version": "2024.10.1_1.11.18", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "minecraft", "recommended": false, "title": "Minecraft", @@ -1623,7 +1623,7 @@ "latest_version": "1.0.9", "latest_app_version": "2.26.01", "latest_human_version": "2.26.01_1.0.9", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "tdarr", "recommended": false, "title": "Tdarr", @@ -1689,7 +1689,7 @@ "latest_version": "1.0.21", "latest_app_version": "v2.14.6", "latest_human_version": "v2.14.6_1.0.21", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "tautulli", "recommended": false, "title": "Tautulli", @@ -1740,7 +1740,7 @@ "latest_version": "1.1.14", "latest_app_version": "v1.47.1", "latest_human_version": "v1.47.1_1.1.14", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "autobrr", "recommended": false, "title": "Autobrr", @@ -1789,7 +1789,7 @@ "latest_version": "1.0.18", "latest_app_version": "1.33.2", "latest_human_version": "1.33.2_1.0.18", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "overseerr", "recommended": false, "title": "Overseerr", @@ -1833,7 +1833,7 @@ "latest_version": "1.0.17", "latest_app_version": "1.4.2", "latest_human_version": "1.4.2_1.0.17", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "dockge", "recommended": false, "title": "Dockge", @@ -1913,7 +1913,7 @@ "latest_version": "1.1.13", "latest_app_version": "2024.10.0", "latest_human_version": "2024.10.0_1.1.13", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "cloudflared", "recommended": false, "title": "Cloudflared", @@ -1959,7 +1959,7 @@ "latest_version": "1.0.19", "latest_app_version": "0.7.3-nbxyz1", "latest_human_version": "0.7.3-nbxyz1_1.0.19", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "netbootxyz", "recommended": false, "title": "Netboot.xyz", @@ -2043,7 +2043,7 @@ "latest_version": "1.2.11", "latest_app_version": "8.5.6", "latest_human_version": "8.5.6_1.2.11", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "unifi-controller", "recommended": false, "title": "Unifi Controller", @@ -2090,7 +2090,7 @@ "latest_version": "1.0.9", "latest_app_version": "0.14.1", "latest_human_version": "0.14.1_1.0.9", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "frigate", "recommended": false, "title": "Frigate", @@ -2156,10 +2156,10 @@ "healthy_error": null, "home": "https://gethomepage.dev/", "location": "/__w/apps/apps/trains/community/homepage", - "latest_version": "1.0.22", - "latest_app_version": "v0.9.10", - "latest_human_version": "v0.9.10_1.0.22", - "last_update": "2024-10-16 17:52:00", + "latest_version": "1.0.23", + "latest_app_version": "v0.9.11", + "latest_human_version": "v0.9.11_1.0.23", + "last_update": "2024-10-16 19:06:56", "name": "homepage", "recommended": false, "title": "Homepage", @@ -2210,7 +2210,7 @@ "latest_version": "1.0.19", "latest_app_version": "2.3.1", "latest_human_version": "2.3.1_1.0.19", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "flame", "recommended": false, "title": "Flame", @@ -2269,7 +2269,7 @@ "latest_version": "1.0.12", "latest_app_version": "2.12.1", "latest_human_version": "2.12.1_1.0.12", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "paperless-ngx", "recommended": false, "title": "Paperless-ngx", @@ -2358,7 +2358,7 @@ "latest_version": "1.0.10", "latest_app_version": "1.0.0", "latest_human_version": "1.0.0_1.0.10", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "tftpd-hpa", "recommended": false, "title": "TFTP Server", @@ -2420,7 +2420,7 @@ "latest_version": "1.0.6", "latest_app_version": "4.0.6", "latest_human_version": "4.0.6_1.0.6", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "transmission", "recommended": false, "title": "Transmission", @@ -2466,7 +2466,7 @@ "latest_version": "1.0.18", "latest_app_version": "latest", "latest_human_version": "latest_1.0.18", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "logseq", "recommended": false, "title": "Logseq", @@ -2510,7 +2510,7 @@ "latest_version": "1.1.11", "latest_app_version": "24.7.17", "latest_human_version": "24.7.17_1.1.11", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "drawio", "recommended": false, "title": "Draw.io", @@ -2560,7 +2560,7 @@ "latest_version": "1.1.11", "latest_app_version": "3.0.1-beta", "latest_human_version": "3.0.1-beta_1.1.11", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "joplin", "recommended": false, "title": "Joplin", @@ -2615,7 +2615,7 @@ "latest_version": "1.0.19", "latest_app_version": "0.8.3", "latest_human_version": "0.8.3_1.0.19", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "kavita", "recommended": false, "title": "Kavita", @@ -2687,7 +2687,7 @@ "latest_version": "1.0.7", "latest_app_version": "4.3.3", "latest_human_version": "4.3.3_1.0.7", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "sabnzbd", "recommended": false, "title": "SABnzbd", @@ -2737,7 +2737,7 @@ "latest_version": "1.1.13", "latest_app_version": "24.10.1", "latest_human_version": "24.10.1_1.1.13", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "actual-budget", "recommended": false, "title": "Actual Budget", @@ -2787,7 +2787,7 @@ "latest_version": "1.0.6", "latest_app_version": "5.0.12", "latest_human_version": "5.0.12_1.0.6", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "tiny-media-manager", "recommended": false, "title": "Tiny Media Manager", @@ -2851,7 +2851,7 @@ "latest_version": "1.2.14", "latest_app_version": "0.24.4", "latest_human_version": "0.24.4_1.2.14", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "vikunja", "recommended": false, "title": "Vikunja", @@ -2919,7 +2919,7 @@ "latest_version": "1.0.7", "latest_app_version": "4.9.1-1-ce-non-root", "latest_human_version": "4.9.1-1-ce-non-root_1.0.7", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "passbolt", "recommended": false, "title": "Passbolt", @@ -2976,7 +2976,7 @@ "latest_version": "1.0.19", "latest_app_version": "1.9.2", "latest_human_version": "1.9.2_1.0.19", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "jellyseerr", "recommended": false, "title": "Jellyseerr", @@ -3022,7 +3022,7 @@ "latest_version": "1.0.7", "latest_app_version": "1.32.2", "latest_human_version": "1.32.2_1.0.7", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "vaultwarden", "recommended": false, "title": "Vaultwarden", @@ -3072,10 +3072,10 @@ "healthy_error": null, "home": "https://castopod.org", "location": "/__w/apps/apps/trains/community/castopod", - "latest_version": "1.0.9", - "latest_app_version": "1.12.10", - "latest_human_version": "1.12.10_1.0.9", - "last_update": "2024-10-16 17:52:00", + "latest_version": "1.0.10", + "latest_app_version": "1.12.11", + "latest_human_version": "1.12.11_1.0.10", + "last_update": "2024-10-16 19:06:56", "name": "castopod", "recommended": false, "title": "Castopod", @@ -3153,10 +3153,10 @@ "healthy_error": null, "home": "https://n8n.io/", "location": "/__w/apps/apps/trains/community/n8n", - "latest_version": "1.3.23", - "latest_app_version": "1.63.2", - "latest_human_version": "1.63.2_1.3.23", - "last_update": "2024-10-16 17:52:00", + "latest_version": "1.3.24", + "latest_app_version": "1.64.0", + "latest_human_version": "1.64.0_1.3.24", + "last_update": "2024-10-16 19:06:56", "name": "n8n", "recommended": false, "title": "n8n", @@ -3220,7 +3220,7 @@ "latest_version": "1.0.19", "latest_app_version": "2.8.3", "latest_human_version": "2.8.3_1.0.19", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "distribution", "recommended": false, "title": "Distribution", @@ -3266,7 +3266,7 @@ "latest_version": "1.0.17", "latest_app_version": "2.10-SNAPSHOT-ocr-es7", "latest_human_version": "2.10-SNAPSHOT-ocr-es7_1.0.17", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "fscrawler", "recommended": false, "title": "FSCrawler", @@ -3309,10 +3309,10 @@ "healthy_error": null, "home": "https://ipfs.tech/", "location": "/__w/apps/apps/trains/community/ipfs", - "latest_version": "1.0.19", - "latest_app_version": "v0.30.0", - "latest_human_version": "v0.30.0_1.0.19", - "last_update": "2024-10-16 17:52:00", + "latest_version": "1.0.20", + "latest_app_version": "v0.31.0", + "latest_human_version": "v0.31.0_1.0.20", + "last_update": "2024-10-16 19:06:56", "name": "ipfs", "recommended": false, "title": "IPFS", @@ -3362,7 +3362,7 @@ "latest_version": "1.0.24", "latest_app_version": "0.53.3", "latest_human_version": "0.53.3_1.0.24", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "navidrome", "recommended": false, "title": "Navidrome", @@ -3410,7 +3410,7 @@ "latest_version": "1.0.6", "latest_app_version": "2.0.0", "latest_human_version": "2.0.0_1.0.6", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "pigallery2", "recommended": false, "title": "PiGallery2", @@ -3466,7 +3466,7 @@ "latest_version": "1.0.18", "latest_app_version": "latest", "latest_human_version": "latest_1.0.18", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "mineos", "recommended": false, "title": "MineOS", @@ -3533,7 +3533,7 @@ "latest_version": "1.1.12", "latest_app_version": "11.2.2", "latest_human_version": "11.2.2_1.1.12", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "grafana", "recommended": false, "title": "Grafana", @@ -3584,7 +3584,7 @@ "latest_version": "1.1.15", "latest_app_version": "v1.74.1", "latest_human_version": "v1.74.1_1.1.15", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "tailscale", "recommended": false, "title": "Tailscale", @@ -3654,7 +3654,7 @@ "latest_version": "1.0.16", "latest_app_version": "2024.10.4-3e747d049", "latest_human_version": "2024.10.4-3e747d049_1.0.16", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "searxng", "recommended": false, "title": "SearXNG", @@ -3707,7 +3707,7 @@ "latest_version": "1.0.22", "latest_app_version": "1.4.5", "latest_human_version": "1.4.5_1.0.22", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "bazarr", "recommended": false, "title": "Bazarr", @@ -3755,7 +3755,7 @@ "latest_version": "1.0.4", "latest_app_version": "17.0", "latest_human_version": "17.0_1.0.4", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "odoo", "recommended": false, "title": "Odoo", @@ -3803,7 +3803,7 @@ "latest_version": "1.0.6", "latest_app_version": "14.5.0", "latest_human_version": "14.5.0_1.0.6", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "piwigo", "recommended": false, "title": "Piwigo", @@ -3882,7 +3882,7 @@ "latest_version": "1.2.13", "latest_app_version": "1.25.2.4794", "latest_human_version": "1.25.2.4794_1.2.13", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "prowlarr", "recommended": false, "title": "Prowlarr", @@ -3928,7 +3928,7 @@ "latest_version": "1.0.19", "latest_app_version": "v1.0.0", "latest_human_version": "v1.0.0_1.0.19", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "kapowarr", "recommended": false, "title": "Kapowarr", @@ -3976,7 +3976,7 @@ "latest_version": "1.0.19", "latest_app_version": "1.14.1", "latest_human_version": "1.14.1_1.0.19", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "zerotier", "recommended": false, "title": "Zerotier", @@ -4066,7 +4066,7 @@ "latest_version": "1.2.14", "latest_app_version": "2.15.0", "latest_human_version": "2.15.0_1.2.14", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "audiobookshelf", "recommended": false, "title": "Audiobookshelf", @@ -4117,7 +4117,7 @@ "latest_version": "1.0.18", "latest_app_version": "latest", "latest_human_version": "latest_1.0.18", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "organizr", "recommended": false, "title": "Organizr", @@ -4186,7 +4186,7 @@ "latest_version": "1.0.7", "latest_app_version": "5.3.1", "latest_human_version": "5.3.1_1.0.7", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "twofactor-auth", "recommended": false, "title": "2FAuth", @@ -4234,7 +4234,7 @@ "latest_version": "1.0.17", "latest_app_version": "0.11.0", "latest_human_version": "0.11.0_1.0.17", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "unifi-protect-backup", "recommended": false, "title": "Unifi Protect Backup", @@ -4296,7 +4296,7 @@ "latest_version": "1.0.19", "latest_app_version": "4.0.9.2244", "latest_human_version": "4.0.9.2244_1.0.19", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "sonarr", "recommended": false, "title": "Sonarr", @@ -4345,7 +4345,7 @@ "latest_version": "1.0.22", "latest_app_version": "v0.107.53", "latest_human_version": "v0.107.53_1.0.22", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "adguard-home", "recommended": false, "title": "AdGuard Home", @@ -4411,7 +4411,7 @@ "latest_version": "1.1.12", "latest_app_version": "2.6.4.4402", "latest_human_version": "2.6.4.4402_1.1.12", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "lidarr", "recommended": false, "title": "Lidarr", @@ -4460,7 +4460,7 @@ "latest_version": "1.2.14", "latest_app_version": "2.23.0", "latest_human_version": "2.23.0_1.2.14", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "portainer", "recommended": false, "title": "Portainer", @@ -4542,7 +4542,7 @@ "latest_version": "1.1.10", "latest_app_version": "v1.5.634", "latest_human_version": "v1.5.634_1.1.10", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "mumble", "recommended": false, "title": "Mumble", @@ -4586,7 +4586,7 @@ "latest_version": "1.1.12", "latest_app_version": "5.12.2.9335", "latest_human_version": "5.12.2.9335_1.1.12", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "radarr", "recommended": false, "title": "Radarr", @@ -4636,7 +4636,7 @@ "latest_version": "1.0.6", "latest_app_version": "tshock-1.4.4.9-5.2.0-3", "latest_human_version": "tshock-1.4.4.9-5.2.0-3_1.0.6", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "terraria", "recommended": false, "title": "Terraria", @@ -4684,7 +4684,7 @@ "latest_version": "1.0.15", "latest_app_version": "2.4.3", "latest_human_version": "2.4.3_1.0.15", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "chia", "recommended": false, "title": "Chia", @@ -4730,7 +4730,7 @@ "latest_version": "1.0.18", "latest_app_version": "3.1.0", "latest_human_version": "3.1.0_1.0.18", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "dashy", "recommended": false, "title": "Dashy", @@ -4777,7 +4777,7 @@ "latest_version": "1.0.7", "latest_app_version": "6.6.2", "latest_human_version": "6.6.2_1.0.7", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "wordpress", "recommended": false, "title": "Wordpress", @@ -4838,7 +4838,7 @@ "latest_version": "1.0.12", "latest_app_version": "1.22.3", "latest_human_version": "1.22.3_1.0.12", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "gitea", "recommended": false, "title": "Gitea", @@ -4889,7 +4889,7 @@ "latest_version": "1.1.10", "latest_app_version": "5.14", "latest_human_version": "5.14_1.1.10", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "omada-controller", "recommended": false, "title": "Bazarr", @@ -4957,7 +4957,7 @@ "latest_version": "1.1.14", "latest_app_version": "1.14.1", "latest_human_version": "1.14.1_1.1.14", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "komga", "recommended": false, "title": "Komga", @@ -5006,7 +5006,7 @@ "latest_version": "1.0.7", "latest_app_version": "2.6.2", "latest_human_version": "2.6.2_1.0.7", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "sftpgo", "recommended": false, "title": "SFTPGo", @@ -5050,7 +5050,7 @@ "latest_version": "1.0.5", "latest_app_version": "8.12", "latest_human_version": "8.12_1.0.5", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "pgadmin", "recommended": false, "title": "pgAdmin", @@ -5104,7 +5104,7 @@ "latest_version": "1.0.13", "latest_app_version": "2.4.62", "latest_human_version": "2.4.62_1.0.13", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "webdav", "recommended": false, "title": "WebDAV", @@ -5148,7 +5148,7 @@ "latest_version": "1.0.13", "latest_app_version": "2.462.1-jdk17", "latest_human_version": "2.462.1-jdk17_1.0.13", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "jenkins", "recommended": false, "title": "Jenkins", @@ -5197,7 +5197,7 @@ "latest_version": "1.0.16", "latest_app_version": "v1.2.3", "latest_human_version": "v1.2.3_1.0.16", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "plex-auto-languages", "recommended": false, "title": "Plex Auto Languages", @@ -5242,7 +5242,7 @@ "latest_version": "1.1.17", "latest_app_version": "2024-10-08", "latest_human_version": "2024-10-08_1.1.17", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "metube", "recommended": false, "title": "MeTube", @@ -5289,7 +5289,7 @@ "latest_version": "1.0.7", "latest_app_version": "1.1.11-1", "latest_human_version": "1.1.11-1_1.0.7", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "rust-desk", "recommended": false, "title": "Rust Desk", @@ -5334,7 +5334,7 @@ "latest_version": "1.0.20", "latest_app_version": "palworld", "latest_human_version": "palworld_1.0.20", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "palworld", "recommended": false, "title": "Palworld", @@ -5412,7 +5412,7 @@ "latest_version": "1.0.19", "latest_app_version": "latest", "latest_human_version": "latest_1.0.19", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "briefkasten", "recommended": false, "title": "Briefkasten", @@ -5464,10 +5464,10 @@ "healthy_error": null, "home": "https://immich.app", "location": "/__w/apps/apps/trains/community/immich", - "latest_version": "1.6.19", - "latest_app_version": "v1.118.0", - "latest_human_version": "v1.118.0_1.6.19", - "last_update": "2024-10-16 17:52:00", + "latest_version": "1.6.20", + "latest_app_version": "v1.118.1", + "latest_human_version": "v1.118.1_1.6.20", + "last_update": "2024-10-16 19:06:56", "name": "immich", "recommended": false, "title": "Immich", @@ -5539,7 +5539,7 @@ "latest_version": "1.0.24", "latest_app_version": "v2.8.1", "latest_human_version": "v2.8.1_1.0.24", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "ddns-updater", "recommended": false, "title": "DDNS Updater", @@ -5587,7 +5587,7 @@ "latest_version": "1.0.11", "latest_app_version": "2.20240825.2", "latest_human_version": "2.20240825.2_1.0.11", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "invidious", "recommended": false, "title": "Invidious", @@ -5645,7 +5645,7 @@ "latest_version": "1.0.19", "latest_app_version": "0.3.32.2587", "latest_human_version": "0.3.32.2587_1.0.19", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "readarr", "recommended": false, "title": "Readarr", @@ -5695,7 +5695,7 @@ "latest_version": "1.0.8", "latest_app_version": "7.2.4", "latest_human_version": "7.2.4_1.0.8", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "recyclarr", "recommended": false, "title": "Recyclarr", @@ -5741,7 +5741,7 @@ "latest_version": "2.0.11", "latest_app_version": "v24.09.1", "latest_human_version": "v24.09.1_2.0.11", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "handbrake", "recommended": false, "title": "Handbrake", @@ -5816,7 +5816,7 @@ "latest_version": "2.0.10", "latest_app_version": "v24.05.1", "latest_human_version": "v24.05.1_2.0.10", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "homer", "recommended": false, "title": "Homer", @@ -5860,7 +5860,7 @@ "latest_version": "1.1.10", "latest_app_version": "1.1.2-2", "latest_human_version": "1.1.2-2_1.1.10", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "clamav", "recommended": false, "title": "ClamAV", @@ -5926,7 +5926,7 @@ "latest_version": "1.0.33", "latest_app_version": "4.0.5", "latest_human_version": "4.0.5_1.0.33", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "node-red", "recommended": false, "title": "Node-RED", @@ -5972,7 +5972,7 @@ "latest_version": "1.1.11", "latest_app_version": "v2.31.2", "latest_human_version": "v2.31.2_1.1.11", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "filebrowser", "recommended": false, "title": "File Browser", @@ -6022,7 +6022,7 @@ "latest_version": "1.0.17", "latest_app_version": "1.36.0", "latest_human_version": "1.36.0_1.0.17", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "linkding", "recommended": false, "title": "Linkding", @@ -6075,7 +6075,7 @@ "latest_version": "1.0.11", "latest_app_version": "1.23.2", "latest_human_version": "1.23.2_1.0.11", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "planka", "recommended": false, "title": "Planka", @@ -6130,7 +6130,7 @@ "latest_version": "1.0.28", "latest_app_version": "5.0.0", "latest_human_version": "5.0.0_1.0.28", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "qbittorrent", "recommended": false, "title": "qBittorrent", @@ -6178,7 +6178,7 @@ "latest_version": "1.2.18", "latest_app_version": "version-6.1.21", "latest_human_version": "version-6.1.21_1.2.18", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "firefly-iii", "recommended": false, "title": "Firefly III", @@ -6265,7 +6265,7 @@ "latest_version": "1.0.7", "latest_app_version": "7.4.1", "latest_human_version": "7.4.1_1.0.7", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "redis", "recommended": false, "title": "Redis", @@ -6310,7 +6310,7 @@ "latest_version": "1.0.25", "latest_app_version": "10.9.11", "latest_human_version": "10.9.11_1.0.25", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "jellyfin", "recommended": false, "title": "Jellyfin", @@ -6362,7 +6362,7 @@ "latest_version": "1.0.18", "latest_app_version": "2.1.1", "latest_human_version": "2.1.1_1.0.18", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "deluge", "recommended": false, "title": "Deluge", @@ -6428,7 +6428,7 @@ "latest_version": "1.2.10", "latest_app_version": "v1.12.0", "latest_human_version": "v1.12.0_1.2.10", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "mealie", "recommended": false, "title": "Mealie", @@ -6481,7 +6481,7 @@ "latest_version": "1.1.14", "latest_app_version": "1.24.3", "latest_human_version": "1.24.3_1.1.14", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "freshrss", "recommended": false, "title": "FreshRSS", @@ -6549,7 +6549,7 @@ "latest_version": "1.0.19", "latest_app_version": "0.15.4", "latest_human_version": "0.15.4_1.0.19", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "homarr", "recommended": false, "title": "Homarr", @@ -6597,7 +6597,7 @@ "latest_version": "1.0.7", "latest_app_version": "1.6.9-apache", "latest_human_version": "1.6.9-apache_1.0.7", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "name": "roundcube", "recommended": false, "title": "Roundcube", @@ -6673,10 +6673,10 @@ "healthy_error": null, "home": "https://nginxproxymanager.com/", "location": "/__w/apps/apps/trains/community/nginx-proxy-manager", - "latest_version": "1.0.20", - "latest_app_version": "2.11.3", - "latest_human_version": "2.11.3_1.0.20", - "last_update": "2024-10-16 17:52:00", + "latest_version": "1.0.21", + "latest_app_version": "2.12.0", + "latest_human_version": "2.12.0_1.0.21", + "last_update": "2024-10-16 19:06:56", "name": "nginx-proxy-manager", "recommended": false, "title": "Nginx Proxy Manager", diff --git a/trains/community/actual-budget/app_versions.json b/trains/community/actual-budget/app_versions.json index 4fdd818ae9..b3bef9ef03 100644 --- a/trains/community/actual-budget/app_versions.json +++ b/trains/community/actual-budget/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/actual-budget/1.1.13", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "24.10.1_1.1.13", "version": "1.1.13", diff --git a/trains/community/adguard-home/app_versions.json b/trains/community/adguard-home/app_versions.json index 67a18aac6c..8e94bb46a7 100644 --- a/trains/community/adguard-home/app_versions.json +++ b/trains/community/adguard-home/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/adguard-home/1.0.22", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "v0.107.53_1.0.22", "version": "1.0.22", diff --git a/trains/community/audiobookshelf/app_versions.json b/trains/community/audiobookshelf/app_versions.json index 62b8ac4fe3..0b2730aeed 100644 --- a/trains/community/audiobookshelf/app_versions.json +++ b/trains/community/audiobookshelf/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/audiobookshelf/1.2.14", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "2.15.0_1.2.14", "version": "1.2.14", diff --git a/trains/community/autobrr/app_versions.json b/trains/community/autobrr/app_versions.json index aed3e2c5be..c780ba0500 100644 --- a/trains/community/autobrr/app_versions.json +++ b/trains/community/autobrr/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/autobrr/1.1.14", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "v1.47.1_1.1.14", "version": "1.1.14", diff --git a/trains/community/bazarr/app_versions.json b/trains/community/bazarr/app_versions.json index 690d1e9643..cf84428c12 100644 --- a/trains/community/bazarr/app_versions.json +++ b/trains/community/bazarr/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/bazarr/1.0.22", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "1.4.5_1.0.22", "version": "1.0.22", diff --git a/trains/community/briefkasten/app_versions.json b/trains/community/briefkasten/app_versions.json index 4546e3e44c..0b03074d0f 100644 --- a/trains/community/briefkasten/app_versions.json +++ b/trains/community/briefkasten/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/briefkasten/1.0.19", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "latest_1.0.19", "version": "1.0.19", diff --git a/trains/community/castopod/app_versions.json b/trains/community/castopod/app_versions.json index bdcc72b44e..69329028c5 100644 --- a/trains/community/castopod/app_versions.json +++ b/trains/community/castopod/app_versions.json @@ -1,15 +1,15 @@ { - "1.0.9": { + "1.0.10": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/castopod/1.0.9", - "last_update": "2024-10-16 17:52:00", + "location": "/__w/apps/apps/trains/community/castopod/1.0.10", + "last_update": "2024-10-16 19:06:56", "required_features": [], - "human_version": "1.12.10_1.0.9", - "version": "1.0.9", + "human_version": "1.12.11_1.0.10", + "version": "1.0.10", "app_metadata": { - "app_version": "1.12.10", + "app_version": "1.12.11", "capabilities": [ { "description": "Castopod is able to chown files.", @@ -84,7 +84,7 @@ ], "title": "Castopod", "train": "community", - "version": "1.0.9" + "version": "1.0.10" }, "schema": { "groups": [ diff --git a/trains/community/chia/app_versions.json b/trains/community/chia/app_versions.json index fa1cc52637..8130930f17 100644 --- a/trains/community/chia/app_versions.json +++ b/trains/community/chia/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/chia/1.0.15", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "2.4.3_1.0.15", "version": "1.0.15", diff --git a/trains/community/clamav/app_versions.json b/trains/community/clamav/app_versions.json index d5291ca674..af756f60a0 100644 --- a/trains/community/clamav/app_versions.json +++ b/trains/community/clamav/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/clamav/1.1.10", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "1.1.2-2_1.1.10", "version": "1.1.10", diff --git a/trains/community/cloudflared/app_versions.json b/trains/community/cloudflared/app_versions.json index 34399d5c59..a67ac8cab8 100644 --- a/trains/community/cloudflared/app_versions.json +++ b/trains/community/cloudflared/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/cloudflared/1.1.13", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "2024.10.0_1.1.13", "version": "1.1.13", diff --git a/trains/community/dashy/app_versions.json b/trains/community/dashy/app_versions.json index 13961c97c3..f04a243512 100644 --- a/trains/community/dashy/app_versions.json +++ b/trains/community/dashy/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/dashy/1.0.18", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "3.1.0_1.0.18", "version": "1.0.18", diff --git a/trains/community/ddns-updater/app_versions.json b/trains/community/ddns-updater/app_versions.json index 4bd4172e10..ebee09ca64 100644 --- a/trains/community/ddns-updater/app_versions.json +++ b/trains/community/ddns-updater/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/ddns-updater/1.0.24", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "v2.8.1_1.0.24", "version": "1.0.24", diff --git a/trains/community/deluge/app_versions.json b/trains/community/deluge/app_versions.json index 9a5f27f718..256624d963 100644 --- a/trains/community/deluge/app_versions.json +++ b/trains/community/deluge/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/deluge/1.0.18", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "2.1.1_1.0.18", "version": "1.0.18", diff --git a/trains/community/distribution/app_versions.json b/trains/community/distribution/app_versions.json index cdcc58c539..fd27ab71ad 100644 --- a/trains/community/distribution/app_versions.json +++ b/trains/community/distribution/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/distribution/1.0.19", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "2.8.3_1.0.19", "version": "1.0.19", diff --git a/trains/community/dockge/app_versions.json b/trains/community/dockge/app_versions.json index f422a5924a..dfd89f603d 100644 --- a/trains/community/dockge/app_versions.json +++ b/trains/community/dockge/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/dockge/1.0.17", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "1.4.2_1.0.17", "version": "1.0.17", diff --git a/trains/community/drawio/app_versions.json b/trains/community/drawio/app_versions.json index bde4930596..a1ad4d8e8f 100644 --- a/trains/community/drawio/app_versions.json +++ b/trains/community/drawio/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/drawio/1.1.11", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "24.7.17_1.1.11", "version": "1.1.11", diff --git a/trains/community/filebrowser/app_versions.json b/trains/community/filebrowser/app_versions.json index 95d31ea763..a0a51d11f2 100644 --- a/trains/community/filebrowser/app_versions.json +++ b/trains/community/filebrowser/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/filebrowser/1.1.11", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "v2.31.2_1.1.11", "version": "1.1.11", diff --git a/trains/community/firefly-iii/app_versions.json b/trains/community/firefly-iii/app_versions.json index 8b4e10d513..1b288e265c 100644 --- a/trains/community/firefly-iii/app_versions.json +++ b/trains/community/firefly-iii/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/firefly-iii/1.2.18", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "version-6.1.21_1.2.18", "version": "1.2.18", diff --git a/trains/community/flame/app_versions.json b/trains/community/flame/app_versions.json index 7789aef597..11289c0830 100644 --- a/trains/community/flame/app_versions.json +++ b/trains/community/flame/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/flame/1.0.19", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "2.3.1_1.0.19", "version": "1.0.19", diff --git a/trains/community/freshrss/app_versions.json b/trains/community/freshrss/app_versions.json index 1fe89538a2..409db2e1f5 100644 --- a/trains/community/freshrss/app_versions.json +++ b/trains/community/freshrss/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/freshrss/1.1.14", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "1.24.3_1.1.14", "version": "1.1.14", diff --git a/trains/community/frigate/app_versions.json b/trains/community/frigate/app_versions.json index 6c9c9fd25a..53787da851 100644 --- a/trains/community/frigate/app_versions.json +++ b/trains/community/frigate/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/frigate/1.0.9", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "0.14.1_1.0.9", "version": "1.0.9", diff --git a/trains/community/fscrawler/app_versions.json b/trains/community/fscrawler/app_versions.json index d318b742fa..ec9f9d048c 100644 --- a/trains/community/fscrawler/app_versions.json +++ b/trains/community/fscrawler/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/fscrawler/1.0.17", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "2.10-SNAPSHOT-ocr-es7_1.0.17", "version": "1.0.17", diff --git a/trains/community/gitea/app_versions.json b/trains/community/gitea/app_versions.json index a1b24129bf..19b277e942 100644 --- a/trains/community/gitea/app_versions.json +++ b/trains/community/gitea/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/gitea/1.0.12", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "1.22.3_1.0.12", "version": "1.0.12", diff --git a/trains/community/grafana/app_versions.json b/trains/community/grafana/app_versions.json index 34d13011c5..69f436cdd9 100644 --- a/trains/community/grafana/app_versions.json +++ b/trains/community/grafana/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/grafana/1.1.12", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "11.2.2_1.1.12", "version": "1.1.12", diff --git a/trains/community/handbrake/app_versions.json b/trains/community/handbrake/app_versions.json index 7516786fc6..8f8011811b 100644 --- a/trains/community/handbrake/app_versions.json +++ b/trains/community/handbrake/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/handbrake/2.0.11", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "v24.09.1_2.0.11", "version": "2.0.11", diff --git a/trains/community/homarr/app_versions.json b/trains/community/homarr/app_versions.json index 5090b07fea..d4f8ec3628 100644 --- a/trains/community/homarr/app_versions.json +++ b/trains/community/homarr/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/homarr/1.0.19", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "0.15.4_1.0.19", "version": "1.0.19", diff --git a/trains/community/homepage/app_versions.json b/trains/community/homepage/app_versions.json index 6526995715..c258ec6e50 100644 --- a/trains/community/homepage/app_versions.json +++ b/trains/community/homepage/app_versions.json @@ -1,15 +1,15 @@ { - "1.0.22": { + "1.0.23": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/homepage/1.0.22", - "last_update": "2024-10-16 17:52:00", + "location": "/__w/apps/apps/trains/community/homepage/1.0.23", + "last_update": "2024-10-16 19:06:56", "required_features": [], - "human_version": "v0.9.10_1.0.22", - "version": "1.0.22", + "human_version": "v0.9.11_1.0.23", + "version": "1.0.23", "app_metadata": { - "app_version": "v0.9.10", + "app_version": "v0.9.11", "capabilities": [], "categories": [ "productivity" @@ -54,7 +54,7 @@ ], "title": "Homepage", "train": "community", - "version": "1.0.22" + "version": "1.0.23" }, "schema": { "groups": [ diff --git a/trains/community/homer/app_versions.json b/trains/community/homer/app_versions.json index dbe635bb45..6f69e33722 100644 --- a/trains/community/homer/app_versions.json +++ b/trains/community/homer/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/homer/2.0.10", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "v24.05.1_2.0.10", "version": "2.0.10", diff --git a/trains/community/immich/app_versions.json b/trains/community/immich/app_versions.json index d895249b16..b2e21b6786 100644 --- a/trains/community/immich/app_versions.json +++ b/trains/community/immich/app_versions.json @@ -1,15 +1,15 @@ { - "1.6.19": { + "1.6.20": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/immich/1.6.19", - "last_update": "2024-10-16 17:52:00", + "location": "/__w/apps/apps/trains/community/immich/1.6.20", + "last_update": "2024-10-16 19:06:56", "required_features": [], - "human_version": "v1.118.0_1.6.19", - "version": "1.6.19", + "human_version": "v1.118.1_1.6.20", + "version": "1.6.20", "app_metadata": { - "app_version": "v1.118.0", + "app_version": "v1.118.1", "capabilities": [ { "description": "Immich Proxy is able to chown files.", @@ -75,7 +75,7 @@ ], "title": "Immich", "train": "community", - "version": "1.6.19" + "version": "1.6.20" }, "schema": { "groups": [ diff --git a/trains/community/invidious/app_versions.json b/trains/community/invidious/app_versions.json index 3f50010052..3b25fe7233 100644 --- a/trains/community/invidious/app_versions.json +++ b/trains/community/invidious/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/invidious/1.0.11", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "2.20240825.2_1.0.11", "version": "1.0.11", diff --git a/trains/community/ipfs/app_versions.json b/trains/community/ipfs/app_versions.json index 4e656f9ff2..a91f8717f9 100644 --- a/trains/community/ipfs/app_versions.json +++ b/trains/community/ipfs/app_versions.json @@ -1,15 +1,15 @@ { - "1.0.19": { + "1.0.20": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/ipfs/1.0.19", - "last_update": "2024-10-16 17:52:00", + "location": "/__w/apps/apps/trains/community/ipfs/1.0.20", + "last_update": "2024-10-16 19:06:56", "required_features": [], - "human_version": "v0.30.0_1.0.19", - "version": "1.0.19", + "human_version": "v0.31.0_1.0.20", + "version": "1.0.20", "app_metadata": { - "app_version": "v0.30.0", + "app_version": "v0.31.0", "capabilities": [], "categories": [ "storage" @@ -53,7 +53,7 @@ ], "title": "IPFS", "train": "community", - "version": "1.0.19" + "version": "1.0.20" }, "schema": { "groups": [ diff --git a/trains/community/jellyfin/app_versions.json b/trains/community/jellyfin/app_versions.json index 0eca48e428..bce2dccf9f 100644 --- a/trains/community/jellyfin/app_versions.json +++ b/trains/community/jellyfin/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/jellyfin/1.0.25", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "10.9.11_1.0.25", "version": "1.0.25", diff --git a/trains/community/jellyseerr/app_versions.json b/trains/community/jellyseerr/app_versions.json index 6fd5e434a9..7ebd068990 100644 --- a/trains/community/jellyseerr/app_versions.json +++ b/trains/community/jellyseerr/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/jellyseerr/1.0.19", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "1.9.2_1.0.19", "version": "1.0.19", diff --git a/trains/community/jenkins/app_versions.json b/trains/community/jenkins/app_versions.json index 31750863d7..fb360e6c60 100644 --- a/trains/community/jenkins/app_versions.json +++ b/trains/community/jenkins/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/jenkins/1.0.13", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "2.462.1-jdk17_1.0.13", "version": "1.0.13", diff --git a/trains/community/joplin/app_versions.json b/trains/community/joplin/app_versions.json index 9d2cbe7f13..c58a6a590a 100644 --- a/trains/community/joplin/app_versions.json +++ b/trains/community/joplin/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/joplin/1.1.11", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "3.0.1-beta_1.1.11", "version": "1.1.11", diff --git a/trains/community/kapowarr/app_versions.json b/trains/community/kapowarr/app_versions.json index a7ac4d4072..8e70f8def0 100644 --- a/trains/community/kapowarr/app_versions.json +++ b/trains/community/kapowarr/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/kapowarr/1.0.19", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "v1.0.0_1.0.19", "version": "1.0.19", diff --git a/trains/community/kavita/app_versions.json b/trains/community/kavita/app_versions.json index d9ddb48de6..b31a492ef0 100644 --- a/trains/community/kavita/app_versions.json +++ b/trains/community/kavita/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/kavita/1.0.19", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "0.8.3_1.0.19", "version": "1.0.19", diff --git a/trains/community/komga/app_versions.json b/trains/community/komga/app_versions.json index 974ec4bee1..e14eb370da 100644 --- a/trains/community/komga/app_versions.json +++ b/trains/community/komga/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/komga/1.1.14", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "1.14.1_1.1.14", "version": "1.1.14", diff --git a/trains/community/lidarr/app_versions.json b/trains/community/lidarr/app_versions.json index 77f74657f5..a951dfbf19 100644 --- a/trains/community/lidarr/app_versions.json +++ b/trains/community/lidarr/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/lidarr/1.1.12", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "2.6.4.4402_1.1.12", "version": "1.1.12", diff --git a/trains/community/linkding/app_versions.json b/trains/community/linkding/app_versions.json index c1b3c42afe..d4cab885d9 100644 --- a/trains/community/linkding/app_versions.json +++ b/trains/community/linkding/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/linkding/1.0.17", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "1.36.0_1.0.17", "version": "1.0.17", diff --git a/trains/community/listmonk/app_versions.json b/trains/community/listmonk/app_versions.json index ca5c4c5dae..4cbc0c70a0 100644 --- a/trains/community/listmonk/app_versions.json +++ b/trains/community/listmonk/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/listmonk/1.0.9", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "v3.0.0_1.0.9", "version": "1.0.9", diff --git a/trains/community/logseq/app_versions.json b/trains/community/logseq/app_versions.json index 053d0d8735..1d606978d9 100644 --- a/trains/community/logseq/app_versions.json +++ b/trains/community/logseq/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/logseq/1.0.18", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "latest_1.0.18", "version": "1.0.18", diff --git a/trains/community/mealie/app_versions.json b/trains/community/mealie/app_versions.json index 5bfe71e60a..40468fe406 100644 --- a/trains/community/mealie/app_versions.json +++ b/trains/community/mealie/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/mealie/1.2.10", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "v1.12.0_1.2.10", "version": "1.2.10", diff --git a/trains/community/metube/app_versions.json b/trains/community/metube/app_versions.json index 21a19b09c5..715c3a1b4d 100644 --- a/trains/community/metube/app_versions.json +++ b/trains/community/metube/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/metube/1.1.17", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "2024-10-08_1.1.17", "version": "1.1.17", diff --git a/trains/community/minecraft/app_versions.json b/trains/community/minecraft/app_versions.json index 9012e6ed99..cc32709ca1 100644 --- a/trains/community/minecraft/app_versions.json +++ b/trains/community/minecraft/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/minecraft/1.11.18", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "2024.10.1_1.11.18", "version": "1.11.18", diff --git a/trains/community/mineos/app_versions.json b/trains/community/mineos/app_versions.json index 5c92e0bc56..4bcc47d993 100644 --- a/trains/community/mineos/app_versions.json +++ b/trains/community/mineos/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/mineos/1.0.18", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "latest_1.0.18", "version": "1.0.18", diff --git a/trains/community/mumble/app_versions.json b/trains/community/mumble/app_versions.json index 62f8fbf206..e18e9bdf0c 100644 --- a/trains/community/mumble/app_versions.json +++ b/trains/community/mumble/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/mumble/1.1.10", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "v1.5.634_1.1.10", "version": "1.1.10", diff --git a/trains/community/n8n/app_versions.json b/trains/community/n8n/app_versions.json index 1c4711e25a..9192756e7d 100644 --- a/trains/community/n8n/app_versions.json +++ b/trains/community/n8n/app_versions.json @@ -1,15 +1,15 @@ { - "1.3.23": { + "1.3.24": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/n8n/1.3.23", - "last_update": "2024-10-16 17:52:00", + "location": "/__w/apps/apps/trains/community/n8n/1.3.24", + "last_update": "2024-10-16 19:06:56", "required_features": [], - "human_version": "1.63.2_1.3.23", - "version": "1.3.23", + "human_version": "1.64.0_1.3.24", + "version": "1.3.24", "app_metadata": { - "app_version": "1.63.2", + "app_version": "1.64.0", "capabilities": [], "categories": [ "productivity" @@ -67,7 +67,7 @@ ], "title": "n8n", "train": "community", - "version": "1.3.23" + "version": "1.3.24" }, "schema": { "groups": [ diff --git a/trains/community/navidrome/app_versions.json b/trains/community/navidrome/app_versions.json index a445c4e865..fddc4215f0 100644 --- a/trains/community/navidrome/app_versions.json +++ b/trains/community/navidrome/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/navidrome/1.0.24", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "0.53.3_1.0.24", "version": "1.0.24", diff --git a/trains/community/netbootxyz/app_versions.json b/trains/community/netbootxyz/app_versions.json index a04d860369..b8eeb2a632 100644 --- a/trains/community/netbootxyz/app_versions.json +++ b/trains/community/netbootxyz/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/netbootxyz/1.0.19", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "0.7.3-nbxyz1_1.0.19", "version": "1.0.19", diff --git a/trains/community/nginx-proxy-manager/app_versions.json b/trains/community/nginx-proxy-manager/app_versions.json index 84913714e9..5762885be1 100644 --- a/trains/community/nginx-proxy-manager/app_versions.json +++ b/trains/community/nginx-proxy-manager/app_versions.json @@ -1,15 +1,15 @@ { - "1.0.20": { + "1.0.21": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/nginx-proxy-manager/1.0.20", - "last_update": "2024-10-16 17:52:00", + "location": "/__w/apps/apps/trains/community/nginx-proxy-manager/1.0.21", + "last_update": "2024-10-16 19:06:56", "required_features": [], - "human_version": "2.11.3_1.0.20", - "version": "1.0.20", + "human_version": "2.12.0_1.0.21", + "version": "1.0.21", "app_metadata": { - "app_version": "2.11.3", + "app_version": "2.12.0", "capabilities": [ { "description": "Nginx Proxy Manager requires this ability to switch user for sub-processes.", @@ -74,7 +74,7 @@ ], "title": "Nginx Proxy Manager", "train": "community", - "version": "1.0.20" + "version": "1.0.21" }, "schema": { "groups": [ diff --git a/trains/community/node-red/app_versions.json b/trains/community/node-red/app_versions.json index 9c213674b8..fdd3548c35 100644 --- a/trains/community/node-red/app_versions.json +++ b/trains/community/node-red/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/node-red/1.0.33", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "4.0.5_1.0.33", "version": "1.0.33", diff --git a/trains/community/odoo/app_versions.json b/trains/community/odoo/app_versions.json index 063ba20738..6d7f54c2f5 100644 --- a/trains/community/odoo/app_versions.json +++ b/trains/community/odoo/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/odoo/1.0.4", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "17.0_1.0.4", "version": "1.0.4", diff --git a/trains/community/omada-controller/app_versions.json b/trains/community/omada-controller/app_versions.json index 9ca32d827a..7c783d7403 100644 --- a/trains/community/omada-controller/app_versions.json +++ b/trains/community/omada-controller/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/omada-controller/1.1.10", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "5.14_1.1.10", "version": "1.1.10", diff --git a/trains/community/organizr/app_versions.json b/trains/community/organizr/app_versions.json index 3532cb46d3..3784785b7f 100644 --- a/trains/community/organizr/app_versions.json +++ b/trains/community/organizr/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/organizr/1.0.18", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "latest_1.0.18", "version": "1.0.18", diff --git a/trains/community/overseerr/app_versions.json b/trains/community/overseerr/app_versions.json index 61d0ad657a..5a51ac56c5 100644 --- a/trains/community/overseerr/app_versions.json +++ b/trains/community/overseerr/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/overseerr/1.0.18", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "1.33.2_1.0.18", "version": "1.0.18", diff --git a/trains/community/palworld/app_versions.json b/trains/community/palworld/app_versions.json index 76854f01f6..53a65891e1 100644 --- a/trains/community/palworld/app_versions.json +++ b/trains/community/palworld/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/palworld/1.0.20", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "palworld_1.0.20", "version": "1.0.20", diff --git a/trains/community/paperless-ngx/app_versions.json b/trains/community/paperless-ngx/app_versions.json index c8c3d7988e..92b44c16d0 100644 --- a/trains/community/paperless-ngx/app_versions.json +++ b/trains/community/paperless-ngx/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/paperless-ngx/1.0.12", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "2.12.1_1.0.12", "version": "1.0.12", diff --git a/trains/community/passbolt/app_versions.json b/trains/community/passbolt/app_versions.json index b93249fa95..375384d9e3 100644 --- a/trains/community/passbolt/app_versions.json +++ b/trains/community/passbolt/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/passbolt/1.0.7", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "4.9.1-1-ce-non-root_1.0.7", "version": "1.0.7", diff --git a/trains/community/pgadmin/app_versions.json b/trains/community/pgadmin/app_versions.json index 7679460522..a5b9550c27 100644 --- a/trains/community/pgadmin/app_versions.json +++ b/trains/community/pgadmin/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/pgadmin/1.0.5", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "8.12_1.0.5", "version": "1.0.5", diff --git a/trains/community/pigallery2/app_versions.json b/trains/community/pigallery2/app_versions.json index e6c96df0db..71b15acde4 100644 --- a/trains/community/pigallery2/app_versions.json +++ b/trains/community/pigallery2/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/pigallery2/1.0.6", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "2.0.0_1.0.6", "version": "1.0.6", diff --git a/trains/community/piwigo/app_versions.json b/trains/community/piwigo/app_versions.json index e0bd0a22b6..f5bec0ad31 100644 --- a/trains/community/piwigo/app_versions.json +++ b/trains/community/piwigo/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/piwigo/1.0.6", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "14.5.0_1.0.6", "version": "1.0.6", diff --git a/trains/community/planka/app_versions.json b/trains/community/planka/app_versions.json index a5d2864965..09a011c73f 100644 --- a/trains/community/planka/app_versions.json +++ b/trains/community/planka/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/planka/1.0.11", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "1.23.2_1.0.11", "version": "1.0.11", diff --git a/trains/community/plex-auto-languages/app_versions.json b/trains/community/plex-auto-languages/app_versions.json index 94bce6be90..11023fdf65 100644 --- a/trains/community/plex-auto-languages/app_versions.json +++ b/trains/community/plex-auto-languages/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/plex-auto-languages/1.0.16", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "v1.2.3_1.0.16", "version": "1.0.16", diff --git a/trains/community/portainer/app_versions.json b/trains/community/portainer/app_versions.json index 410cf2fb6f..e0c279615a 100644 --- a/trains/community/portainer/app_versions.json +++ b/trains/community/portainer/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/portainer/1.2.14", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "2.23.0_1.2.14", "version": "1.2.14", diff --git a/trains/community/prowlarr/app_versions.json b/trains/community/prowlarr/app_versions.json index da25fdcbf3..2f3e326489 100644 --- a/trains/community/prowlarr/app_versions.json +++ b/trains/community/prowlarr/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/prowlarr/1.2.13", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "1.25.2.4794_1.2.13", "version": "1.2.13", diff --git a/trains/community/qbittorrent/app_versions.json b/trains/community/qbittorrent/app_versions.json index e930236c32..2c5bce6275 100644 --- a/trains/community/qbittorrent/app_versions.json +++ b/trains/community/qbittorrent/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/qbittorrent/1.0.28", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "5.0.0_1.0.28", "version": "1.0.28", diff --git a/trains/community/radarr/app_versions.json b/trains/community/radarr/app_versions.json index 436ab421ba..2c39a3ecbe 100644 --- a/trains/community/radarr/app_versions.json +++ b/trains/community/radarr/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/radarr/1.1.12", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "5.12.2.9335_1.1.12", "version": "1.1.12", diff --git a/trains/community/readarr/app_versions.json b/trains/community/readarr/app_versions.json index 8456f4ab95..c08fe0f453 100644 --- a/trains/community/readarr/app_versions.json +++ b/trains/community/readarr/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/readarr/1.0.19", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "0.3.32.2587_1.0.19", "version": "1.0.19", diff --git a/trains/community/recyclarr/app_versions.json b/trains/community/recyclarr/app_versions.json index 0532f02bc5..52329713ba 100644 --- a/trains/community/recyclarr/app_versions.json +++ b/trains/community/recyclarr/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/recyclarr/1.0.8", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "7.2.4_1.0.8", "version": "1.0.8", diff --git a/trains/community/redis/app_versions.json b/trains/community/redis/app_versions.json index b3e08358a9..1665cd78e8 100644 --- a/trains/community/redis/app_versions.json +++ b/trains/community/redis/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/redis/1.0.7", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "7.4.1_1.0.7", "version": "1.0.7", diff --git a/trains/community/roundcube/app_versions.json b/trains/community/roundcube/app_versions.json index 51c79d549c..0aa6e97c52 100644 --- a/trains/community/roundcube/app_versions.json +++ b/trains/community/roundcube/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/roundcube/1.0.7", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "1.6.9-apache_1.0.7", "version": "1.0.7", diff --git a/trains/community/rsyncd/app_versions.json b/trains/community/rsyncd/app_versions.json index 59f8c1bd8a..158c5601ba 100644 --- a/trains/community/rsyncd/app_versions.json +++ b/trains/community/rsyncd/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/rsyncd/1.0.14", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "1.0.0_1.0.14", "version": "1.0.14", diff --git a/trains/community/rust-desk/app_versions.json b/trains/community/rust-desk/app_versions.json index fb96ec3cb2..4443aea680 100644 --- a/trains/community/rust-desk/app_versions.json +++ b/trains/community/rust-desk/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/rust-desk/1.0.7", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "1.1.11-1_1.0.7", "version": "1.0.7", diff --git a/trains/community/sabnzbd/app_versions.json b/trains/community/sabnzbd/app_versions.json index 6a6af62603..243f7c7249 100644 --- a/trains/community/sabnzbd/app_versions.json +++ b/trains/community/sabnzbd/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/sabnzbd/1.0.7", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "4.3.3_1.0.7", "version": "1.0.7", diff --git a/trains/community/searxng/app_versions.json b/trains/community/searxng/app_versions.json index 7361b057c1..f6afb53802 100644 --- a/trains/community/searxng/app_versions.json +++ b/trains/community/searxng/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/searxng/1.0.16", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "2024.10.4-3e747d049_1.0.16", "version": "1.0.16", diff --git a/trains/community/sftpgo/app_versions.json b/trains/community/sftpgo/app_versions.json index 17af143e52..dcfb248593 100644 --- a/trains/community/sftpgo/app_versions.json +++ b/trains/community/sftpgo/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/sftpgo/1.0.7", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "2.6.2_1.0.7", "version": "1.0.7", diff --git a/trains/community/sonarr/app_versions.json b/trains/community/sonarr/app_versions.json index a33e95f246..f2a117224e 100644 --- a/trains/community/sonarr/app_versions.json +++ b/trains/community/sonarr/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/sonarr/1.0.19", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "4.0.9.2244_1.0.19", "version": "1.0.19", diff --git a/trains/community/tailscale/app_versions.json b/trains/community/tailscale/app_versions.json index 236177ef92..6bdd7c0955 100644 --- a/trains/community/tailscale/app_versions.json +++ b/trains/community/tailscale/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/tailscale/1.1.15", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "v1.74.1_1.1.15", "version": "1.1.15", diff --git a/trains/community/tautulli/app_versions.json b/trains/community/tautulli/app_versions.json index d690d0ba22..a4e895acf3 100644 --- a/trains/community/tautulli/app_versions.json +++ b/trains/community/tautulli/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/tautulli/1.0.21", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "v2.14.6_1.0.21", "version": "1.0.21", diff --git a/trains/community/tdarr/app_versions.json b/trains/community/tdarr/app_versions.json index 6413efbd14..85ac475559 100644 --- a/trains/community/tdarr/app_versions.json +++ b/trains/community/tdarr/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/tdarr/1.0.9", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "2.26.01_1.0.9", "version": "1.0.9", diff --git a/trains/community/terraria/app_versions.json b/trains/community/terraria/app_versions.json index 90fa72c690..33868042fb 100644 --- a/trains/community/terraria/app_versions.json +++ b/trains/community/terraria/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/terraria/1.0.6", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "tshock-1.4.4.9-5.2.0-3_1.0.6", "version": "1.0.6", diff --git a/trains/community/tftpd-hpa/app_versions.json b/trains/community/tftpd-hpa/app_versions.json index 759ce41f8d..44a0e316b9 100644 --- a/trains/community/tftpd-hpa/app_versions.json +++ b/trains/community/tftpd-hpa/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/tftpd-hpa/1.0.10", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "1.0.0_1.0.10", "version": "1.0.10", diff --git a/trains/community/tiny-media-manager/app_versions.json b/trains/community/tiny-media-manager/app_versions.json index 58bbd3e0c9..7db3ade6a0 100644 --- a/trains/community/tiny-media-manager/app_versions.json +++ b/trains/community/tiny-media-manager/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/tiny-media-manager/1.0.6", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "5.0.12_1.0.6", "version": "1.0.6", diff --git a/trains/community/transmission/app_versions.json b/trains/community/transmission/app_versions.json index e179d3bcf7..ab9be935b9 100644 --- a/trains/community/transmission/app_versions.json +++ b/trains/community/transmission/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/transmission/1.0.6", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "4.0.6_1.0.6", "version": "1.0.6", diff --git a/trains/community/twofactor-auth/app_versions.json b/trains/community/twofactor-auth/app_versions.json index cace97d128..20e824dc68 100644 --- a/trains/community/twofactor-auth/app_versions.json +++ b/trains/community/twofactor-auth/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/twofactor-auth/1.0.7", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "5.3.1_1.0.7", "version": "1.0.7", diff --git a/trains/community/unifi-controller/app_versions.json b/trains/community/unifi-controller/app_versions.json index 73b159c8fd..91eea3d6f5 100644 --- a/trains/community/unifi-controller/app_versions.json +++ b/trains/community/unifi-controller/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/unifi-controller/1.2.11", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "8.5.6_1.2.11", "version": "1.2.11", diff --git a/trains/community/unifi-protect-backup/app_versions.json b/trains/community/unifi-protect-backup/app_versions.json index 3edc86cf36..4816c69327 100644 --- a/trains/community/unifi-protect-backup/app_versions.json +++ b/trains/community/unifi-protect-backup/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/unifi-protect-backup/1.0.17", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "0.11.0_1.0.17", "version": "1.0.17", diff --git a/trains/community/vaultwarden/app_versions.json b/trains/community/vaultwarden/app_versions.json index a87590fe81..61ee4191ea 100644 --- a/trains/community/vaultwarden/app_versions.json +++ b/trains/community/vaultwarden/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/vaultwarden/1.0.7", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "1.32.2_1.0.7", "version": "1.0.7", diff --git a/trains/community/vikunja/app_versions.json b/trains/community/vikunja/app_versions.json index a1f3154c63..b8cc13aa92 100644 --- a/trains/community/vikunja/app_versions.json +++ b/trains/community/vikunja/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/vikunja/1.2.14", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "0.24.4_1.2.14", "version": "1.2.14", diff --git a/trains/community/webdav/app_versions.json b/trains/community/webdav/app_versions.json index 099451540a..16361ce8b8 100644 --- a/trains/community/webdav/app_versions.json +++ b/trains/community/webdav/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/webdav/1.0.13", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "2.4.62_1.0.13", "version": "1.0.13", diff --git a/trains/community/whoogle/app_versions.json b/trains/community/whoogle/app_versions.json index 2f3d732bc9..78baf9e314 100644 --- a/trains/community/whoogle/app_versions.json +++ b/trains/community/whoogle/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/whoogle/1.0.20", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "0.9.0_1.0.20", "version": "1.0.20", diff --git a/trains/community/wordpress/app_versions.json b/trains/community/wordpress/app_versions.json index 9375c6b79e..3ab4900596 100644 --- a/trains/community/wordpress/app_versions.json +++ b/trains/community/wordpress/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/wordpress/1.0.7", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "6.6.2_1.0.7", "version": "1.0.7", diff --git a/trains/community/zerotier/app_versions.json b/trains/community/zerotier/app_versions.json index dd1c3b7aef..54283bf279 100644 --- a/trains/community/zerotier/app_versions.json +++ b/trains/community/zerotier/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/zerotier/1.0.19", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "1.14.1_1.0.19", "version": "1.0.19", diff --git a/trains/enterprise/minio/app_versions.json b/trains/enterprise/minio/app_versions.json index 1052fe2134..3d3b97a3f5 100644 --- a/trains/enterprise/minio/app_versions.json +++ b/trains/enterprise/minio/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/enterprise/minio/1.1.7", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "RELEASE.2024-08-26T15-33-07Z_1.1.7", "version": "1.1.7", diff --git a/trains/enterprise/syncthing/app_versions.json b/trains/enterprise/syncthing/app_versions.json index 80f71710e8..fb8741598d 100644 --- a/trains/enterprise/syncthing/app_versions.json +++ b/trains/enterprise/syncthing/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/enterprise/syncthing/1.0.15", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "1.27.10_1.0.15", "version": "1.0.15", diff --git a/trains/stable/collabora/app_versions.json b/trains/stable/collabora/app_versions.json index f0a97474ec..3f11612054 100644 --- a/trains/stable/collabora/app_versions.json +++ b/trains/stable/collabora/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/stable/collabora/1.1.15", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "24.04.8.2.1_1.1.15", "version": "1.1.15", diff --git a/trains/stable/diskoverdata/app_versions.json b/trains/stable/diskoverdata/app_versions.json index b54fe30312..48c025b22b 100644 --- a/trains/stable/diskoverdata/app_versions.json +++ b/trains/stable/diskoverdata/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/stable/diskoverdata/1.3.8", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "2.3.0_1.3.8", "version": "1.3.8", diff --git a/trains/stable/elastic-search/app_versions.json b/trains/stable/elastic-search/app_versions.json index e3d296fa73..d08fb08942 100644 --- a/trains/stable/elastic-search/app_versions.json +++ b/trains/stable/elastic-search/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/stable/elastic-search/1.1.12", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "8.15.2_1.1.12", "version": "1.1.12", diff --git a/trains/stable/emby/app_versions.json b/trains/stable/emby/app_versions.json index c7d82de56a..82fc0458dc 100644 --- a/trains/stable/emby/app_versions.json +++ b/trains/stable/emby/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/stable/emby/1.1.13", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "4.8.10.0_1.1.13", "version": "1.1.13", diff --git a/trains/stable/home-assistant/app_versions.json b/trains/stable/home-assistant/app_versions.json index 43ee71e687..3462087cb8 100644 --- a/trains/stable/home-assistant/app_versions.json +++ b/trains/stable/home-assistant/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/stable/home-assistant/1.2.21", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "2024.10.2_1.2.21", "version": "1.2.21", diff --git a/trains/stable/ix-app/app_versions.json b/trains/stable/ix-app/app_versions.json index 1007f527a6..a8b90bd5f0 100644 --- a/trains/stable/ix-app/app_versions.json +++ b/trains/stable/ix-app/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/stable/ix-app/1.0.11", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "1.0.0_1.0.11", "version": "1.0.11", diff --git a/trains/stable/minio/app_versions.json b/trains/stable/minio/app_versions.json index eae5ad5527..dbdcb7a561 100644 --- a/trains/stable/minio/app_versions.json +++ b/trains/stable/minio/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/stable/minio/1.1.13", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "RELEASE.2024-10-13T13-34-11Z_1.1.13", "version": "1.1.13", diff --git a/trains/stable/netdata/app_versions.json b/trains/stable/netdata/app_versions.json index cfd011e24e..21806ab179 100644 --- a/trains/stable/netdata/app_versions.json +++ b/trains/stable/netdata/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/stable/netdata/1.1.14", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "v1.47.4_1.1.14", "version": "1.1.14", diff --git a/trains/stable/nextcloud/app_versions.json b/trains/stable/nextcloud/app_versions.json index 1ec589fb7d..ee1f0ba047 100644 --- a/trains/stable/nextcloud/app_versions.json +++ b/trains/stable/nextcloud/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/stable/nextcloud/1.3.20", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "30.0.0_1.3.20", "version": "1.3.20", diff --git a/trains/stable/photoprism/app_versions.json b/trains/stable/photoprism/app_versions.json index f76b9312e0..e8398477ee 100644 --- a/trains/stable/photoprism/app_versions.json +++ b/trains/stable/photoprism/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/stable/photoprism/1.1.14", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "240915_1.1.14", "version": "1.1.14", diff --git a/trains/stable/pihole/app_versions.json b/trains/stable/pihole/app_versions.json index c660c6a333..ef026035a8 100644 --- a/trains/stable/pihole/app_versions.json +++ b/trains/stable/pihole/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/stable/pihole/1.1.11", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "2024.07.0_1.1.11", "version": "1.1.11", diff --git a/trains/stable/plex/app_versions.json b/trains/stable/plex/app_versions.json index 8022df6c6a..e5282243cb 100644 --- a/trains/stable/plex/app_versions.json +++ b/trains/stable/plex/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/stable/plex/1.0.23", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "1.40.2.8395-c67dce28e_1.0.23", "version": "1.0.23", diff --git a/trains/stable/prometheus/app_versions.json b/trains/stable/prometheus/app_versions.json index b6222824d1..1dc525f9ba 100644 --- a/trains/stable/prometheus/app_versions.json +++ b/trains/stable/prometheus/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/stable/prometheus/1.1.11", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "v2.54.1_1.1.11", "version": "1.1.11", diff --git a/trains/stable/storj/app_versions.json b/trains/stable/storj/app_versions.json index 8fcdfc0b9b..df2de54e41 100644 --- a/trains/stable/storj/app_versions.json +++ b/trains/stable/storj/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/stable/storj/1.1.10", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "6f87ea801-v1.71.2-go1.18.8_1.1.10", "version": "1.1.10", diff --git a/trains/stable/syncthing/app_versions.json b/trains/stable/syncthing/app_versions.json index 2a56ace35c..2b1d2c8148 100644 --- a/trains/stable/syncthing/app_versions.json +++ b/trains/stable/syncthing/app_versions.json @@ -1,15 +1,15 @@ { - "1.0.27": { + "1.0.28": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/stable/syncthing/1.0.27", - "last_update": "2024-10-16 17:52:00", + "location": "/__w/apps/apps/trains/stable/syncthing/1.0.28", + "last_update": "2024-10-16 19:06:56", "required_features": [], - "human_version": "1.27.12_1.0.27", - "version": "1.0.27", + "human_version": "1.28.0_1.0.28", + "version": "1.0.28", "app_metadata": { - "app_version": "1.27.12", + "app_version": "1.28.0", "capabilities": [ { "description": "Syncthing is able to chown files.", @@ -88,7 +88,7 @@ ], "title": "Syncthing", "train": "stable", - "version": "1.0.27" + "version": "1.0.28" }, "schema": { "groups": [ diff --git a/trains/stable/wg-easy/app_versions.json b/trains/stable/wg-easy/app_versions.json index 56be60cdcb..1adf83f36c 100644 --- a/trains/stable/wg-easy/app_versions.json +++ b/trains/stable/wg-easy/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/stable/wg-easy/1.0.20", - "last_update": "2024-10-16 17:52:00", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "14_1.0.20", "version": "1.0.20", diff --git a/trains/test/nginx/app_versions.json b/trains/test/nginx/app_versions.json index 439f24ad3f..90f28b8519 100644 --- a/trains/test/nginx/app_versions.json +++ b/trains/test/nginx/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/test/nginx/1.0.6", - "last_update": "2024-10-16 17:50:40", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "v1_1.0.6", "version": "1.0.6", @@ -107,7 +107,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/test/nginx/1.0.5", - "last_update": "2024-10-16 17:50:40", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "v1_1.0.5", "version": "1.0.5", @@ -200,7 +200,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/test/nginx/1.0.4", - "last_update": "2024-10-16 17:50:40", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "v1_1.0.4", "version": "1.0.4", @@ -293,7 +293,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/test/nginx/1.0.3", - "last_update": "2024-10-16 17:50:40", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "v1_1.0.3", "version": "1.0.3", diff --git a/trains/test/other-nginx/app_versions.json b/trains/test/other-nginx/app_versions.json index 95b9dc6234..f9fdbc1ffe 100644 --- a/trains/test/other-nginx/app_versions.json +++ b/trains/test/other-nginx/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/test/other-nginx/1.0.1", - "last_update": "2024-10-16 17:50:40", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "v1_1.0.1", "version": "1.0.1", @@ -97,7 +97,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/test/other-nginx/1.0.0", - "last_update": "2024-10-16 17:50:40", + "last_update": "2024-10-16 19:05:21", "required_features": [], "human_version": "v1_1.0.0", "version": "1.0.0", From 461dd45d05af407db7984d9c09626dc7bb9e53d2 Mon Sep 17 00:00:00 2001 From: truenasbot <113129203+truenasbot@users.noreply.github.com> Date: Wed, 16 Oct 2024 15:09:42 -0400 Subject: [PATCH 07/13] chore(deps): update fallenbagel/jellyseerr docker tag to v2 (#666) Co-authored-by: bugclerk --- ix-dev/community/jellyseerr/app.yaml | 2 +- ix-dev/community/jellyseerr/ix_values.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ix-dev/community/jellyseerr/app.yaml b/ix-dev/community/jellyseerr/app.yaml index cf47b1f917..a525805d22 100644 --- a/ix-dev/community/jellyseerr/app.yaml +++ b/ix-dev/community/jellyseerr/app.yaml @@ -1,4 +1,4 @@ -app_version: 1.9.2 +app_version: 2.0.0 capabilities: [] categories: - media diff --git a/ix-dev/community/jellyseerr/ix_values.yaml b/ix-dev/community/jellyseerr/ix_values.yaml index 8096dc9fc4..fe9a5fc7c0 100644 --- a/ix-dev/community/jellyseerr/ix_values.yaml +++ b/ix-dev/community/jellyseerr/ix_values.yaml @@ -1,7 +1,7 @@ images: image: repository: fallenbagel/jellyseerr - tag: 1.9.2 + tag: 2.0.0 consts: perms_container_name: permissions From 46833812cdaee9922f21e938253d7ba2580d9864 Mon Sep 17 00:00:00 2001 From: truenasbot <113129203+truenasbot@users.noreply.github.com> Date: Wed, 16 Oct 2024 15:36:28 -0400 Subject: [PATCH 08/13] chore(deps): update updates-patch-minor (#668) Co-authored-by: bugclerk --- ix-dev/community/chia/app.yaml | 4 ++-- ix-dev/community/chia/ix_values.yaml | 2 +- ix-dev/community/immich/app.yaml | 4 ++-- ix-dev/community/immich/ix_values.yaml | 8 ++++---- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/ix-dev/community/chia/app.yaml b/ix-dev/community/chia/app.yaml index fd80fa31d7..78b763a9a2 100644 --- a/ix-dev/community/chia/app.yaml +++ b/ix-dev/community/chia/app.yaml @@ -1,4 +1,4 @@ -app_version: 2.4.3 +app_version: 2.4.4 capabilities: [] categories: - financial @@ -30,4 +30,4 @@ sources: - https://www.chia.net/ title: Chia train: community -version: 1.0.15 +version: 1.0.16 diff --git a/ix-dev/community/chia/ix_values.yaml b/ix-dev/community/chia/ix_values.yaml index 2b82ec2d50..da6f2092b6 100644 --- a/ix-dev/community/chia/ix_values.yaml +++ b/ix-dev/community/chia/ix_values.yaml @@ -1,7 +1,7 @@ images: image: repository: ghcr.io/chia-network/chia - tag: 2.4.3 + tag: 2.4.4 consts: chia_container_name: chia diff --git a/ix-dev/community/immich/app.yaml b/ix-dev/community/immich/app.yaml index f296ae9a06..1111ab9879 100644 --- a/ix-dev/community/immich/app.yaml +++ b/ix-dev/community/immich/app.yaml @@ -1,4 +1,4 @@ -app_version: v1.118.1 +app_version: v1.118.2 capabilities: - description: Immich Proxy is able to chown files. name: CHOWN @@ -45,4 +45,4 @@ sources: - https://github.com/immich-app/immich title: Immich train: community -version: 1.6.20 +version: 1.6.21 diff --git a/ix-dev/community/immich/ix_values.yaml b/ix-dev/community/immich/ix_values.yaml index 5ef22a48c0..63b00d5578 100644 --- a/ix-dev/community/immich/ix_values.yaml +++ b/ix-dev/community/immich/ix_values.yaml @@ -1,16 +1,16 @@ images: image: repository: altran1502/immich-server - tag: v1.118.1 + tag: v1.118.2 ml_image: repository: altran1502/immich-machine-learning - tag: v1.118.1 + tag: v1.118.2 ml_cuda_image: repository: altran1502/immich-machine-learning - tag: v1.118.1-cuda + tag: v1.118.2-cuda ml_openvino_image: repository: altran1502/immich-machine-learning - tag: v1.118.1-openvino + tag: v1.118.2-openvino pgvecto_image: repository: tensorchord/pgvecto-rs tag: pg15-v0.2.0 From 15032cd1951609873e1e688f707c71de8e960091 Mon Sep 17 00:00:00 2001 From: sonicaj Date: Wed, 16 Oct 2024 19:37:58 +0000 Subject: [PATCH 09/13] Publish new changes in catalog [skip ci] --- trains/community/chia/{1.0.15 => 1.0.16}/README.md | 0 trains/community/chia/{1.0.15 => 1.0.16}/app.yaml | 4 ++-- trains/community/chia/{1.0.15 => 1.0.16}/ix_values.yaml | 2 +- .../{1.0.15 => 1.0.16}/migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migrations/migration_helpers/dns_config.py | 0 .../migrations/migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 trains/community/chia/{1.0.15 => 1.0.16}/questions.yaml | 0 .../chia/{1.0.15 => 1.0.16}/templates/docker-compose.yaml | 0 .../templates/library/base_v1_1_4/__init__.py | 0 .../templates/library/base_v1_1_4/environment.py | 0 .../templates/library/base_v1_1_4/healthchecks.py | 0 .../templates/library/base_v1_1_4/mariadb.py | 0 .../templates/library/base_v1_1_4/metadata.py | 0 .../templates/library/base_v1_1_4/network.py | 0 .../templates/library/base_v1_1_4/permissions.py | 0 .../templates/library/base_v1_1_4/ports.py | 0 .../templates/library/base_v1_1_4/postgres.py | 0 .../templates/library/base_v1_1_4/redis.py | 0 .../templates/library/base_v1_1_4/resources.py | 0 .../templates/library/base_v1_1_4/security.py | 0 .../templates/library/base_v1_1_4/storage.py | 0 .../templates/library/base_v1_1_4/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../templates/test_values/farmer-values.yaml | 0 trains/community/immich/{1.6.20 => 1.6.21}/README.md | 0 trains/community/immich/{1.6.20 => 1.6.21}/app.yaml | 4 ++-- trains/community/immich/{1.6.20 => 1.6.21}/ix_values.yaml | 8 ++++---- .../{1.6.20 => 1.6.21}/migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../migrations/migration_helpers/cpu.py | 0 .../migrations/migration_helpers/dns_config.py | 0 .../migrations/migration_helpers/kubernetes_secrets.py | 0 .../migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 trains/community/immich/{1.6.20 => 1.6.21}/questions.yaml | 0 .../{1.6.20 => 1.6.21}/templates/docker-compose.yaml | 0 .../templates/library/base_v1_1_4/__init__.py | 0 .../templates/library/base_v1_1_4/environment.py | 0 .../templates/library/base_v1_1_4/healthchecks.py | 0 .../templates/library/base_v1_1_4/mariadb.py | 0 .../templates/library/base_v1_1_4/metadata.py | 0 .../templates/library/base_v1_1_4/network.py | 0 .../templates/library/base_v1_1_4/permissions.py | 0 .../templates/library/base_v1_1_4/ports.py | 0 .../templates/library/base_v1_1_4/postgres.py | 0 .../templates/library/base_v1_1_4/redis.py | 0 .../templates/library/base_v1_1_4/resources.py | 0 .../templates/library/base_v1_1_4/security.py | 0 .../templates/library/base_v1_1_4/storage.py | 0 .../templates/library/base_v1_1_4/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 57 files changed, 9 insertions(+), 9 deletions(-) rename trains/community/chia/{1.0.15 => 1.0.16}/README.md (100%) rename trains/community/chia/{1.0.15 => 1.0.16}/app.yaml (95%) rename trains/community/chia/{1.0.15 => 1.0.16}/ix_values.yaml (92%) rename trains/community/chia/{1.0.15 => 1.0.16}/migrations/migrate_from_kubernetes (100%) rename trains/community/chia/{1.0.15 => 1.0.16}/migrations/migration_helpers/__init__.py (100%) rename trains/community/chia/{1.0.15 => 1.0.16}/migrations/migration_helpers/cpu.py (100%) rename trains/community/chia/{1.0.15 => 1.0.16}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/chia/{1.0.15 => 1.0.16}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/chia/{1.0.15 => 1.0.16}/migrations/migration_helpers/memory.py (100%) rename trains/community/chia/{1.0.15 => 1.0.16}/migrations/migration_helpers/resources.py (100%) rename trains/community/chia/{1.0.15 => 1.0.16}/migrations/migration_helpers/storage.py (100%) rename trains/community/chia/{1.0.15 => 1.0.16}/questions.yaml (100%) rename trains/community/chia/{1.0.15 => 1.0.16}/templates/docker-compose.yaml (100%) rename trains/community/chia/{1.0.15 => 1.0.16}/templates/library/base_v1_1_4/__init__.py (100%) rename trains/community/chia/{1.0.15 => 1.0.16}/templates/library/base_v1_1_4/environment.py (100%) rename trains/community/chia/{1.0.15 => 1.0.16}/templates/library/base_v1_1_4/healthchecks.py (100%) rename trains/community/chia/{1.0.15 => 1.0.16}/templates/library/base_v1_1_4/mariadb.py (100%) rename trains/community/chia/{1.0.15 => 1.0.16}/templates/library/base_v1_1_4/metadata.py (100%) rename trains/community/chia/{1.0.15 => 1.0.16}/templates/library/base_v1_1_4/network.py (100%) rename trains/community/chia/{1.0.15 => 1.0.16}/templates/library/base_v1_1_4/permissions.py (100%) rename trains/community/chia/{1.0.15 => 1.0.16}/templates/library/base_v1_1_4/ports.py (100%) rename trains/community/chia/{1.0.15 => 1.0.16}/templates/library/base_v1_1_4/postgres.py (100%) rename trains/community/chia/{1.0.15 => 1.0.16}/templates/library/base_v1_1_4/redis.py (100%) rename trains/community/chia/{1.0.15 => 1.0.16}/templates/library/base_v1_1_4/resources.py (100%) rename trains/community/chia/{1.0.15 => 1.0.16}/templates/library/base_v1_1_4/security.py (100%) rename trains/community/chia/{1.0.15 => 1.0.16}/templates/library/base_v1_1_4/storage.py (100%) rename trains/community/chia/{1.0.15 => 1.0.16}/templates/library/base_v1_1_4/utils.py (100%) rename trains/community/chia/{1.0.15 => 1.0.16}/templates/test_values/basic-values.yaml (100%) rename trains/community/chia/{1.0.15 => 1.0.16}/templates/test_values/farmer-values.yaml (100%) rename trains/community/immich/{1.6.20 => 1.6.21}/README.md (100%) rename trains/community/immich/{1.6.20 => 1.6.21}/app.yaml (96%) rename trains/community/immich/{1.6.20 => 1.6.21}/ix_values.yaml (89%) rename trains/community/immich/{1.6.20 => 1.6.21}/migrations/migrate_from_kubernetes (100%) rename trains/community/immich/{1.6.20 => 1.6.21}/migrations/migration_helpers/__init__.py (100%) rename trains/community/immich/{1.6.20 => 1.6.21}/migrations/migration_helpers/cpu.py (100%) rename trains/community/immich/{1.6.20 => 1.6.21}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/immich/{1.6.20 => 1.6.21}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/immich/{1.6.20 => 1.6.21}/migrations/migration_helpers/memory.py (100%) rename trains/community/immich/{1.6.20 => 1.6.21}/migrations/migration_helpers/resources.py (100%) rename trains/community/immich/{1.6.20 => 1.6.21}/migrations/migration_helpers/storage.py (100%) rename trains/community/immich/{1.6.20 => 1.6.21}/questions.yaml (100%) rename trains/community/immich/{1.6.20 => 1.6.21}/templates/docker-compose.yaml (100%) rename trains/community/immich/{1.6.20 => 1.6.21}/templates/library/base_v1_1_4/__init__.py (100%) rename trains/community/immich/{1.6.20 => 1.6.21}/templates/library/base_v1_1_4/environment.py (100%) rename trains/community/immich/{1.6.20 => 1.6.21}/templates/library/base_v1_1_4/healthchecks.py (100%) rename trains/community/immich/{1.6.20 => 1.6.21}/templates/library/base_v1_1_4/mariadb.py (100%) rename trains/community/immich/{1.6.20 => 1.6.21}/templates/library/base_v1_1_4/metadata.py (100%) rename trains/community/immich/{1.6.20 => 1.6.21}/templates/library/base_v1_1_4/network.py (100%) rename trains/community/immich/{1.6.20 => 1.6.21}/templates/library/base_v1_1_4/permissions.py (100%) rename trains/community/immich/{1.6.20 => 1.6.21}/templates/library/base_v1_1_4/ports.py (100%) rename trains/community/immich/{1.6.20 => 1.6.21}/templates/library/base_v1_1_4/postgres.py (100%) rename trains/community/immich/{1.6.20 => 1.6.21}/templates/library/base_v1_1_4/redis.py (100%) rename trains/community/immich/{1.6.20 => 1.6.21}/templates/library/base_v1_1_4/resources.py (100%) rename trains/community/immich/{1.6.20 => 1.6.21}/templates/library/base_v1_1_4/security.py (100%) rename trains/community/immich/{1.6.20 => 1.6.21}/templates/library/base_v1_1_4/storage.py (100%) rename trains/community/immich/{1.6.20 => 1.6.21}/templates/library/base_v1_1_4/utils.py (100%) rename trains/community/immich/{1.6.20 => 1.6.21}/templates/test_values/basic-values.yaml (100%) diff --git a/trains/community/chia/1.0.15/README.md b/trains/community/chia/1.0.16/README.md similarity index 100% rename from trains/community/chia/1.0.15/README.md rename to trains/community/chia/1.0.16/README.md diff --git a/trains/community/chia/1.0.15/app.yaml b/trains/community/chia/1.0.16/app.yaml similarity index 95% rename from trains/community/chia/1.0.15/app.yaml rename to trains/community/chia/1.0.16/app.yaml index fd80fa31d7..78b763a9a2 100644 --- a/trains/community/chia/1.0.15/app.yaml +++ b/trains/community/chia/1.0.16/app.yaml @@ -1,4 +1,4 @@ -app_version: 2.4.3 +app_version: 2.4.4 capabilities: [] categories: - financial @@ -30,4 +30,4 @@ sources: - https://www.chia.net/ title: Chia train: community -version: 1.0.15 +version: 1.0.16 diff --git a/trains/community/chia/1.0.15/ix_values.yaml b/trains/community/chia/1.0.16/ix_values.yaml similarity index 92% rename from trains/community/chia/1.0.15/ix_values.yaml rename to trains/community/chia/1.0.16/ix_values.yaml index 2b82ec2d50..da6f2092b6 100644 --- a/trains/community/chia/1.0.15/ix_values.yaml +++ b/trains/community/chia/1.0.16/ix_values.yaml @@ -1,7 +1,7 @@ images: image: repository: ghcr.io/chia-network/chia - tag: 2.4.3 + tag: 2.4.4 consts: chia_container_name: chia diff --git a/trains/community/chia/1.0.15/migrations/migrate_from_kubernetes b/trains/community/chia/1.0.16/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/chia/1.0.15/migrations/migrate_from_kubernetes rename to trains/community/chia/1.0.16/migrations/migrate_from_kubernetes diff --git a/trains/community/chia/1.0.15/migrations/migration_helpers/__init__.py b/trains/community/chia/1.0.16/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/chia/1.0.15/migrations/migration_helpers/__init__.py rename to trains/community/chia/1.0.16/migrations/migration_helpers/__init__.py diff --git a/trains/community/chia/1.0.15/migrations/migration_helpers/cpu.py b/trains/community/chia/1.0.16/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/chia/1.0.15/migrations/migration_helpers/cpu.py rename to trains/community/chia/1.0.16/migrations/migration_helpers/cpu.py diff --git a/trains/community/chia/1.0.15/migrations/migration_helpers/dns_config.py b/trains/community/chia/1.0.16/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/chia/1.0.15/migrations/migration_helpers/dns_config.py rename to trains/community/chia/1.0.16/migrations/migration_helpers/dns_config.py diff --git a/trains/community/chia/1.0.15/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/chia/1.0.16/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/chia/1.0.15/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/chia/1.0.16/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/chia/1.0.15/migrations/migration_helpers/memory.py b/trains/community/chia/1.0.16/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/chia/1.0.15/migrations/migration_helpers/memory.py rename to trains/community/chia/1.0.16/migrations/migration_helpers/memory.py diff --git a/trains/community/chia/1.0.15/migrations/migration_helpers/resources.py b/trains/community/chia/1.0.16/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/chia/1.0.15/migrations/migration_helpers/resources.py rename to trains/community/chia/1.0.16/migrations/migration_helpers/resources.py diff --git a/trains/community/chia/1.0.15/migrations/migration_helpers/storage.py b/trains/community/chia/1.0.16/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/chia/1.0.15/migrations/migration_helpers/storage.py rename to trains/community/chia/1.0.16/migrations/migration_helpers/storage.py diff --git a/trains/community/chia/1.0.15/questions.yaml b/trains/community/chia/1.0.16/questions.yaml similarity index 100% rename from trains/community/chia/1.0.15/questions.yaml rename to trains/community/chia/1.0.16/questions.yaml diff --git a/trains/community/chia/1.0.15/templates/docker-compose.yaml b/trains/community/chia/1.0.16/templates/docker-compose.yaml similarity index 100% rename from trains/community/chia/1.0.15/templates/docker-compose.yaml rename to trains/community/chia/1.0.16/templates/docker-compose.yaml diff --git a/trains/community/chia/1.0.15/templates/library/base_v1_1_4/__init__.py b/trains/community/chia/1.0.16/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/chia/1.0.15/templates/library/base_v1_1_4/__init__.py rename to trains/community/chia/1.0.16/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/chia/1.0.15/templates/library/base_v1_1_4/environment.py b/trains/community/chia/1.0.16/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/chia/1.0.15/templates/library/base_v1_1_4/environment.py rename to trains/community/chia/1.0.16/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/chia/1.0.15/templates/library/base_v1_1_4/healthchecks.py b/trains/community/chia/1.0.16/templates/library/base_v1_1_4/healthchecks.py similarity index 100% rename from trains/community/chia/1.0.15/templates/library/base_v1_1_4/healthchecks.py rename to trains/community/chia/1.0.16/templates/library/base_v1_1_4/healthchecks.py diff --git a/trains/community/chia/1.0.15/templates/library/base_v1_1_4/mariadb.py b/trains/community/chia/1.0.16/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/chia/1.0.15/templates/library/base_v1_1_4/mariadb.py rename to trains/community/chia/1.0.16/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/chia/1.0.15/templates/library/base_v1_1_4/metadata.py b/trains/community/chia/1.0.16/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/chia/1.0.15/templates/library/base_v1_1_4/metadata.py rename to trains/community/chia/1.0.16/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/chia/1.0.15/templates/library/base_v1_1_4/network.py b/trains/community/chia/1.0.16/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/chia/1.0.15/templates/library/base_v1_1_4/network.py rename to trains/community/chia/1.0.16/templates/library/base_v1_1_4/network.py diff --git a/trains/community/chia/1.0.15/templates/library/base_v1_1_4/permissions.py b/trains/community/chia/1.0.16/templates/library/base_v1_1_4/permissions.py similarity index 100% rename from trains/community/chia/1.0.15/templates/library/base_v1_1_4/permissions.py rename to trains/community/chia/1.0.16/templates/library/base_v1_1_4/permissions.py diff --git a/trains/community/chia/1.0.15/templates/library/base_v1_1_4/ports.py b/trains/community/chia/1.0.16/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/chia/1.0.15/templates/library/base_v1_1_4/ports.py rename to trains/community/chia/1.0.16/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/chia/1.0.15/templates/library/base_v1_1_4/postgres.py b/trains/community/chia/1.0.16/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/chia/1.0.15/templates/library/base_v1_1_4/postgres.py rename to trains/community/chia/1.0.16/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/chia/1.0.15/templates/library/base_v1_1_4/redis.py b/trains/community/chia/1.0.16/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/chia/1.0.15/templates/library/base_v1_1_4/redis.py rename to trains/community/chia/1.0.16/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/chia/1.0.15/templates/library/base_v1_1_4/resources.py b/trains/community/chia/1.0.16/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/chia/1.0.15/templates/library/base_v1_1_4/resources.py rename to trains/community/chia/1.0.16/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/chia/1.0.15/templates/library/base_v1_1_4/security.py b/trains/community/chia/1.0.16/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/chia/1.0.15/templates/library/base_v1_1_4/security.py rename to trains/community/chia/1.0.16/templates/library/base_v1_1_4/security.py diff --git a/trains/community/chia/1.0.15/templates/library/base_v1_1_4/storage.py b/trains/community/chia/1.0.16/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/chia/1.0.15/templates/library/base_v1_1_4/storage.py rename to trains/community/chia/1.0.16/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/chia/1.0.15/templates/library/base_v1_1_4/utils.py b/trains/community/chia/1.0.16/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/chia/1.0.15/templates/library/base_v1_1_4/utils.py rename to trains/community/chia/1.0.16/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/chia/1.0.15/templates/test_values/basic-values.yaml b/trains/community/chia/1.0.16/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/chia/1.0.15/templates/test_values/basic-values.yaml rename to trains/community/chia/1.0.16/templates/test_values/basic-values.yaml diff --git a/trains/community/chia/1.0.15/templates/test_values/farmer-values.yaml b/trains/community/chia/1.0.16/templates/test_values/farmer-values.yaml similarity index 100% rename from trains/community/chia/1.0.15/templates/test_values/farmer-values.yaml rename to trains/community/chia/1.0.16/templates/test_values/farmer-values.yaml diff --git a/trains/community/immich/1.6.20/README.md b/trains/community/immich/1.6.21/README.md similarity index 100% rename from trains/community/immich/1.6.20/README.md rename to trains/community/immich/1.6.21/README.md diff --git a/trains/community/immich/1.6.20/app.yaml b/trains/community/immich/1.6.21/app.yaml similarity index 96% rename from trains/community/immich/1.6.20/app.yaml rename to trains/community/immich/1.6.21/app.yaml index f296ae9a06..1111ab9879 100644 --- a/trains/community/immich/1.6.20/app.yaml +++ b/trains/community/immich/1.6.21/app.yaml @@ -1,4 +1,4 @@ -app_version: v1.118.1 +app_version: v1.118.2 capabilities: - description: Immich Proxy is able to chown files. name: CHOWN @@ -45,4 +45,4 @@ sources: - https://github.com/immich-app/immich title: Immich train: community -version: 1.6.20 +version: 1.6.21 diff --git a/trains/community/immich/1.6.20/ix_values.yaml b/trains/community/immich/1.6.21/ix_values.yaml similarity index 89% rename from trains/community/immich/1.6.20/ix_values.yaml rename to trains/community/immich/1.6.21/ix_values.yaml index 5ef22a48c0..63b00d5578 100644 --- a/trains/community/immich/1.6.20/ix_values.yaml +++ b/trains/community/immich/1.6.21/ix_values.yaml @@ -1,16 +1,16 @@ images: image: repository: altran1502/immich-server - tag: v1.118.1 + tag: v1.118.2 ml_image: repository: altran1502/immich-machine-learning - tag: v1.118.1 + tag: v1.118.2 ml_cuda_image: repository: altran1502/immich-machine-learning - tag: v1.118.1-cuda + tag: v1.118.2-cuda ml_openvino_image: repository: altran1502/immich-machine-learning - tag: v1.118.1-openvino + tag: v1.118.2-openvino pgvecto_image: repository: tensorchord/pgvecto-rs tag: pg15-v0.2.0 diff --git a/trains/community/immich/1.6.20/migrations/migrate_from_kubernetes b/trains/community/immich/1.6.21/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/immich/1.6.20/migrations/migrate_from_kubernetes rename to trains/community/immich/1.6.21/migrations/migrate_from_kubernetes diff --git a/trains/community/immich/1.6.20/migrations/migration_helpers/__init__.py b/trains/community/immich/1.6.21/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/immich/1.6.20/migrations/migration_helpers/__init__.py rename to trains/community/immich/1.6.21/migrations/migration_helpers/__init__.py diff --git a/trains/community/immich/1.6.20/migrations/migration_helpers/cpu.py b/trains/community/immich/1.6.21/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/immich/1.6.20/migrations/migration_helpers/cpu.py rename to trains/community/immich/1.6.21/migrations/migration_helpers/cpu.py diff --git a/trains/community/immich/1.6.20/migrations/migration_helpers/dns_config.py b/trains/community/immich/1.6.21/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/immich/1.6.20/migrations/migration_helpers/dns_config.py rename to trains/community/immich/1.6.21/migrations/migration_helpers/dns_config.py diff --git a/trains/community/immich/1.6.20/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/immich/1.6.21/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/immich/1.6.20/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/immich/1.6.21/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/immich/1.6.20/migrations/migration_helpers/memory.py b/trains/community/immich/1.6.21/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/immich/1.6.20/migrations/migration_helpers/memory.py rename to trains/community/immich/1.6.21/migrations/migration_helpers/memory.py diff --git a/trains/community/immich/1.6.20/migrations/migration_helpers/resources.py b/trains/community/immich/1.6.21/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/immich/1.6.20/migrations/migration_helpers/resources.py rename to trains/community/immich/1.6.21/migrations/migration_helpers/resources.py diff --git a/trains/community/immich/1.6.20/migrations/migration_helpers/storage.py b/trains/community/immich/1.6.21/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/immich/1.6.20/migrations/migration_helpers/storage.py rename to trains/community/immich/1.6.21/migrations/migration_helpers/storage.py diff --git a/trains/community/immich/1.6.20/questions.yaml b/trains/community/immich/1.6.21/questions.yaml similarity index 100% rename from trains/community/immich/1.6.20/questions.yaml rename to trains/community/immich/1.6.21/questions.yaml diff --git a/trains/community/immich/1.6.20/templates/docker-compose.yaml b/trains/community/immich/1.6.21/templates/docker-compose.yaml similarity index 100% rename from trains/community/immich/1.6.20/templates/docker-compose.yaml rename to trains/community/immich/1.6.21/templates/docker-compose.yaml diff --git a/trains/community/immich/1.6.20/templates/library/base_v1_1_4/__init__.py b/trains/community/immich/1.6.21/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/immich/1.6.20/templates/library/base_v1_1_4/__init__.py rename to trains/community/immich/1.6.21/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/immich/1.6.20/templates/library/base_v1_1_4/environment.py b/trains/community/immich/1.6.21/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/immich/1.6.20/templates/library/base_v1_1_4/environment.py rename to trains/community/immich/1.6.21/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/immich/1.6.20/templates/library/base_v1_1_4/healthchecks.py b/trains/community/immich/1.6.21/templates/library/base_v1_1_4/healthchecks.py similarity index 100% rename from trains/community/immich/1.6.20/templates/library/base_v1_1_4/healthchecks.py rename to trains/community/immich/1.6.21/templates/library/base_v1_1_4/healthchecks.py diff --git a/trains/community/immich/1.6.20/templates/library/base_v1_1_4/mariadb.py b/trains/community/immich/1.6.21/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/immich/1.6.20/templates/library/base_v1_1_4/mariadb.py rename to trains/community/immich/1.6.21/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/immich/1.6.20/templates/library/base_v1_1_4/metadata.py b/trains/community/immich/1.6.21/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/immich/1.6.20/templates/library/base_v1_1_4/metadata.py rename to trains/community/immich/1.6.21/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/immich/1.6.20/templates/library/base_v1_1_4/network.py b/trains/community/immich/1.6.21/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/immich/1.6.20/templates/library/base_v1_1_4/network.py rename to trains/community/immich/1.6.21/templates/library/base_v1_1_4/network.py diff --git a/trains/community/immich/1.6.20/templates/library/base_v1_1_4/permissions.py b/trains/community/immich/1.6.21/templates/library/base_v1_1_4/permissions.py similarity index 100% rename from trains/community/immich/1.6.20/templates/library/base_v1_1_4/permissions.py rename to trains/community/immich/1.6.21/templates/library/base_v1_1_4/permissions.py diff --git a/trains/community/immich/1.6.20/templates/library/base_v1_1_4/ports.py b/trains/community/immich/1.6.21/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/immich/1.6.20/templates/library/base_v1_1_4/ports.py rename to trains/community/immich/1.6.21/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/immich/1.6.20/templates/library/base_v1_1_4/postgres.py b/trains/community/immich/1.6.21/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/immich/1.6.20/templates/library/base_v1_1_4/postgres.py rename to trains/community/immich/1.6.21/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/immich/1.6.20/templates/library/base_v1_1_4/redis.py b/trains/community/immich/1.6.21/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/immich/1.6.20/templates/library/base_v1_1_4/redis.py rename to trains/community/immich/1.6.21/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/immich/1.6.20/templates/library/base_v1_1_4/resources.py b/trains/community/immich/1.6.21/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/immich/1.6.20/templates/library/base_v1_1_4/resources.py rename to trains/community/immich/1.6.21/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/immich/1.6.20/templates/library/base_v1_1_4/security.py b/trains/community/immich/1.6.21/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/immich/1.6.20/templates/library/base_v1_1_4/security.py rename to trains/community/immich/1.6.21/templates/library/base_v1_1_4/security.py diff --git a/trains/community/immich/1.6.20/templates/library/base_v1_1_4/storage.py b/trains/community/immich/1.6.21/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/immich/1.6.20/templates/library/base_v1_1_4/storage.py rename to trains/community/immich/1.6.21/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/immich/1.6.20/templates/library/base_v1_1_4/utils.py b/trains/community/immich/1.6.21/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/immich/1.6.20/templates/library/base_v1_1_4/utils.py rename to trains/community/immich/1.6.21/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/immich/1.6.20/templates/test_values/basic-values.yaml b/trains/community/immich/1.6.21/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/immich/1.6.20/templates/test_values/basic-values.yaml rename to trains/community/immich/1.6.21/templates/test_values/basic-values.yaml From 6af664299d0a4b9e1ca5c9b52211c237557e8d55 Mon Sep 17 00:00:00 2001 From: sonicaj Date: Wed, 16 Oct 2024 19:38:21 +0000 Subject: [PATCH 10/13] Update catalog changes [skip ci] --- catalog.json | 240 +++++++++--------- .../community/actual-budget/app_versions.json | 2 +- .../community/adguard-home/app_versions.json | 2 +- .../audiobookshelf/app_versions.json | 2 +- trains/community/autobrr/app_versions.json | 2 +- trains/community/bazarr/app_versions.json | 2 +- .../community/briefkasten/app_versions.json | 2 +- trains/community/castopod/app_versions.json | 2 +- trains/community/chia/app_versions.json | 14 +- trains/community/clamav/app_versions.json | 2 +- .../community/cloudflared/app_versions.json | 2 +- trains/community/dashy/app_versions.json | 2 +- .../community/ddns-updater/app_versions.json | 2 +- trains/community/deluge/app_versions.json | 2 +- .../community/distribution/app_versions.json | 2 +- trains/community/dockge/app_versions.json | 2 +- trains/community/drawio/app_versions.json | 2 +- .../community/filebrowser/app_versions.json | 2 +- .../community/firefly-iii/app_versions.json | 2 +- trains/community/flame/app_versions.json | 2 +- trains/community/freshrss/app_versions.json | 2 +- trains/community/frigate/app_versions.json | 2 +- trains/community/fscrawler/app_versions.json | 2 +- trains/community/gitea/app_versions.json | 2 +- trains/community/grafana/app_versions.json | 2 +- trains/community/handbrake/app_versions.json | 2 +- trains/community/homarr/app_versions.json | 2 +- trains/community/homepage/app_versions.json | 2 +- trains/community/homer/app_versions.json | 2 +- trains/community/immich/app_versions.json | 14 +- trains/community/invidious/app_versions.json | 2 +- trains/community/ipfs/app_versions.json | 2 +- trains/community/jellyfin/app_versions.json | 2 +- trains/community/jellyseerr/app_versions.json | 2 +- trains/community/jenkins/app_versions.json | 2 +- trains/community/joplin/app_versions.json | 2 +- trains/community/kapowarr/app_versions.json | 2 +- trains/community/kavita/app_versions.json | 2 +- trains/community/komga/app_versions.json | 2 +- trains/community/lidarr/app_versions.json | 2 +- trains/community/linkding/app_versions.json | 2 +- trains/community/listmonk/app_versions.json | 2 +- trains/community/logseq/app_versions.json | 2 +- trains/community/mealie/app_versions.json | 2 +- trains/community/metube/app_versions.json | 2 +- trains/community/minecraft/app_versions.json | 2 +- trains/community/mineos/app_versions.json | 2 +- trains/community/mumble/app_versions.json | 2 +- trains/community/n8n/app_versions.json | 2 +- trains/community/navidrome/app_versions.json | 2 +- trains/community/netbootxyz/app_versions.json | 2 +- .../nginx-proxy-manager/app_versions.json | 2 +- trains/community/node-red/app_versions.json | 2 +- trains/community/odoo/app_versions.json | 2 +- .../omada-controller/app_versions.json | 2 +- trains/community/organizr/app_versions.json | 2 +- trains/community/overseerr/app_versions.json | 2 +- trains/community/palworld/app_versions.json | 2 +- .../community/paperless-ngx/app_versions.json | 2 +- trains/community/passbolt/app_versions.json | 2 +- trains/community/pgadmin/app_versions.json | 2 +- trains/community/pigallery2/app_versions.json | 2 +- trains/community/piwigo/app_versions.json | 2 +- trains/community/planka/app_versions.json | 2 +- .../plex-auto-languages/app_versions.json | 2 +- trains/community/portainer/app_versions.json | 2 +- trains/community/prowlarr/app_versions.json | 2 +- .../community/qbittorrent/app_versions.json | 2 +- trains/community/radarr/app_versions.json | 2 +- trains/community/readarr/app_versions.json | 2 +- trains/community/recyclarr/app_versions.json | 2 +- trains/community/redis/app_versions.json | 2 +- trains/community/roundcube/app_versions.json | 2 +- trains/community/rsyncd/app_versions.json | 2 +- trains/community/rust-desk/app_versions.json | 2 +- trains/community/sabnzbd/app_versions.json | 2 +- trains/community/searxng/app_versions.json | 2 +- trains/community/sftpgo/app_versions.json | 2 +- trains/community/sonarr/app_versions.json | 2 +- trains/community/tailscale/app_versions.json | 2 +- trains/community/tautulli/app_versions.json | 2 +- trains/community/tdarr/app_versions.json | 2 +- trains/community/terraria/app_versions.json | 2 +- trains/community/tftpd-hpa/app_versions.json | 2 +- .../tiny-media-manager/app_versions.json | 2 +- .../community/transmission/app_versions.json | 2 +- .../twofactor-auth/app_versions.json | 2 +- .../unifi-controller/app_versions.json | 2 +- .../unifi-protect-backup/app_versions.json | 2 +- .../community/vaultwarden/app_versions.json | 2 +- trains/community/vikunja/app_versions.json | 2 +- trains/community/webdav/app_versions.json | 2 +- trains/community/whoogle/app_versions.json | 2 +- trains/community/wordpress/app_versions.json | 2 +- trains/community/zerotier/app_versions.json | 2 +- trains/enterprise/minio/app_versions.json | 2 +- trains/enterprise/syncthing/app_versions.json | 2 +- trains/stable/collabora/app_versions.json | 2 +- trains/stable/diskoverdata/app_versions.json | 2 +- .../stable/elastic-search/app_versions.json | 2 +- trains/stable/emby/app_versions.json | 2 +- .../stable/home-assistant/app_versions.json | 2 +- trains/stable/ix-app/app_versions.json | 2 +- trains/stable/minio/app_versions.json | 2 +- trains/stable/netdata/app_versions.json | 2 +- trains/stable/nextcloud/app_versions.json | 2 +- trains/stable/photoprism/app_versions.json | 2 +- trains/stable/pihole/app_versions.json | 2 +- trains/stable/plex/app_versions.json | 2 +- trains/stable/prometheus/app_versions.json | 2 +- trains/stable/storj/app_versions.json | 2 +- trains/stable/syncthing/app_versions.json | 2 +- trains/stable/wg-easy/app_versions.json | 2 +- trains/test/nginx/app_versions.json | 8 +- trains/test/other-nginx/app_versions.json | 4 +- 115 files changed, 250 insertions(+), 250 deletions(-) diff --git a/catalog.json b/catalog.json index 6debd433db..38196039f2 100644 --- a/catalog.json +++ b/catalog.json @@ -13,7 +13,7 @@ "latest_version": "1.1.15", "latest_app_version": "24.04.8.2.1", "latest_human_version": "24.04.8.2.1_1.1.15", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "collabora", "recommended": false, "title": "Collabora", @@ -102,7 +102,7 @@ "latest_version": "1.0.23", "latest_app_version": "1.40.2.8395-c67dce28e", "latest_human_version": "1.40.2.8395-c67dce28e_1.0.23", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "plex", "recommended": false, "title": "Plex", @@ -180,7 +180,7 @@ "latest_version": "1.2.21", "latest_app_version": "2024.10.2", "latest_human_version": "2024.10.2_1.2.21", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "home-assistant", "recommended": false, "title": "Home Assistant", @@ -255,7 +255,7 @@ "latest_version": "1.1.14", "latest_app_version": "240915", "latest_human_version": "240915_1.1.14", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "photoprism", "recommended": false, "title": "Photoprism", @@ -328,7 +328,7 @@ "latest_version": "1.1.13", "latest_app_version": "RELEASE.2024-10-13T13-34-11Z", "latest_human_version": "RELEASE.2024-10-13T13-34-11Z_1.1.13", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "minio", "recommended": false, "title": "MinIO", @@ -377,7 +377,7 @@ "latest_version": "1.1.13", "latest_app_version": "4.8.10.0", "latest_human_version": "4.8.10.0_1.1.13", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "emby", "recommended": false, "title": "Emby Server", @@ -456,7 +456,7 @@ "latest_version": "1.1.14", "latest_app_version": "v1.47.4", "latest_human_version": "v1.47.4_1.1.14", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "netdata", "recommended": false, "title": "Netdata", @@ -533,7 +533,7 @@ "latest_version": "1.0.20", "latest_app_version": "14", "latest_human_version": "14_1.0.20", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "wg-easy", "recommended": false, "title": "WG Easy", @@ -593,7 +593,7 @@ "latest_version": "1.1.11", "latest_app_version": "v2.54.1", "latest_human_version": "v2.54.1_1.1.11", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "prometheus", "recommended": false, "title": "Prometheus", @@ -641,7 +641,7 @@ "latest_version": "1.0.28", "latest_app_version": "1.28.0", "latest_human_version": "1.28.0_1.0.28", - "last_update": "2024-10-16 19:06:56", + "last_update": "2024-10-16 19:36:28", "name": "syncthing", "recommended": false, "title": "Syncthing", @@ -726,7 +726,7 @@ "latest_version": "1.0.11", "latest_app_version": "1.0.0", "latest_human_version": "1.0.0_1.0.11", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "ix-app", "recommended": false, "title": "iX App", @@ -757,7 +757,7 @@ "latest_version": "1.3.20", "latest_app_version": "30.0.0", "latest_human_version": "30.0.0_1.3.20", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "nextcloud", "recommended": false, "title": "Nextcloud", @@ -861,7 +861,7 @@ "latest_version": "1.1.10", "latest_app_version": "6f87ea801-v1.71.2-go1.18.8", "latest_human_version": "6f87ea801-v1.71.2-go1.18.8_1.1.10", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "storj", "recommended": false, "title": "Storj", @@ -922,7 +922,7 @@ "latest_version": "1.3.8", "latest_app_version": "2.3.0", "latest_human_version": "2.3.0_1.3.8", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "diskoverdata", "recommended": false, "title": "Diskover Data", @@ -1005,7 +1005,7 @@ "latest_version": "1.1.11", "latest_app_version": "2024.07.0", "latest_human_version": "2024.07.0_1.1.11", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "pihole", "recommended": false, "title": "Pi-hole", @@ -1101,7 +1101,7 @@ "latest_version": "1.1.12", "latest_app_version": "8.15.2", "latest_human_version": "8.15.2_1.1.12", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "elastic-search", "recommended": false, "title": "Elastic Search", @@ -1149,7 +1149,7 @@ "latest_version": "1.0.1", "latest_app_version": "v1", "latest_human_version": "v1_1.0.1", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "other-nginx", "recommended": false, "title": "Other Nginx", @@ -1197,7 +1197,7 @@ "latest_version": "1.0.6", "latest_app_version": "v1", "latest_human_version": "v1_1.0.6", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "nginx", "recommended": false, "title": "Nginx", @@ -1247,7 +1247,7 @@ "latest_version": "1.1.7", "latest_app_version": "RELEASE.2024-08-26T15-33-07Z", "latest_human_version": "RELEASE.2024-08-26T15-33-07Z_1.1.7", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "minio", "recommended": false, "title": "MinIO", @@ -1296,7 +1296,7 @@ "latest_version": "1.0.15", "latest_app_version": "1.27.10", "latest_human_version": "1.27.10_1.0.15", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "syncthing", "recommended": false, "title": "Syncthing", @@ -1382,7 +1382,7 @@ "latest_version": "1.0.20", "latest_app_version": "0.9.0", "latest_human_version": "0.9.0_1.0.20", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "whoogle", "recommended": false, "title": "Whoogle", @@ -1430,7 +1430,7 @@ "latest_version": "1.0.14", "latest_app_version": "1.0.0", "latest_human_version": "1.0.0_1.0.14", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "rsyncd", "recommended": false, "title": "Rsync Daemon", @@ -1501,7 +1501,7 @@ "latest_version": "1.0.9", "latest_app_version": "v3.0.0", "latest_human_version": "v3.0.0_1.0.9", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "listmonk", "recommended": false, "title": "Listmonk", @@ -1557,7 +1557,7 @@ "latest_version": "1.11.18", "latest_app_version": "2024.10.1", "latest_human_version": "2024.10.1_1.11.18", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "minecraft", "recommended": false, "title": "Minecraft", @@ -1623,7 +1623,7 @@ "latest_version": "1.0.9", "latest_app_version": "2.26.01", "latest_human_version": "2.26.01_1.0.9", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "tdarr", "recommended": false, "title": "Tdarr", @@ -1689,7 +1689,7 @@ "latest_version": "1.0.21", "latest_app_version": "v2.14.6", "latest_human_version": "v2.14.6_1.0.21", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "tautulli", "recommended": false, "title": "Tautulli", @@ -1740,7 +1740,7 @@ "latest_version": "1.1.14", "latest_app_version": "v1.47.1", "latest_human_version": "v1.47.1_1.1.14", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "autobrr", "recommended": false, "title": "Autobrr", @@ -1789,7 +1789,7 @@ "latest_version": "1.0.18", "latest_app_version": "1.33.2", "latest_human_version": "1.33.2_1.0.18", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "overseerr", "recommended": false, "title": "Overseerr", @@ -1833,7 +1833,7 @@ "latest_version": "1.0.17", "latest_app_version": "1.4.2", "latest_human_version": "1.4.2_1.0.17", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "dockge", "recommended": false, "title": "Dockge", @@ -1913,7 +1913,7 @@ "latest_version": "1.1.13", "latest_app_version": "2024.10.0", "latest_human_version": "2024.10.0_1.1.13", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "cloudflared", "recommended": false, "title": "Cloudflared", @@ -1959,7 +1959,7 @@ "latest_version": "1.0.19", "latest_app_version": "0.7.3-nbxyz1", "latest_human_version": "0.7.3-nbxyz1_1.0.19", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "netbootxyz", "recommended": false, "title": "Netboot.xyz", @@ -2043,7 +2043,7 @@ "latest_version": "1.2.11", "latest_app_version": "8.5.6", "latest_human_version": "8.5.6_1.2.11", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "unifi-controller", "recommended": false, "title": "Unifi Controller", @@ -2090,7 +2090,7 @@ "latest_version": "1.0.9", "latest_app_version": "0.14.1", "latest_human_version": "0.14.1_1.0.9", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "frigate", "recommended": false, "title": "Frigate", @@ -2159,7 +2159,7 @@ "latest_version": "1.0.23", "latest_app_version": "v0.9.11", "latest_human_version": "v0.9.11_1.0.23", - "last_update": "2024-10-16 19:06:56", + "last_update": "2024-10-16 19:36:28", "name": "homepage", "recommended": false, "title": "Homepage", @@ -2210,7 +2210,7 @@ "latest_version": "1.0.19", "latest_app_version": "2.3.1", "latest_human_version": "2.3.1_1.0.19", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "flame", "recommended": false, "title": "Flame", @@ -2269,7 +2269,7 @@ "latest_version": "1.0.12", "latest_app_version": "2.12.1", "latest_human_version": "2.12.1_1.0.12", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "paperless-ngx", "recommended": false, "title": "Paperless-ngx", @@ -2358,7 +2358,7 @@ "latest_version": "1.0.10", "latest_app_version": "1.0.0", "latest_human_version": "1.0.0_1.0.10", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "tftpd-hpa", "recommended": false, "title": "TFTP Server", @@ -2420,7 +2420,7 @@ "latest_version": "1.0.6", "latest_app_version": "4.0.6", "latest_human_version": "4.0.6_1.0.6", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "transmission", "recommended": false, "title": "Transmission", @@ -2466,7 +2466,7 @@ "latest_version": "1.0.18", "latest_app_version": "latest", "latest_human_version": "latest_1.0.18", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "logseq", "recommended": false, "title": "Logseq", @@ -2510,7 +2510,7 @@ "latest_version": "1.1.11", "latest_app_version": "24.7.17", "latest_human_version": "24.7.17_1.1.11", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "drawio", "recommended": false, "title": "Draw.io", @@ -2560,7 +2560,7 @@ "latest_version": "1.1.11", "latest_app_version": "3.0.1-beta", "latest_human_version": "3.0.1-beta_1.1.11", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "joplin", "recommended": false, "title": "Joplin", @@ -2615,7 +2615,7 @@ "latest_version": "1.0.19", "latest_app_version": "0.8.3", "latest_human_version": "0.8.3_1.0.19", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "kavita", "recommended": false, "title": "Kavita", @@ -2687,7 +2687,7 @@ "latest_version": "1.0.7", "latest_app_version": "4.3.3", "latest_human_version": "4.3.3_1.0.7", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "sabnzbd", "recommended": false, "title": "SABnzbd", @@ -2737,7 +2737,7 @@ "latest_version": "1.1.13", "latest_app_version": "24.10.1", "latest_human_version": "24.10.1_1.1.13", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "actual-budget", "recommended": false, "title": "Actual Budget", @@ -2787,7 +2787,7 @@ "latest_version": "1.0.6", "latest_app_version": "5.0.12", "latest_human_version": "5.0.12_1.0.6", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "tiny-media-manager", "recommended": false, "title": "Tiny Media Manager", @@ -2851,7 +2851,7 @@ "latest_version": "1.2.14", "latest_app_version": "0.24.4", "latest_human_version": "0.24.4_1.2.14", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "vikunja", "recommended": false, "title": "Vikunja", @@ -2919,7 +2919,7 @@ "latest_version": "1.0.7", "latest_app_version": "4.9.1-1-ce-non-root", "latest_human_version": "4.9.1-1-ce-non-root_1.0.7", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "passbolt", "recommended": false, "title": "Passbolt", @@ -2976,7 +2976,7 @@ "latest_version": "1.0.19", "latest_app_version": "1.9.2", "latest_human_version": "1.9.2_1.0.19", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "jellyseerr", "recommended": false, "title": "Jellyseerr", @@ -3022,7 +3022,7 @@ "latest_version": "1.0.7", "latest_app_version": "1.32.2", "latest_human_version": "1.32.2_1.0.7", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "vaultwarden", "recommended": false, "title": "Vaultwarden", @@ -3075,7 +3075,7 @@ "latest_version": "1.0.10", "latest_app_version": "1.12.11", "latest_human_version": "1.12.11_1.0.10", - "last_update": "2024-10-16 19:06:56", + "last_update": "2024-10-16 19:36:28", "name": "castopod", "recommended": false, "title": "Castopod", @@ -3156,7 +3156,7 @@ "latest_version": "1.3.24", "latest_app_version": "1.64.0", "latest_human_version": "1.64.0_1.3.24", - "last_update": "2024-10-16 19:06:56", + "last_update": "2024-10-16 19:36:28", "name": "n8n", "recommended": false, "title": "n8n", @@ -3220,7 +3220,7 @@ "latest_version": "1.0.19", "latest_app_version": "2.8.3", "latest_human_version": "2.8.3_1.0.19", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "distribution", "recommended": false, "title": "Distribution", @@ -3266,7 +3266,7 @@ "latest_version": "1.0.17", "latest_app_version": "2.10-SNAPSHOT-ocr-es7", "latest_human_version": "2.10-SNAPSHOT-ocr-es7_1.0.17", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "fscrawler", "recommended": false, "title": "FSCrawler", @@ -3312,7 +3312,7 @@ "latest_version": "1.0.20", "latest_app_version": "v0.31.0", "latest_human_version": "v0.31.0_1.0.20", - "last_update": "2024-10-16 19:06:56", + "last_update": "2024-10-16 19:36:28", "name": "ipfs", "recommended": false, "title": "IPFS", @@ -3362,7 +3362,7 @@ "latest_version": "1.0.24", "latest_app_version": "0.53.3", "latest_human_version": "0.53.3_1.0.24", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "navidrome", "recommended": false, "title": "Navidrome", @@ -3410,7 +3410,7 @@ "latest_version": "1.0.6", "latest_app_version": "2.0.0", "latest_human_version": "2.0.0_1.0.6", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "pigallery2", "recommended": false, "title": "PiGallery2", @@ -3466,7 +3466,7 @@ "latest_version": "1.0.18", "latest_app_version": "latest", "latest_human_version": "latest_1.0.18", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "mineos", "recommended": false, "title": "MineOS", @@ -3533,7 +3533,7 @@ "latest_version": "1.1.12", "latest_app_version": "11.2.2", "latest_human_version": "11.2.2_1.1.12", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "grafana", "recommended": false, "title": "Grafana", @@ -3584,7 +3584,7 @@ "latest_version": "1.1.15", "latest_app_version": "v1.74.1", "latest_human_version": "v1.74.1_1.1.15", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "tailscale", "recommended": false, "title": "Tailscale", @@ -3654,7 +3654,7 @@ "latest_version": "1.0.16", "latest_app_version": "2024.10.4-3e747d049", "latest_human_version": "2024.10.4-3e747d049_1.0.16", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "searxng", "recommended": false, "title": "SearXNG", @@ -3707,7 +3707,7 @@ "latest_version": "1.0.22", "latest_app_version": "1.4.5", "latest_human_version": "1.4.5_1.0.22", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "bazarr", "recommended": false, "title": "Bazarr", @@ -3755,7 +3755,7 @@ "latest_version": "1.0.4", "latest_app_version": "17.0", "latest_human_version": "17.0_1.0.4", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "odoo", "recommended": false, "title": "Odoo", @@ -3803,7 +3803,7 @@ "latest_version": "1.0.6", "latest_app_version": "14.5.0", "latest_human_version": "14.5.0_1.0.6", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "piwigo", "recommended": false, "title": "Piwigo", @@ -3882,7 +3882,7 @@ "latest_version": "1.2.13", "latest_app_version": "1.25.2.4794", "latest_human_version": "1.25.2.4794_1.2.13", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "prowlarr", "recommended": false, "title": "Prowlarr", @@ -3928,7 +3928,7 @@ "latest_version": "1.0.19", "latest_app_version": "v1.0.0", "latest_human_version": "v1.0.0_1.0.19", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "kapowarr", "recommended": false, "title": "Kapowarr", @@ -3976,7 +3976,7 @@ "latest_version": "1.0.19", "latest_app_version": "1.14.1", "latest_human_version": "1.14.1_1.0.19", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "zerotier", "recommended": false, "title": "Zerotier", @@ -4066,7 +4066,7 @@ "latest_version": "1.2.14", "latest_app_version": "2.15.0", "latest_human_version": "2.15.0_1.2.14", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "audiobookshelf", "recommended": false, "title": "Audiobookshelf", @@ -4117,7 +4117,7 @@ "latest_version": "1.0.18", "latest_app_version": "latest", "latest_human_version": "latest_1.0.18", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "organizr", "recommended": false, "title": "Organizr", @@ -4186,7 +4186,7 @@ "latest_version": "1.0.7", "latest_app_version": "5.3.1", "latest_human_version": "5.3.1_1.0.7", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "twofactor-auth", "recommended": false, "title": "2FAuth", @@ -4234,7 +4234,7 @@ "latest_version": "1.0.17", "latest_app_version": "0.11.0", "latest_human_version": "0.11.0_1.0.17", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "unifi-protect-backup", "recommended": false, "title": "Unifi Protect Backup", @@ -4296,7 +4296,7 @@ "latest_version": "1.0.19", "latest_app_version": "4.0.9.2244", "latest_human_version": "4.0.9.2244_1.0.19", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "sonarr", "recommended": false, "title": "Sonarr", @@ -4345,7 +4345,7 @@ "latest_version": "1.0.22", "latest_app_version": "v0.107.53", "latest_human_version": "v0.107.53_1.0.22", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "adguard-home", "recommended": false, "title": "AdGuard Home", @@ -4411,7 +4411,7 @@ "latest_version": "1.1.12", "latest_app_version": "2.6.4.4402", "latest_human_version": "2.6.4.4402_1.1.12", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "lidarr", "recommended": false, "title": "Lidarr", @@ -4460,7 +4460,7 @@ "latest_version": "1.2.14", "latest_app_version": "2.23.0", "latest_human_version": "2.23.0_1.2.14", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "portainer", "recommended": false, "title": "Portainer", @@ -4542,7 +4542,7 @@ "latest_version": "1.1.10", "latest_app_version": "v1.5.634", "latest_human_version": "v1.5.634_1.1.10", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "mumble", "recommended": false, "title": "Mumble", @@ -4586,7 +4586,7 @@ "latest_version": "1.1.12", "latest_app_version": "5.12.2.9335", "latest_human_version": "5.12.2.9335_1.1.12", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "radarr", "recommended": false, "title": "Radarr", @@ -4636,7 +4636,7 @@ "latest_version": "1.0.6", "latest_app_version": "tshock-1.4.4.9-5.2.0-3", "latest_human_version": "tshock-1.4.4.9-5.2.0-3_1.0.6", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "terraria", "recommended": false, "title": "Terraria", @@ -4681,10 +4681,10 @@ "healthy_error": null, "home": "https://www.chia.net/", "location": "/__w/apps/apps/trains/community/chia", - "latest_version": "1.0.15", - "latest_app_version": "2.4.3", - "latest_human_version": "2.4.3_1.0.15", - "last_update": "2024-10-16 19:05:21", + "latest_version": "1.0.16", + "latest_app_version": "2.4.4", + "latest_human_version": "2.4.4_1.0.16", + "last_update": "2024-10-16 19:37:58", "name": "chia", "recommended": false, "title": "Chia", @@ -4730,7 +4730,7 @@ "latest_version": "1.0.18", "latest_app_version": "3.1.0", "latest_human_version": "3.1.0_1.0.18", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "dashy", "recommended": false, "title": "Dashy", @@ -4777,7 +4777,7 @@ "latest_version": "1.0.7", "latest_app_version": "6.6.2", "latest_human_version": "6.6.2_1.0.7", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "wordpress", "recommended": false, "title": "Wordpress", @@ -4838,7 +4838,7 @@ "latest_version": "1.0.12", "latest_app_version": "1.22.3", "latest_human_version": "1.22.3_1.0.12", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "gitea", "recommended": false, "title": "Gitea", @@ -4889,7 +4889,7 @@ "latest_version": "1.1.10", "latest_app_version": "5.14", "latest_human_version": "5.14_1.1.10", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "omada-controller", "recommended": false, "title": "Bazarr", @@ -4957,7 +4957,7 @@ "latest_version": "1.1.14", "latest_app_version": "1.14.1", "latest_human_version": "1.14.1_1.1.14", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "komga", "recommended": false, "title": "Komga", @@ -5006,7 +5006,7 @@ "latest_version": "1.0.7", "latest_app_version": "2.6.2", "latest_human_version": "2.6.2_1.0.7", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "sftpgo", "recommended": false, "title": "SFTPGo", @@ -5050,7 +5050,7 @@ "latest_version": "1.0.5", "latest_app_version": "8.12", "latest_human_version": "8.12_1.0.5", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "pgadmin", "recommended": false, "title": "pgAdmin", @@ -5104,7 +5104,7 @@ "latest_version": "1.0.13", "latest_app_version": "2.4.62", "latest_human_version": "2.4.62_1.0.13", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "webdav", "recommended": false, "title": "WebDAV", @@ -5148,7 +5148,7 @@ "latest_version": "1.0.13", "latest_app_version": "2.462.1-jdk17", "latest_human_version": "2.462.1-jdk17_1.0.13", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "jenkins", "recommended": false, "title": "Jenkins", @@ -5197,7 +5197,7 @@ "latest_version": "1.0.16", "latest_app_version": "v1.2.3", "latest_human_version": "v1.2.3_1.0.16", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "plex-auto-languages", "recommended": false, "title": "Plex Auto Languages", @@ -5242,7 +5242,7 @@ "latest_version": "1.1.17", "latest_app_version": "2024-10-08", "latest_human_version": "2024-10-08_1.1.17", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "metube", "recommended": false, "title": "MeTube", @@ -5289,7 +5289,7 @@ "latest_version": "1.0.7", "latest_app_version": "1.1.11-1", "latest_human_version": "1.1.11-1_1.0.7", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "rust-desk", "recommended": false, "title": "Rust Desk", @@ -5334,7 +5334,7 @@ "latest_version": "1.0.20", "latest_app_version": "palworld", "latest_human_version": "palworld_1.0.20", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "palworld", "recommended": false, "title": "Palworld", @@ -5412,7 +5412,7 @@ "latest_version": "1.0.19", "latest_app_version": "latest", "latest_human_version": "latest_1.0.19", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "briefkasten", "recommended": false, "title": "Briefkasten", @@ -5464,10 +5464,10 @@ "healthy_error": null, "home": "https://immich.app", "location": "/__w/apps/apps/trains/community/immich", - "latest_version": "1.6.20", - "latest_app_version": "v1.118.1", - "latest_human_version": "v1.118.1_1.6.20", - "last_update": "2024-10-16 19:06:56", + "latest_version": "1.6.21", + "latest_app_version": "v1.118.2", + "latest_human_version": "v1.118.2_1.6.21", + "last_update": "2024-10-16 19:37:58", "name": "immich", "recommended": false, "title": "Immich", @@ -5539,7 +5539,7 @@ "latest_version": "1.0.24", "latest_app_version": "v2.8.1", "latest_human_version": "v2.8.1_1.0.24", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "ddns-updater", "recommended": false, "title": "DDNS Updater", @@ -5587,7 +5587,7 @@ "latest_version": "1.0.11", "latest_app_version": "2.20240825.2", "latest_human_version": "2.20240825.2_1.0.11", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "invidious", "recommended": false, "title": "Invidious", @@ -5645,7 +5645,7 @@ "latest_version": "1.0.19", "latest_app_version": "0.3.32.2587", "latest_human_version": "0.3.32.2587_1.0.19", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "readarr", "recommended": false, "title": "Readarr", @@ -5695,7 +5695,7 @@ "latest_version": "1.0.8", "latest_app_version": "7.2.4", "latest_human_version": "7.2.4_1.0.8", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "recyclarr", "recommended": false, "title": "Recyclarr", @@ -5741,7 +5741,7 @@ "latest_version": "2.0.11", "latest_app_version": "v24.09.1", "latest_human_version": "v24.09.1_2.0.11", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "handbrake", "recommended": false, "title": "Handbrake", @@ -5816,7 +5816,7 @@ "latest_version": "2.0.10", "latest_app_version": "v24.05.1", "latest_human_version": "v24.05.1_2.0.10", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "homer", "recommended": false, "title": "Homer", @@ -5860,7 +5860,7 @@ "latest_version": "1.1.10", "latest_app_version": "1.1.2-2", "latest_human_version": "1.1.2-2_1.1.10", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "clamav", "recommended": false, "title": "ClamAV", @@ -5926,7 +5926,7 @@ "latest_version": "1.0.33", "latest_app_version": "4.0.5", "latest_human_version": "4.0.5_1.0.33", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "node-red", "recommended": false, "title": "Node-RED", @@ -5972,7 +5972,7 @@ "latest_version": "1.1.11", "latest_app_version": "v2.31.2", "latest_human_version": "v2.31.2_1.1.11", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "filebrowser", "recommended": false, "title": "File Browser", @@ -6022,7 +6022,7 @@ "latest_version": "1.0.17", "latest_app_version": "1.36.0", "latest_human_version": "1.36.0_1.0.17", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "linkding", "recommended": false, "title": "Linkding", @@ -6075,7 +6075,7 @@ "latest_version": "1.0.11", "latest_app_version": "1.23.2", "latest_human_version": "1.23.2_1.0.11", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "planka", "recommended": false, "title": "Planka", @@ -6130,7 +6130,7 @@ "latest_version": "1.0.28", "latest_app_version": "5.0.0", "latest_human_version": "5.0.0_1.0.28", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "qbittorrent", "recommended": false, "title": "qBittorrent", @@ -6178,7 +6178,7 @@ "latest_version": "1.2.18", "latest_app_version": "version-6.1.21", "latest_human_version": "version-6.1.21_1.2.18", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "firefly-iii", "recommended": false, "title": "Firefly III", @@ -6265,7 +6265,7 @@ "latest_version": "1.0.7", "latest_app_version": "7.4.1", "latest_human_version": "7.4.1_1.0.7", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "redis", "recommended": false, "title": "Redis", @@ -6310,7 +6310,7 @@ "latest_version": "1.0.25", "latest_app_version": "10.9.11", "latest_human_version": "10.9.11_1.0.25", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "jellyfin", "recommended": false, "title": "Jellyfin", @@ -6362,7 +6362,7 @@ "latest_version": "1.0.18", "latest_app_version": "2.1.1", "latest_human_version": "2.1.1_1.0.18", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "deluge", "recommended": false, "title": "Deluge", @@ -6428,7 +6428,7 @@ "latest_version": "1.2.10", "latest_app_version": "v1.12.0", "latest_human_version": "v1.12.0_1.2.10", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "mealie", "recommended": false, "title": "Mealie", @@ -6481,7 +6481,7 @@ "latest_version": "1.1.14", "latest_app_version": "1.24.3", "latest_human_version": "1.24.3_1.1.14", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "freshrss", "recommended": false, "title": "FreshRSS", @@ -6549,7 +6549,7 @@ "latest_version": "1.0.19", "latest_app_version": "0.15.4", "latest_human_version": "0.15.4_1.0.19", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "homarr", "recommended": false, "title": "Homarr", @@ -6597,7 +6597,7 @@ "latest_version": "1.0.7", "latest_app_version": "1.6.9-apache", "latest_human_version": "1.6.9-apache_1.0.7", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "name": "roundcube", "recommended": false, "title": "Roundcube", @@ -6676,7 +6676,7 @@ "latest_version": "1.0.21", "latest_app_version": "2.12.0", "latest_human_version": "2.12.0_1.0.21", - "last_update": "2024-10-16 19:06:56", + "last_update": "2024-10-16 19:36:28", "name": "nginx-proxy-manager", "recommended": false, "title": "Nginx Proxy Manager", diff --git a/trains/community/actual-budget/app_versions.json b/trains/community/actual-budget/app_versions.json index b3bef9ef03..0f0ddf4e7b 100644 --- a/trains/community/actual-budget/app_versions.json +++ b/trains/community/actual-budget/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/actual-budget/1.1.13", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "24.10.1_1.1.13", "version": "1.1.13", diff --git a/trains/community/adguard-home/app_versions.json b/trains/community/adguard-home/app_versions.json index 8e94bb46a7..a134137c44 100644 --- a/trains/community/adguard-home/app_versions.json +++ b/trains/community/adguard-home/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/adguard-home/1.0.22", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "v0.107.53_1.0.22", "version": "1.0.22", diff --git a/trains/community/audiobookshelf/app_versions.json b/trains/community/audiobookshelf/app_versions.json index 0b2730aeed..550541ef1c 100644 --- a/trains/community/audiobookshelf/app_versions.json +++ b/trains/community/audiobookshelf/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/audiobookshelf/1.2.14", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "2.15.0_1.2.14", "version": "1.2.14", diff --git a/trains/community/autobrr/app_versions.json b/trains/community/autobrr/app_versions.json index c780ba0500..c8a8d0ddda 100644 --- a/trains/community/autobrr/app_versions.json +++ b/trains/community/autobrr/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/autobrr/1.1.14", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "v1.47.1_1.1.14", "version": "1.1.14", diff --git a/trains/community/bazarr/app_versions.json b/trains/community/bazarr/app_versions.json index cf84428c12..0a1bfe5769 100644 --- a/trains/community/bazarr/app_versions.json +++ b/trains/community/bazarr/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/bazarr/1.0.22", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "1.4.5_1.0.22", "version": "1.0.22", diff --git a/trains/community/briefkasten/app_versions.json b/trains/community/briefkasten/app_versions.json index 0b03074d0f..8adf85ff02 100644 --- a/trains/community/briefkasten/app_versions.json +++ b/trains/community/briefkasten/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/briefkasten/1.0.19", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "latest_1.0.19", "version": "1.0.19", diff --git a/trains/community/castopod/app_versions.json b/trains/community/castopod/app_versions.json index 69329028c5..1c546527c1 100644 --- a/trains/community/castopod/app_versions.json +++ b/trains/community/castopod/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/castopod/1.0.10", - "last_update": "2024-10-16 19:06:56", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "1.12.11_1.0.10", "version": "1.0.10", diff --git a/trains/community/chia/app_versions.json b/trains/community/chia/app_versions.json index 8130930f17..0e777de787 100644 --- a/trains/community/chia/app_versions.json +++ b/trains/community/chia/app_versions.json @@ -1,15 +1,15 @@ { - "1.0.15": { + "1.0.16": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/chia/1.0.15", - "last_update": "2024-10-16 19:05:21", + "location": "/__w/apps/apps/trains/community/chia/1.0.16", + "last_update": "2024-10-16 19:37:58", "required_features": [], - "human_version": "2.4.3_1.0.15", - "version": "1.0.15", + "human_version": "2.4.4_1.0.16", + "version": "1.0.16", "app_metadata": { - "app_version": "2.4.3", + "app_version": "2.4.4", "capabilities": [], "categories": [ "financial" @@ -49,7 +49,7 @@ ], "title": "Chia", "train": "community", - "version": "1.0.15" + "version": "1.0.16" }, "schema": { "groups": [ diff --git a/trains/community/clamav/app_versions.json b/trains/community/clamav/app_versions.json index af756f60a0..60bf08ae1a 100644 --- a/trains/community/clamav/app_versions.json +++ b/trains/community/clamav/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/clamav/1.1.10", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "1.1.2-2_1.1.10", "version": "1.1.10", diff --git a/trains/community/cloudflared/app_versions.json b/trains/community/cloudflared/app_versions.json index a67ac8cab8..d51a5cdfa8 100644 --- a/trains/community/cloudflared/app_versions.json +++ b/trains/community/cloudflared/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/cloudflared/1.1.13", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "2024.10.0_1.1.13", "version": "1.1.13", diff --git a/trains/community/dashy/app_versions.json b/trains/community/dashy/app_versions.json index f04a243512..5226982156 100644 --- a/trains/community/dashy/app_versions.json +++ b/trains/community/dashy/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/dashy/1.0.18", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "3.1.0_1.0.18", "version": "1.0.18", diff --git a/trains/community/ddns-updater/app_versions.json b/trains/community/ddns-updater/app_versions.json index ebee09ca64..edf8721549 100644 --- a/trains/community/ddns-updater/app_versions.json +++ b/trains/community/ddns-updater/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/ddns-updater/1.0.24", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "v2.8.1_1.0.24", "version": "1.0.24", diff --git a/trains/community/deluge/app_versions.json b/trains/community/deluge/app_versions.json index 256624d963..6dcb2a7926 100644 --- a/trains/community/deluge/app_versions.json +++ b/trains/community/deluge/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/deluge/1.0.18", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "2.1.1_1.0.18", "version": "1.0.18", diff --git a/trains/community/distribution/app_versions.json b/trains/community/distribution/app_versions.json index fd27ab71ad..299a514ddd 100644 --- a/trains/community/distribution/app_versions.json +++ b/trains/community/distribution/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/distribution/1.0.19", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "2.8.3_1.0.19", "version": "1.0.19", diff --git a/trains/community/dockge/app_versions.json b/trains/community/dockge/app_versions.json index dfd89f603d..e37b9ac575 100644 --- a/trains/community/dockge/app_versions.json +++ b/trains/community/dockge/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/dockge/1.0.17", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "1.4.2_1.0.17", "version": "1.0.17", diff --git a/trains/community/drawio/app_versions.json b/trains/community/drawio/app_versions.json index a1ad4d8e8f..d417ec3868 100644 --- a/trains/community/drawio/app_versions.json +++ b/trains/community/drawio/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/drawio/1.1.11", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "24.7.17_1.1.11", "version": "1.1.11", diff --git a/trains/community/filebrowser/app_versions.json b/trains/community/filebrowser/app_versions.json index a0a51d11f2..dc7139b995 100644 --- a/trains/community/filebrowser/app_versions.json +++ b/trains/community/filebrowser/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/filebrowser/1.1.11", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "v2.31.2_1.1.11", "version": "1.1.11", diff --git a/trains/community/firefly-iii/app_versions.json b/trains/community/firefly-iii/app_versions.json index 1b288e265c..16a1874e08 100644 --- a/trains/community/firefly-iii/app_versions.json +++ b/trains/community/firefly-iii/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/firefly-iii/1.2.18", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "version-6.1.21_1.2.18", "version": "1.2.18", diff --git a/trains/community/flame/app_versions.json b/trains/community/flame/app_versions.json index 11289c0830..6bc66ba164 100644 --- a/trains/community/flame/app_versions.json +++ b/trains/community/flame/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/flame/1.0.19", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "2.3.1_1.0.19", "version": "1.0.19", diff --git a/trains/community/freshrss/app_versions.json b/trains/community/freshrss/app_versions.json index 409db2e1f5..1fd07c8ef8 100644 --- a/trains/community/freshrss/app_versions.json +++ b/trains/community/freshrss/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/freshrss/1.1.14", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "1.24.3_1.1.14", "version": "1.1.14", diff --git a/trains/community/frigate/app_versions.json b/trains/community/frigate/app_versions.json index 53787da851..8590572f4d 100644 --- a/trains/community/frigate/app_versions.json +++ b/trains/community/frigate/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/frigate/1.0.9", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "0.14.1_1.0.9", "version": "1.0.9", diff --git a/trains/community/fscrawler/app_versions.json b/trains/community/fscrawler/app_versions.json index ec9f9d048c..96b3340231 100644 --- a/trains/community/fscrawler/app_versions.json +++ b/trains/community/fscrawler/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/fscrawler/1.0.17", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "2.10-SNAPSHOT-ocr-es7_1.0.17", "version": "1.0.17", diff --git a/trains/community/gitea/app_versions.json b/trains/community/gitea/app_versions.json index 19b277e942..4e71c71fcb 100644 --- a/trains/community/gitea/app_versions.json +++ b/trains/community/gitea/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/gitea/1.0.12", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "1.22.3_1.0.12", "version": "1.0.12", diff --git a/trains/community/grafana/app_versions.json b/trains/community/grafana/app_versions.json index 69f436cdd9..f80de8335a 100644 --- a/trains/community/grafana/app_versions.json +++ b/trains/community/grafana/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/grafana/1.1.12", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "11.2.2_1.1.12", "version": "1.1.12", diff --git a/trains/community/handbrake/app_versions.json b/trains/community/handbrake/app_versions.json index 8f8011811b..f1956911bf 100644 --- a/trains/community/handbrake/app_versions.json +++ b/trains/community/handbrake/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/handbrake/2.0.11", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "v24.09.1_2.0.11", "version": "2.0.11", diff --git a/trains/community/homarr/app_versions.json b/trains/community/homarr/app_versions.json index d4f8ec3628..ebdd496d0c 100644 --- a/trains/community/homarr/app_versions.json +++ b/trains/community/homarr/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/homarr/1.0.19", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "0.15.4_1.0.19", "version": "1.0.19", diff --git a/trains/community/homepage/app_versions.json b/trains/community/homepage/app_versions.json index c258ec6e50..20b1224384 100644 --- a/trains/community/homepage/app_versions.json +++ b/trains/community/homepage/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/homepage/1.0.23", - "last_update": "2024-10-16 19:06:56", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "v0.9.11_1.0.23", "version": "1.0.23", diff --git a/trains/community/homer/app_versions.json b/trains/community/homer/app_versions.json index 6f69e33722..e2df79b706 100644 --- a/trains/community/homer/app_versions.json +++ b/trains/community/homer/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/homer/2.0.10", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "v24.05.1_2.0.10", "version": "2.0.10", diff --git a/trains/community/immich/app_versions.json b/trains/community/immich/app_versions.json index b2e21b6786..158bf52ce6 100644 --- a/trains/community/immich/app_versions.json +++ b/trains/community/immich/app_versions.json @@ -1,15 +1,15 @@ { - "1.6.20": { + "1.6.21": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/immich/1.6.20", - "last_update": "2024-10-16 19:06:56", + "location": "/__w/apps/apps/trains/community/immich/1.6.21", + "last_update": "2024-10-16 19:37:58", "required_features": [], - "human_version": "v1.118.1_1.6.20", - "version": "1.6.20", + "human_version": "v1.118.2_1.6.21", + "version": "1.6.21", "app_metadata": { - "app_version": "v1.118.1", + "app_version": "v1.118.2", "capabilities": [ { "description": "Immich Proxy is able to chown files.", @@ -75,7 +75,7 @@ ], "title": "Immich", "train": "community", - "version": "1.6.20" + "version": "1.6.21" }, "schema": { "groups": [ diff --git a/trains/community/invidious/app_versions.json b/trains/community/invidious/app_versions.json index 3b25fe7233..d897a3db55 100644 --- a/trains/community/invidious/app_versions.json +++ b/trains/community/invidious/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/invidious/1.0.11", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "2.20240825.2_1.0.11", "version": "1.0.11", diff --git a/trains/community/ipfs/app_versions.json b/trains/community/ipfs/app_versions.json index a91f8717f9..318343ab10 100644 --- a/trains/community/ipfs/app_versions.json +++ b/trains/community/ipfs/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/ipfs/1.0.20", - "last_update": "2024-10-16 19:06:56", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "v0.31.0_1.0.20", "version": "1.0.20", diff --git a/trains/community/jellyfin/app_versions.json b/trains/community/jellyfin/app_versions.json index bce2dccf9f..824aa4f850 100644 --- a/trains/community/jellyfin/app_versions.json +++ b/trains/community/jellyfin/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/jellyfin/1.0.25", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "10.9.11_1.0.25", "version": "1.0.25", diff --git a/trains/community/jellyseerr/app_versions.json b/trains/community/jellyseerr/app_versions.json index 7ebd068990..15db417e66 100644 --- a/trains/community/jellyseerr/app_versions.json +++ b/trains/community/jellyseerr/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/jellyseerr/1.0.19", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "1.9.2_1.0.19", "version": "1.0.19", diff --git a/trains/community/jenkins/app_versions.json b/trains/community/jenkins/app_versions.json index fb360e6c60..38e25d55da 100644 --- a/trains/community/jenkins/app_versions.json +++ b/trains/community/jenkins/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/jenkins/1.0.13", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "2.462.1-jdk17_1.0.13", "version": "1.0.13", diff --git a/trains/community/joplin/app_versions.json b/trains/community/joplin/app_versions.json index c58a6a590a..7a1dd49716 100644 --- a/trains/community/joplin/app_versions.json +++ b/trains/community/joplin/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/joplin/1.1.11", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "3.0.1-beta_1.1.11", "version": "1.1.11", diff --git a/trains/community/kapowarr/app_versions.json b/trains/community/kapowarr/app_versions.json index 8e70f8def0..d3eda228ab 100644 --- a/trains/community/kapowarr/app_versions.json +++ b/trains/community/kapowarr/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/kapowarr/1.0.19", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "v1.0.0_1.0.19", "version": "1.0.19", diff --git a/trains/community/kavita/app_versions.json b/trains/community/kavita/app_versions.json index b31a492ef0..b9349000a3 100644 --- a/trains/community/kavita/app_versions.json +++ b/trains/community/kavita/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/kavita/1.0.19", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "0.8.3_1.0.19", "version": "1.0.19", diff --git a/trains/community/komga/app_versions.json b/trains/community/komga/app_versions.json index e14eb370da..3fb08391a3 100644 --- a/trains/community/komga/app_versions.json +++ b/trains/community/komga/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/komga/1.1.14", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "1.14.1_1.1.14", "version": "1.1.14", diff --git a/trains/community/lidarr/app_versions.json b/trains/community/lidarr/app_versions.json index a951dfbf19..4d04c91e41 100644 --- a/trains/community/lidarr/app_versions.json +++ b/trains/community/lidarr/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/lidarr/1.1.12", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "2.6.4.4402_1.1.12", "version": "1.1.12", diff --git a/trains/community/linkding/app_versions.json b/trains/community/linkding/app_versions.json index d4cab885d9..eb13776d99 100644 --- a/trains/community/linkding/app_versions.json +++ b/trains/community/linkding/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/linkding/1.0.17", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "1.36.0_1.0.17", "version": "1.0.17", diff --git a/trains/community/listmonk/app_versions.json b/trains/community/listmonk/app_versions.json index 4cbc0c70a0..75bb82c2e5 100644 --- a/trains/community/listmonk/app_versions.json +++ b/trains/community/listmonk/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/listmonk/1.0.9", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "v3.0.0_1.0.9", "version": "1.0.9", diff --git a/trains/community/logseq/app_versions.json b/trains/community/logseq/app_versions.json index 1d606978d9..87ebdedf71 100644 --- a/trains/community/logseq/app_versions.json +++ b/trains/community/logseq/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/logseq/1.0.18", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "latest_1.0.18", "version": "1.0.18", diff --git a/trains/community/mealie/app_versions.json b/trains/community/mealie/app_versions.json index 40468fe406..c3464e8c86 100644 --- a/trains/community/mealie/app_versions.json +++ b/trains/community/mealie/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/mealie/1.2.10", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "v1.12.0_1.2.10", "version": "1.2.10", diff --git a/trains/community/metube/app_versions.json b/trains/community/metube/app_versions.json index 715c3a1b4d..22a5f5b72c 100644 --- a/trains/community/metube/app_versions.json +++ b/trains/community/metube/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/metube/1.1.17", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "2024-10-08_1.1.17", "version": "1.1.17", diff --git a/trains/community/minecraft/app_versions.json b/trains/community/minecraft/app_versions.json index cc32709ca1..0681dcbed9 100644 --- a/trains/community/minecraft/app_versions.json +++ b/trains/community/minecraft/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/minecraft/1.11.18", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "2024.10.1_1.11.18", "version": "1.11.18", diff --git a/trains/community/mineos/app_versions.json b/trains/community/mineos/app_versions.json index 4bcc47d993..a6199535d3 100644 --- a/trains/community/mineos/app_versions.json +++ b/trains/community/mineos/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/mineos/1.0.18", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "latest_1.0.18", "version": "1.0.18", diff --git a/trains/community/mumble/app_versions.json b/trains/community/mumble/app_versions.json index e18e9bdf0c..681d058602 100644 --- a/trains/community/mumble/app_versions.json +++ b/trains/community/mumble/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/mumble/1.1.10", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "v1.5.634_1.1.10", "version": "1.1.10", diff --git a/trains/community/n8n/app_versions.json b/trains/community/n8n/app_versions.json index 9192756e7d..386ccf793c 100644 --- a/trains/community/n8n/app_versions.json +++ b/trains/community/n8n/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/n8n/1.3.24", - "last_update": "2024-10-16 19:06:56", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "1.64.0_1.3.24", "version": "1.3.24", diff --git a/trains/community/navidrome/app_versions.json b/trains/community/navidrome/app_versions.json index fddc4215f0..b6ed472bc7 100644 --- a/trains/community/navidrome/app_versions.json +++ b/trains/community/navidrome/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/navidrome/1.0.24", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "0.53.3_1.0.24", "version": "1.0.24", diff --git a/trains/community/netbootxyz/app_versions.json b/trains/community/netbootxyz/app_versions.json index b8eeb2a632..9419b8f075 100644 --- a/trains/community/netbootxyz/app_versions.json +++ b/trains/community/netbootxyz/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/netbootxyz/1.0.19", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "0.7.3-nbxyz1_1.0.19", "version": "1.0.19", diff --git a/trains/community/nginx-proxy-manager/app_versions.json b/trains/community/nginx-proxy-manager/app_versions.json index 5762885be1..3166a1b398 100644 --- a/trains/community/nginx-proxy-manager/app_versions.json +++ b/trains/community/nginx-proxy-manager/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/nginx-proxy-manager/1.0.21", - "last_update": "2024-10-16 19:06:56", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "2.12.0_1.0.21", "version": "1.0.21", diff --git a/trains/community/node-red/app_versions.json b/trains/community/node-red/app_versions.json index fdd3548c35..4a7a19daf4 100644 --- a/trains/community/node-red/app_versions.json +++ b/trains/community/node-red/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/node-red/1.0.33", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "4.0.5_1.0.33", "version": "1.0.33", diff --git a/trains/community/odoo/app_versions.json b/trains/community/odoo/app_versions.json index 6d7f54c2f5..4fb6fdac71 100644 --- a/trains/community/odoo/app_versions.json +++ b/trains/community/odoo/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/odoo/1.0.4", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "17.0_1.0.4", "version": "1.0.4", diff --git a/trains/community/omada-controller/app_versions.json b/trains/community/omada-controller/app_versions.json index 7c783d7403..884d11ef72 100644 --- a/trains/community/omada-controller/app_versions.json +++ b/trains/community/omada-controller/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/omada-controller/1.1.10", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "5.14_1.1.10", "version": "1.1.10", diff --git a/trains/community/organizr/app_versions.json b/trains/community/organizr/app_versions.json index 3784785b7f..59c5ada4da 100644 --- a/trains/community/organizr/app_versions.json +++ b/trains/community/organizr/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/organizr/1.0.18", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "latest_1.0.18", "version": "1.0.18", diff --git a/trains/community/overseerr/app_versions.json b/trains/community/overseerr/app_versions.json index 5a51ac56c5..6a7d748c44 100644 --- a/trains/community/overseerr/app_versions.json +++ b/trains/community/overseerr/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/overseerr/1.0.18", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "1.33.2_1.0.18", "version": "1.0.18", diff --git a/trains/community/palworld/app_versions.json b/trains/community/palworld/app_versions.json index 53a65891e1..3001345005 100644 --- a/trains/community/palworld/app_versions.json +++ b/trains/community/palworld/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/palworld/1.0.20", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "palworld_1.0.20", "version": "1.0.20", diff --git a/trains/community/paperless-ngx/app_versions.json b/trains/community/paperless-ngx/app_versions.json index 92b44c16d0..f06949c1d2 100644 --- a/trains/community/paperless-ngx/app_versions.json +++ b/trains/community/paperless-ngx/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/paperless-ngx/1.0.12", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "2.12.1_1.0.12", "version": "1.0.12", diff --git a/trains/community/passbolt/app_versions.json b/trains/community/passbolt/app_versions.json index 375384d9e3..c9c1c964ab 100644 --- a/trains/community/passbolt/app_versions.json +++ b/trains/community/passbolt/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/passbolt/1.0.7", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "4.9.1-1-ce-non-root_1.0.7", "version": "1.0.7", diff --git a/trains/community/pgadmin/app_versions.json b/trains/community/pgadmin/app_versions.json index a5b9550c27..847fbbf02f 100644 --- a/trains/community/pgadmin/app_versions.json +++ b/trains/community/pgadmin/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/pgadmin/1.0.5", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "8.12_1.0.5", "version": "1.0.5", diff --git a/trains/community/pigallery2/app_versions.json b/trains/community/pigallery2/app_versions.json index 71b15acde4..587617f0dc 100644 --- a/trains/community/pigallery2/app_versions.json +++ b/trains/community/pigallery2/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/pigallery2/1.0.6", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "2.0.0_1.0.6", "version": "1.0.6", diff --git a/trains/community/piwigo/app_versions.json b/trains/community/piwigo/app_versions.json index f5bec0ad31..bf9ab669ec 100644 --- a/trains/community/piwigo/app_versions.json +++ b/trains/community/piwigo/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/piwigo/1.0.6", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "14.5.0_1.0.6", "version": "1.0.6", diff --git a/trains/community/planka/app_versions.json b/trains/community/planka/app_versions.json index 09a011c73f..af67776f7d 100644 --- a/trains/community/planka/app_versions.json +++ b/trains/community/planka/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/planka/1.0.11", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "1.23.2_1.0.11", "version": "1.0.11", diff --git a/trains/community/plex-auto-languages/app_versions.json b/trains/community/plex-auto-languages/app_versions.json index 11023fdf65..b5d885cdb4 100644 --- a/trains/community/plex-auto-languages/app_versions.json +++ b/trains/community/plex-auto-languages/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/plex-auto-languages/1.0.16", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "v1.2.3_1.0.16", "version": "1.0.16", diff --git a/trains/community/portainer/app_versions.json b/trains/community/portainer/app_versions.json index e0c279615a..6300e92b3d 100644 --- a/trains/community/portainer/app_versions.json +++ b/trains/community/portainer/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/portainer/1.2.14", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "2.23.0_1.2.14", "version": "1.2.14", diff --git a/trains/community/prowlarr/app_versions.json b/trains/community/prowlarr/app_versions.json index 2f3e326489..247be02b6a 100644 --- a/trains/community/prowlarr/app_versions.json +++ b/trains/community/prowlarr/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/prowlarr/1.2.13", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "1.25.2.4794_1.2.13", "version": "1.2.13", diff --git a/trains/community/qbittorrent/app_versions.json b/trains/community/qbittorrent/app_versions.json index 2c5bce6275..cc6a63c093 100644 --- a/trains/community/qbittorrent/app_versions.json +++ b/trains/community/qbittorrent/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/qbittorrent/1.0.28", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "5.0.0_1.0.28", "version": "1.0.28", diff --git a/trains/community/radarr/app_versions.json b/trains/community/radarr/app_versions.json index 2c39a3ecbe..5f6528899e 100644 --- a/trains/community/radarr/app_versions.json +++ b/trains/community/radarr/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/radarr/1.1.12", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "5.12.2.9335_1.1.12", "version": "1.1.12", diff --git a/trains/community/readarr/app_versions.json b/trains/community/readarr/app_versions.json index c08fe0f453..5c6e4c8f81 100644 --- a/trains/community/readarr/app_versions.json +++ b/trains/community/readarr/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/readarr/1.0.19", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "0.3.32.2587_1.0.19", "version": "1.0.19", diff --git a/trains/community/recyclarr/app_versions.json b/trains/community/recyclarr/app_versions.json index 52329713ba..572d484c54 100644 --- a/trains/community/recyclarr/app_versions.json +++ b/trains/community/recyclarr/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/recyclarr/1.0.8", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "7.2.4_1.0.8", "version": "1.0.8", diff --git a/trains/community/redis/app_versions.json b/trains/community/redis/app_versions.json index 1665cd78e8..d808c49339 100644 --- a/trains/community/redis/app_versions.json +++ b/trains/community/redis/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/redis/1.0.7", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "7.4.1_1.0.7", "version": "1.0.7", diff --git a/trains/community/roundcube/app_versions.json b/trains/community/roundcube/app_versions.json index 0aa6e97c52..7910c74f95 100644 --- a/trains/community/roundcube/app_versions.json +++ b/trains/community/roundcube/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/roundcube/1.0.7", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "1.6.9-apache_1.0.7", "version": "1.0.7", diff --git a/trains/community/rsyncd/app_versions.json b/trains/community/rsyncd/app_versions.json index 158c5601ba..28c9d9193b 100644 --- a/trains/community/rsyncd/app_versions.json +++ b/trains/community/rsyncd/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/rsyncd/1.0.14", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "1.0.0_1.0.14", "version": "1.0.14", diff --git a/trains/community/rust-desk/app_versions.json b/trains/community/rust-desk/app_versions.json index 4443aea680..1ca594cbea 100644 --- a/trains/community/rust-desk/app_versions.json +++ b/trains/community/rust-desk/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/rust-desk/1.0.7", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "1.1.11-1_1.0.7", "version": "1.0.7", diff --git a/trains/community/sabnzbd/app_versions.json b/trains/community/sabnzbd/app_versions.json index 243f7c7249..d486917d3a 100644 --- a/trains/community/sabnzbd/app_versions.json +++ b/trains/community/sabnzbd/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/sabnzbd/1.0.7", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "4.3.3_1.0.7", "version": "1.0.7", diff --git a/trains/community/searxng/app_versions.json b/trains/community/searxng/app_versions.json index f6afb53802..656aa6d9f3 100644 --- a/trains/community/searxng/app_versions.json +++ b/trains/community/searxng/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/searxng/1.0.16", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "2024.10.4-3e747d049_1.0.16", "version": "1.0.16", diff --git a/trains/community/sftpgo/app_versions.json b/trains/community/sftpgo/app_versions.json index dcfb248593..7080353cef 100644 --- a/trains/community/sftpgo/app_versions.json +++ b/trains/community/sftpgo/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/sftpgo/1.0.7", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "2.6.2_1.0.7", "version": "1.0.7", diff --git a/trains/community/sonarr/app_versions.json b/trains/community/sonarr/app_versions.json index f2a117224e..97a1033a81 100644 --- a/trains/community/sonarr/app_versions.json +++ b/trains/community/sonarr/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/sonarr/1.0.19", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "4.0.9.2244_1.0.19", "version": "1.0.19", diff --git a/trains/community/tailscale/app_versions.json b/trains/community/tailscale/app_versions.json index 6bdd7c0955..71a303ac69 100644 --- a/trains/community/tailscale/app_versions.json +++ b/trains/community/tailscale/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/tailscale/1.1.15", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "v1.74.1_1.1.15", "version": "1.1.15", diff --git a/trains/community/tautulli/app_versions.json b/trains/community/tautulli/app_versions.json index a4e895acf3..d49a438215 100644 --- a/trains/community/tautulli/app_versions.json +++ b/trains/community/tautulli/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/tautulli/1.0.21", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "v2.14.6_1.0.21", "version": "1.0.21", diff --git a/trains/community/tdarr/app_versions.json b/trains/community/tdarr/app_versions.json index 85ac475559..7952cead78 100644 --- a/trains/community/tdarr/app_versions.json +++ b/trains/community/tdarr/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/tdarr/1.0.9", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "2.26.01_1.0.9", "version": "1.0.9", diff --git a/trains/community/terraria/app_versions.json b/trains/community/terraria/app_versions.json index 33868042fb..10ffd5dd8e 100644 --- a/trains/community/terraria/app_versions.json +++ b/trains/community/terraria/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/terraria/1.0.6", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "tshock-1.4.4.9-5.2.0-3_1.0.6", "version": "1.0.6", diff --git a/trains/community/tftpd-hpa/app_versions.json b/trains/community/tftpd-hpa/app_versions.json index 44a0e316b9..7d80e96a29 100644 --- a/trains/community/tftpd-hpa/app_versions.json +++ b/trains/community/tftpd-hpa/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/tftpd-hpa/1.0.10", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "1.0.0_1.0.10", "version": "1.0.10", diff --git a/trains/community/tiny-media-manager/app_versions.json b/trains/community/tiny-media-manager/app_versions.json index 7db3ade6a0..c76a854c9f 100644 --- a/trains/community/tiny-media-manager/app_versions.json +++ b/trains/community/tiny-media-manager/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/tiny-media-manager/1.0.6", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "5.0.12_1.0.6", "version": "1.0.6", diff --git a/trains/community/transmission/app_versions.json b/trains/community/transmission/app_versions.json index ab9be935b9..5e12d325b7 100644 --- a/trains/community/transmission/app_versions.json +++ b/trains/community/transmission/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/transmission/1.0.6", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "4.0.6_1.0.6", "version": "1.0.6", diff --git a/trains/community/twofactor-auth/app_versions.json b/trains/community/twofactor-auth/app_versions.json index 20e824dc68..0b7594d809 100644 --- a/trains/community/twofactor-auth/app_versions.json +++ b/trains/community/twofactor-auth/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/twofactor-auth/1.0.7", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "5.3.1_1.0.7", "version": "1.0.7", diff --git a/trains/community/unifi-controller/app_versions.json b/trains/community/unifi-controller/app_versions.json index 91eea3d6f5..e1afac7f57 100644 --- a/trains/community/unifi-controller/app_versions.json +++ b/trains/community/unifi-controller/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/unifi-controller/1.2.11", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "8.5.6_1.2.11", "version": "1.2.11", diff --git a/trains/community/unifi-protect-backup/app_versions.json b/trains/community/unifi-protect-backup/app_versions.json index 4816c69327..7269e70ccc 100644 --- a/trains/community/unifi-protect-backup/app_versions.json +++ b/trains/community/unifi-protect-backup/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/unifi-protect-backup/1.0.17", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "0.11.0_1.0.17", "version": "1.0.17", diff --git a/trains/community/vaultwarden/app_versions.json b/trains/community/vaultwarden/app_versions.json index 61ee4191ea..8c882bc0db 100644 --- a/trains/community/vaultwarden/app_versions.json +++ b/trains/community/vaultwarden/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/vaultwarden/1.0.7", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "1.32.2_1.0.7", "version": "1.0.7", diff --git a/trains/community/vikunja/app_versions.json b/trains/community/vikunja/app_versions.json index b8cc13aa92..5bc70ac590 100644 --- a/trains/community/vikunja/app_versions.json +++ b/trains/community/vikunja/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/vikunja/1.2.14", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "0.24.4_1.2.14", "version": "1.2.14", diff --git a/trains/community/webdav/app_versions.json b/trains/community/webdav/app_versions.json index 16361ce8b8..7d84b4f300 100644 --- a/trains/community/webdav/app_versions.json +++ b/trains/community/webdav/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/webdav/1.0.13", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "2.4.62_1.0.13", "version": "1.0.13", diff --git a/trains/community/whoogle/app_versions.json b/trains/community/whoogle/app_versions.json index 78baf9e314..0d579dc780 100644 --- a/trains/community/whoogle/app_versions.json +++ b/trains/community/whoogle/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/whoogle/1.0.20", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "0.9.0_1.0.20", "version": "1.0.20", diff --git a/trains/community/wordpress/app_versions.json b/trains/community/wordpress/app_versions.json index 3ab4900596..bb6170664a 100644 --- a/trains/community/wordpress/app_versions.json +++ b/trains/community/wordpress/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/wordpress/1.0.7", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "6.6.2_1.0.7", "version": "1.0.7", diff --git a/trains/community/zerotier/app_versions.json b/trains/community/zerotier/app_versions.json index 54283bf279..dd6d7957f6 100644 --- a/trains/community/zerotier/app_versions.json +++ b/trains/community/zerotier/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/zerotier/1.0.19", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "1.14.1_1.0.19", "version": "1.0.19", diff --git a/trains/enterprise/minio/app_versions.json b/trains/enterprise/minio/app_versions.json index 3d3b97a3f5..ee72cf4362 100644 --- a/trains/enterprise/minio/app_versions.json +++ b/trains/enterprise/minio/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/enterprise/minio/1.1.7", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "RELEASE.2024-08-26T15-33-07Z_1.1.7", "version": "1.1.7", diff --git a/trains/enterprise/syncthing/app_versions.json b/trains/enterprise/syncthing/app_versions.json index fb8741598d..68512f3b27 100644 --- a/trains/enterprise/syncthing/app_versions.json +++ b/trains/enterprise/syncthing/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/enterprise/syncthing/1.0.15", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "1.27.10_1.0.15", "version": "1.0.15", diff --git a/trains/stable/collabora/app_versions.json b/trains/stable/collabora/app_versions.json index 3f11612054..8c1b3d21cb 100644 --- a/trains/stable/collabora/app_versions.json +++ b/trains/stable/collabora/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/stable/collabora/1.1.15", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "24.04.8.2.1_1.1.15", "version": "1.1.15", diff --git a/trains/stable/diskoverdata/app_versions.json b/trains/stable/diskoverdata/app_versions.json index 48c025b22b..36e4a5dd7d 100644 --- a/trains/stable/diskoverdata/app_versions.json +++ b/trains/stable/diskoverdata/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/stable/diskoverdata/1.3.8", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "2.3.0_1.3.8", "version": "1.3.8", diff --git a/trains/stable/elastic-search/app_versions.json b/trains/stable/elastic-search/app_versions.json index d08fb08942..20775967fc 100644 --- a/trains/stable/elastic-search/app_versions.json +++ b/trains/stable/elastic-search/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/stable/elastic-search/1.1.12", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "8.15.2_1.1.12", "version": "1.1.12", diff --git a/trains/stable/emby/app_versions.json b/trains/stable/emby/app_versions.json index 82fc0458dc..88a3cef63c 100644 --- a/trains/stable/emby/app_versions.json +++ b/trains/stable/emby/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/stable/emby/1.1.13", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "4.8.10.0_1.1.13", "version": "1.1.13", diff --git a/trains/stable/home-assistant/app_versions.json b/trains/stable/home-assistant/app_versions.json index 3462087cb8..d4303e9744 100644 --- a/trains/stable/home-assistant/app_versions.json +++ b/trains/stable/home-assistant/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/stable/home-assistant/1.2.21", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "2024.10.2_1.2.21", "version": "1.2.21", diff --git a/trains/stable/ix-app/app_versions.json b/trains/stable/ix-app/app_versions.json index a8b90bd5f0..3499d77585 100644 --- a/trains/stable/ix-app/app_versions.json +++ b/trains/stable/ix-app/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/stable/ix-app/1.0.11", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "1.0.0_1.0.11", "version": "1.0.11", diff --git a/trains/stable/minio/app_versions.json b/trains/stable/minio/app_versions.json index dbdcb7a561..ff9295098e 100644 --- a/trains/stable/minio/app_versions.json +++ b/trains/stable/minio/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/stable/minio/1.1.13", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "RELEASE.2024-10-13T13-34-11Z_1.1.13", "version": "1.1.13", diff --git a/trains/stable/netdata/app_versions.json b/trains/stable/netdata/app_versions.json index 21806ab179..64e3f5b6fb 100644 --- a/trains/stable/netdata/app_versions.json +++ b/trains/stable/netdata/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/stable/netdata/1.1.14", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "v1.47.4_1.1.14", "version": "1.1.14", diff --git a/trains/stable/nextcloud/app_versions.json b/trains/stable/nextcloud/app_versions.json index ee1f0ba047..8e74cab935 100644 --- a/trains/stable/nextcloud/app_versions.json +++ b/trains/stable/nextcloud/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/stable/nextcloud/1.3.20", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "30.0.0_1.3.20", "version": "1.3.20", diff --git a/trains/stable/photoprism/app_versions.json b/trains/stable/photoprism/app_versions.json index e8398477ee..6c03ea9dcb 100644 --- a/trains/stable/photoprism/app_versions.json +++ b/trains/stable/photoprism/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/stable/photoprism/1.1.14", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "240915_1.1.14", "version": "1.1.14", diff --git a/trains/stable/pihole/app_versions.json b/trains/stable/pihole/app_versions.json index ef026035a8..b0d8b99200 100644 --- a/trains/stable/pihole/app_versions.json +++ b/trains/stable/pihole/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/stable/pihole/1.1.11", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "2024.07.0_1.1.11", "version": "1.1.11", diff --git a/trains/stable/plex/app_versions.json b/trains/stable/plex/app_versions.json index e5282243cb..c54953fd0a 100644 --- a/trains/stable/plex/app_versions.json +++ b/trains/stable/plex/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/stable/plex/1.0.23", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "1.40.2.8395-c67dce28e_1.0.23", "version": "1.0.23", diff --git a/trains/stable/prometheus/app_versions.json b/trains/stable/prometheus/app_versions.json index 1dc525f9ba..53c0567e03 100644 --- a/trains/stable/prometheus/app_versions.json +++ b/trains/stable/prometheus/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/stable/prometheus/1.1.11", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "v2.54.1_1.1.11", "version": "1.1.11", diff --git a/trains/stable/storj/app_versions.json b/trains/stable/storj/app_versions.json index df2de54e41..cb0f511ab5 100644 --- a/trains/stable/storj/app_versions.json +++ b/trains/stable/storj/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/stable/storj/1.1.10", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "6f87ea801-v1.71.2-go1.18.8_1.1.10", "version": "1.1.10", diff --git a/trains/stable/syncthing/app_versions.json b/trains/stable/syncthing/app_versions.json index 2b1d2c8148..292390f20f 100644 --- a/trains/stable/syncthing/app_versions.json +++ b/trains/stable/syncthing/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/stable/syncthing/1.0.28", - "last_update": "2024-10-16 19:06:56", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "1.28.0_1.0.28", "version": "1.0.28", diff --git a/trains/stable/wg-easy/app_versions.json b/trains/stable/wg-easy/app_versions.json index 1adf83f36c..7c9d52a33a 100644 --- a/trains/stable/wg-easy/app_versions.json +++ b/trains/stable/wg-easy/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/stable/wg-easy/1.0.20", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "14_1.0.20", "version": "1.0.20", diff --git a/trains/test/nginx/app_versions.json b/trains/test/nginx/app_versions.json index 90f28b8519..474d0f9439 100644 --- a/trains/test/nginx/app_versions.json +++ b/trains/test/nginx/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/test/nginx/1.0.6", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "v1_1.0.6", "version": "1.0.6", @@ -107,7 +107,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/test/nginx/1.0.5", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "v1_1.0.5", "version": "1.0.5", @@ -200,7 +200,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/test/nginx/1.0.4", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "v1_1.0.4", "version": "1.0.4", @@ -293,7 +293,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/test/nginx/1.0.3", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "v1_1.0.3", "version": "1.0.3", diff --git a/trains/test/other-nginx/app_versions.json b/trains/test/other-nginx/app_versions.json index f9fdbc1ffe..e95cd76aa9 100644 --- a/trains/test/other-nginx/app_versions.json +++ b/trains/test/other-nginx/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/test/other-nginx/1.0.1", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "v1_1.0.1", "version": "1.0.1", @@ -97,7 +97,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/test/other-nginx/1.0.0", - "last_update": "2024-10-16 19:05:21", + "last_update": "2024-10-16 19:36:28", "required_features": [], "human_version": "v1_1.0.0", "version": "1.0.0", From 112bcf14b9ce50d83837be54f18aebdd8f966fb2 Mon Sep 17 00:00:00 2001 From: truenasbot <113129203+truenasbot@users.noreply.github.com> Date: Thu, 17 Oct 2024 08:13:29 -0400 Subject: [PATCH 11/13] chore(deps): update updates-patch-minor (#670) Co-authored-by: bugclerk --- ix-dev/community/homer/app.yaml | 4 ++-- ix-dev/community/homer/ix_values.yaml | 2 +- ix-dev/community/nginx-proxy-manager/app.yaml | 4 ++-- ix-dev/community/nginx-proxy-manager/ix_values.yaml | 2 +- ix-dev/stable/elastic-search/app.yaml | 4 ++-- ix-dev/stable/elastic-search/ix_values.yaml | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/ix-dev/community/homer/app.yaml b/ix-dev/community/homer/app.yaml index 8f0f7dae82..4abbf26c62 100644 --- a/ix-dev/community/homer/app.yaml +++ b/ix-dev/community/homer/app.yaml @@ -1,4 +1,4 @@ -app_version: v24.05.1 +app_version: v24.10.1 capabilities: [] categories: - productivity @@ -30,4 +30,4 @@ tags: - homepage title: Homer train: community -version: 2.0.10 +version: 2.0.11 diff --git a/ix-dev/community/homer/ix_values.yaml b/ix-dev/community/homer/ix_values.yaml index fee9cee62f..014be1c94e 100644 --- a/ix-dev/community/homer/ix_values.yaml +++ b/ix-dev/community/homer/ix_values.yaml @@ -1,7 +1,7 @@ images: image: repository: b4bz/homer - tag: v24.05.1 + tag: v24.10.1 consts: homer_container_name: homer diff --git a/ix-dev/community/nginx-proxy-manager/app.yaml b/ix-dev/community/nginx-proxy-manager/app.yaml index a1b8b97dae..4882e954f1 100644 --- a/ix-dev/community/nginx-proxy-manager/app.yaml +++ b/ix-dev/community/nginx-proxy-manager/app.yaml @@ -1,4 +1,4 @@ -app_version: 2.12.0 +app_version: 2.12.1 capabilities: - description: Nginx Proxy Manager requires this ability to switch user for sub-processes. name: SETUID @@ -44,4 +44,4 @@ sources: - https://hub.docker.com/r/jc21/nginx-proxy-manager title: Nginx Proxy Manager train: community -version: 1.0.21 +version: 1.0.22 diff --git a/ix-dev/community/nginx-proxy-manager/ix_values.yaml b/ix-dev/community/nginx-proxy-manager/ix_values.yaml index 3eab502535..f5f993749a 100644 --- a/ix-dev/community/nginx-proxy-manager/ix_values.yaml +++ b/ix-dev/community/nginx-proxy-manager/ix_values.yaml @@ -1,7 +1,7 @@ images: image: repository: jc21/nginx-proxy-manager - tag: 2.12.0 + tag: 2.12.1 consts: npm_container_name: npm data_path: /data diff --git a/ix-dev/stable/elastic-search/app.yaml b/ix-dev/stable/elastic-search/app.yaml index e6c01ff439..4e0ac2e876 100644 --- a/ix-dev/stable/elastic-search/app.yaml +++ b/ix-dev/stable/elastic-search/app.yaml @@ -1,4 +1,4 @@ -app_version: 8.15.2 +app_version: 8.15.3 capabilities: [] categories: - monitoring @@ -30,4 +30,4 @@ sources: - https://www.elastic.co/guide/en/elasticsearch/reference/master/docker.html#docker-configuration-methods title: Elastic Search train: stable -version: 1.1.12 +version: 1.1.13 diff --git a/ix-dev/stable/elastic-search/ix_values.yaml b/ix-dev/stable/elastic-search/ix_values.yaml index 7df5d21f1e..c9883e9c01 100644 --- a/ix-dev/stable/elastic-search/ix_values.yaml +++ b/ix-dev/stable/elastic-search/ix_values.yaml @@ -1,7 +1,7 @@ images: image: repository: docker.elastic.co/elasticsearch/elasticsearch - tag: 8.15.2 + tag: 8.15.3 consts: perms_container_name: "permissions" From 22871cae2240c6a257fcd94e92deb5539f3a9101 Mon Sep 17 00:00:00 2001 From: sonicaj Date: Thu, 17 Oct 2024 12:14:47 +0000 Subject: [PATCH 12/13] Publish new changes in catalog [skip ci] --- trains/community/homer/{2.0.10 => 2.0.11}/README.md | 0 trains/community/homer/{2.0.10 => 2.0.11}/app.yaml | 4 ++-- trains/community/homer/{2.0.10 => 2.0.11}/ix_values.yaml | 2 +- .../{2.0.10 => 2.0.11}/migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../{2.0.10 => 2.0.11}/migrations/migration_helpers/cpu.py | 0 .../migrations/migration_helpers/dns_config.py | 0 .../migrations/migration_helpers/kubernetes_secrets.py | 0 .../{2.0.10 => 2.0.11}/migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 trains/community/homer/{2.0.10 => 2.0.11}/questions.yaml | 0 .../homer/{2.0.10 => 2.0.11}/templates/docker-compose.yaml | 0 .../templates/library/base_v1_1_4/__init__.py | 0 .../templates/library/base_v1_1_4/environment.py | 0 .../templates/library/base_v1_1_4/healthchecks.py | 0 .../templates/library/base_v1_1_4/mariadb.py | 0 .../templates/library/base_v1_1_4/metadata.py | 0 .../templates/library/base_v1_1_4/network.py | 0 .../templates/library/base_v1_1_4/permissions.py | 0 .../{2.0.10 => 2.0.11}/templates/library/base_v1_1_4/ports.py | 0 .../templates/library/base_v1_1_4/postgres.py | 0 .../{2.0.10 => 2.0.11}/templates/library/base_v1_1_4/redis.py | 0 .../templates/library/base_v1_1_4/resources.py | 0 .../templates/library/base_v1_1_4/security.py | 0 .../templates/library/base_v1_1_4/storage.py | 0 .../{2.0.10 => 2.0.11}/templates/library/base_v1_1_4/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../templates/test_values/no-assets-values.yaml | 0 .../nginx-proxy-manager/{1.0.21 => 1.0.22}/README.md | 0 .../community/nginx-proxy-manager/{1.0.21 => 1.0.22}/app.yaml | 4 ++-- .../nginx-proxy-manager/{1.0.21 => 1.0.22}/ix_values.yaml | 2 +- .../{1.0.21 => 1.0.22}/migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../{1.0.21 => 1.0.22}/migrations/migration_helpers/cpu.py | 0 .../migrations/migration_helpers/dns_config.py | 0 .../migrations/migration_helpers/kubernetes_secrets.py | 0 .../{1.0.21 => 1.0.22}/migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../nginx-proxy-manager/{1.0.21 => 1.0.22}/questions.yaml | 0 .../{1.0.21 => 1.0.22}/templates/docker-compose.yaml | 0 .../templates/library/base_v1_1_4/__init__.py | 0 .../templates/library/base_v1_1_4/environment.py | 0 .../templates/library/base_v1_1_4/healthchecks.py | 0 .../templates/library/base_v1_1_4/mariadb.py | 0 .../templates/library/base_v1_1_4/metadata.py | 0 .../templates/library/base_v1_1_4/network.py | 0 .../templates/library/base_v1_1_4/permissions.py | 0 .../{1.0.21 => 1.0.22}/templates/library/base_v1_1_4/ports.py | 0 .../templates/library/base_v1_1_4/postgres.py | 0 .../{1.0.21 => 1.0.22}/templates/library/base_v1_1_4/redis.py | 0 .../templates/library/base_v1_1_4/resources.py | 0 .../templates/library/base_v1_1_4/security.py | 0 .../templates/library/base_v1_1_4/storage.py | 0 .../{1.0.21 => 1.0.22}/templates/library/base_v1_1_4/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 trains/stable/elastic-search/{1.1.12 => 1.1.13}/README.md | 0 trains/stable/elastic-search/{1.1.12 => 1.1.13}/app.yaml | 4 ++-- .../stable/elastic-search/{1.1.12 => 1.1.13}/ix_values.yaml | 2 +- .../{1.1.12 => 1.1.13}/migrations/migrate_from_kubernetes | 0 .../migrations/migration_helpers/__init__.py | 0 .../{1.1.12 => 1.1.13}/migrations/migration_helpers/cpu.py | 0 .../migrations/migration_helpers/dns_config.py | 0 .../migrations/migration_helpers/kubernetes_secrets.py | 0 .../{1.1.12 => 1.1.13}/migrations/migration_helpers/memory.py | 0 .../migrations/migration_helpers/resources.py | 0 .../migrations/migration_helpers/storage.py | 0 .../stable/elastic-search/{1.1.12 => 1.1.13}/questions.yaml | 0 .../{1.1.12 => 1.1.13}/templates/docker-compose.yaml | 0 .../templates/library/base_v1_1_4/__init__.py | 0 .../templates/library/base_v1_1_4/environment.py | 0 .../templates/library/base_v1_1_4/healthchecks.py | 0 .../templates/library/base_v1_1_4/mariadb.py | 0 .../templates/library/base_v1_1_4/metadata.py | 0 .../templates/library/base_v1_1_4/network.py | 0 .../templates/library/base_v1_1_4/permissions.py | 0 .../{1.1.12 => 1.1.13}/templates/library/base_v1_1_4/ports.py | 0 .../templates/library/base_v1_1_4/postgres.py | 0 .../{1.1.12 => 1.1.13}/templates/library/base_v1_1_4/redis.py | 0 .../templates/library/base_v1_1_4/resources.py | 0 .../templates/library/base_v1_1_4/security.py | 0 .../templates/library/base_v1_1_4/storage.py | 0 .../{1.1.12 => 1.1.13}/templates/library/base_v1_1_4/utils.py | 0 .../templates/test_values/basic-values.yaml | 0 .../templates/test_values/https-values.yaml | 0 86 files changed, 9 insertions(+), 9 deletions(-) rename trains/community/homer/{2.0.10 => 2.0.11}/README.md (100%) rename trains/community/homer/{2.0.10 => 2.0.11}/app.yaml (95%) rename trains/community/homer/{2.0.10 => 2.0.11}/ix_values.yaml (86%) rename trains/community/homer/{2.0.10 => 2.0.11}/migrations/migrate_from_kubernetes (100%) rename trains/community/homer/{2.0.10 => 2.0.11}/migrations/migration_helpers/__init__.py (100%) rename trains/community/homer/{2.0.10 => 2.0.11}/migrations/migration_helpers/cpu.py (100%) rename trains/community/homer/{2.0.10 => 2.0.11}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/homer/{2.0.10 => 2.0.11}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/homer/{2.0.10 => 2.0.11}/migrations/migration_helpers/memory.py (100%) rename trains/community/homer/{2.0.10 => 2.0.11}/migrations/migration_helpers/resources.py (100%) rename trains/community/homer/{2.0.10 => 2.0.11}/migrations/migration_helpers/storage.py (100%) rename trains/community/homer/{2.0.10 => 2.0.11}/questions.yaml (100%) rename trains/community/homer/{2.0.10 => 2.0.11}/templates/docker-compose.yaml (100%) rename trains/community/homer/{2.0.10 => 2.0.11}/templates/library/base_v1_1_4/__init__.py (100%) rename trains/community/homer/{2.0.10 => 2.0.11}/templates/library/base_v1_1_4/environment.py (100%) rename trains/community/homer/{2.0.10 => 2.0.11}/templates/library/base_v1_1_4/healthchecks.py (100%) rename trains/community/homer/{2.0.10 => 2.0.11}/templates/library/base_v1_1_4/mariadb.py (100%) rename trains/community/homer/{2.0.10 => 2.0.11}/templates/library/base_v1_1_4/metadata.py (100%) rename trains/community/homer/{2.0.10 => 2.0.11}/templates/library/base_v1_1_4/network.py (100%) rename trains/community/homer/{2.0.10 => 2.0.11}/templates/library/base_v1_1_4/permissions.py (100%) rename trains/community/homer/{2.0.10 => 2.0.11}/templates/library/base_v1_1_4/ports.py (100%) rename trains/community/homer/{2.0.10 => 2.0.11}/templates/library/base_v1_1_4/postgres.py (100%) rename trains/community/homer/{2.0.10 => 2.0.11}/templates/library/base_v1_1_4/redis.py (100%) rename trains/community/homer/{2.0.10 => 2.0.11}/templates/library/base_v1_1_4/resources.py (100%) rename trains/community/homer/{2.0.10 => 2.0.11}/templates/library/base_v1_1_4/security.py (100%) rename trains/community/homer/{2.0.10 => 2.0.11}/templates/library/base_v1_1_4/storage.py (100%) rename trains/community/homer/{2.0.10 => 2.0.11}/templates/library/base_v1_1_4/utils.py (100%) rename trains/community/homer/{2.0.10 => 2.0.11}/templates/test_values/basic-values.yaml (100%) rename trains/community/homer/{2.0.10 => 2.0.11}/templates/test_values/no-assets-values.yaml (100%) rename trains/community/nginx-proxy-manager/{1.0.21 => 1.0.22}/README.md (100%) rename trains/community/nginx-proxy-manager/{1.0.21 => 1.0.22}/app.yaml (97%) rename trains/community/nginx-proxy-manager/{1.0.21 => 1.0.22}/ix_values.yaml (95%) rename trains/community/nginx-proxy-manager/{1.0.21 => 1.0.22}/migrations/migrate_from_kubernetes (100%) rename trains/community/nginx-proxy-manager/{1.0.21 => 1.0.22}/migrations/migration_helpers/__init__.py (100%) rename trains/community/nginx-proxy-manager/{1.0.21 => 1.0.22}/migrations/migration_helpers/cpu.py (100%) rename trains/community/nginx-proxy-manager/{1.0.21 => 1.0.22}/migrations/migration_helpers/dns_config.py (100%) rename trains/community/nginx-proxy-manager/{1.0.21 => 1.0.22}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/community/nginx-proxy-manager/{1.0.21 => 1.0.22}/migrations/migration_helpers/memory.py (100%) rename trains/community/nginx-proxy-manager/{1.0.21 => 1.0.22}/migrations/migration_helpers/resources.py (100%) rename trains/community/nginx-proxy-manager/{1.0.21 => 1.0.22}/migrations/migration_helpers/storage.py (100%) rename trains/community/nginx-proxy-manager/{1.0.21 => 1.0.22}/questions.yaml (100%) rename trains/community/nginx-proxy-manager/{1.0.21 => 1.0.22}/templates/docker-compose.yaml (100%) rename trains/community/nginx-proxy-manager/{1.0.21 => 1.0.22}/templates/library/base_v1_1_4/__init__.py (100%) rename trains/community/nginx-proxy-manager/{1.0.21 => 1.0.22}/templates/library/base_v1_1_4/environment.py (100%) rename trains/community/nginx-proxy-manager/{1.0.21 => 1.0.22}/templates/library/base_v1_1_4/healthchecks.py (100%) rename trains/community/nginx-proxy-manager/{1.0.21 => 1.0.22}/templates/library/base_v1_1_4/mariadb.py (100%) rename trains/community/nginx-proxy-manager/{1.0.21 => 1.0.22}/templates/library/base_v1_1_4/metadata.py (100%) rename trains/community/nginx-proxy-manager/{1.0.21 => 1.0.22}/templates/library/base_v1_1_4/network.py (100%) rename trains/community/nginx-proxy-manager/{1.0.21 => 1.0.22}/templates/library/base_v1_1_4/permissions.py (100%) rename trains/community/nginx-proxy-manager/{1.0.21 => 1.0.22}/templates/library/base_v1_1_4/ports.py (100%) rename trains/community/nginx-proxy-manager/{1.0.21 => 1.0.22}/templates/library/base_v1_1_4/postgres.py (100%) rename trains/community/nginx-proxy-manager/{1.0.21 => 1.0.22}/templates/library/base_v1_1_4/redis.py (100%) rename trains/community/nginx-proxy-manager/{1.0.21 => 1.0.22}/templates/library/base_v1_1_4/resources.py (100%) rename trains/community/nginx-proxy-manager/{1.0.21 => 1.0.22}/templates/library/base_v1_1_4/security.py (100%) rename trains/community/nginx-proxy-manager/{1.0.21 => 1.0.22}/templates/library/base_v1_1_4/storage.py (100%) rename trains/community/nginx-proxy-manager/{1.0.21 => 1.0.22}/templates/library/base_v1_1_4/utils.py (100%) rename trains/community/nginx-proxy-manager/{1.0.21 => 1.0.22}/templates/test_values/basic-values.yaml (100%) rename trains/stable/elastic-search/{1.1.12 => 1.1.13}/README.md (100%) rename trains/stable/elastic-search/{1.1.12 => 1.1.13}/app.yaml (96%) rename trains/stable/elastic-search/{1.1.12 => 1.1.13}/ix_values.yaml (96%) rename trains/stable/elastic-search/{1.1.12 => 1.1.13}/migrations/migrate_from_kubernetes (100%) rename trains/stable/elastic-search/{1.1.12 => 1.1.13}/migrations/migration_helpers/__init__.py (100%) rename trains/stable/elastic-search/{1.1.12 => 1.1.13}/migrations/migration_helpers/cpu.py (100%) rename trains/stable/elastic-search/{1.1.12 => 1.1.13}/migrations/migration_helpers/dns_config.py (100%) rename trains/stable/elastic-search/{1.1.12 => 1.1.13}/migrations/migration_helpers/kubernetes_secrets.py (100%) rename trains/stable/elastic-search/{1.1.12 => 1.1.13}/migrations/migration_helpers/memory.py (100%) rename trains/stable/elastic-search/{1.1.12 => 1.1.13}/migrations/migration_helpers/resources.py (100%) rename trains/stable/elastic-search/{1.1.12 => 1.1.13}/migrations/migration_helpers/storage.py (100%) rename trains/stable/elastic-search/{1.1.12 => 1.1.13}/questions.yaml (100%) rename trains/stable/elastic-search/{1.1.12 => 1.1.13}/templates/docker-compose.yaml (100%) rename trains/stable/elastic-search/{1.1.12 => 1.1.13}/templates/library/base_v1_1_4/__init__.py (100%) rename trains/stable/elastic-search/{1.1.12 => 1.1.13}/templates/library/base_v1_1_4/environment.py (100%) rename trains/stable/elastic-search/{1.1.12 => 1.1.13}/templates/library/base_v1_1_4/healthchecks.py (100%) rename trains/stable/elastic-search/{1.1.12 => 1.1.13}/templates/library/base_v1_1_4/mariadb.py (100%) rename trains/stable/elastic-search/{1.1.12 => 1.1.13}/templates/library/base_v1_1_4/metadata.py (100%) rename trains/stable/elastic-search/{1.1.12 => 1.1.13}/templates/library/base_v1_1_4/network.py (100%) rename trains/stable/elastic-search/{1.1.12 => 1.1.13}/templates/library/base_v1_1_4/permissions.py (100%) rename trains/stable/elastic-search/{1.1.12 => 1.1.13}/templates/library/base_v1_1_4/ports.py (100%) rename trains/stable/elastic-search/{1.1.12 => 1.1.13}/templates/library/base_v1_1_4/postgres.py (100%) rename trains/stable/elastic-search/{1.1.12 => 1.1.13}/templates/library/base_v1_1_4/redis.py (100%) rename trains/stable/elastic-search/{1.1.12 => 1.1.13}/templates/library/base_v1_1_4/resources.py (100%) rename trains/stable/elastic-search/{1.1.12 => 1.1.13}/templates/library/base_v1_1_4/security.py (100%) rename trains/stable/elastic-search/{1.1.12 => 1.1.13}/templates/library/base_v1_1_4/storage.py (100%) rename trains/stable/elastic-search/{1.1.12 => 1.1.13}/templates/library/base_v1_1_4/utils.py (100%) rename trains/stable/elastic-search/{1.1.12 => 1.1.13}/templates/test_values/basic-values.yaml (100%) rename trains/stable/elastic-search/{1.1.12 => 1.1.13}/templates/test_values/https-values.yaml (100%) diff --git a/trains/community/homer/2.0.10/README.md b/trains/community/homer/2.0.11/README.md similarity index 100% rename from trains/community/homer/2.0.10/README.md rename to trains/community/homer/2.0.11/README.md diff --git a/trains/community/homer/2.0.10/app.yaml b/trains/community/homer/2.0.11/app.yaml similarity index 95% rename from trains/community/homer/2.0.10/app.yaml rename to trains/community/homer/2.0.11/app.yaml index 8f0f7dae82..4abbf26c62 100644 --- a/trains/community/homer/2.0.10/app.yaml +++ b/trains/community/homer/2.0.11/app.yaml @@ -1,4 +1,4 @@ -app_version: v24.05.1 +app_version: v24.10.1 capabilities: [] categories: - productivity @@ -30,4 +30,4 @@ tags: - homepage title: Homer train: community -version: 2.0.10 +version: 2.0.11 diff --git a/trains/community/homer/2.0.10/ix_values.yaml b/trains/community/homer/2.0.11/ix_values.yaml similarity index 86% rename from trains/community/homer/2.0.10/ix_values.yaml rename to trains/community/homer/2.0.11/ix_values.yaml index fee9cee62f..014be1c94e 100644 --- a/trains/community/homer/2.0.10/ix_values.yaml +++ b/trains/community/homer/2.0.11/ix_values.yaml @@ -1,7 +1,7 @@ images: image: repository: b4bz/homer - tag: v24.05.1 + tag: v24.10.1 consts: homer_container_name: homer diff --git a/trains/community/homer/2.0.10/migrations/migrate_from_kubernetes b/trains/community/homer/2.0.11/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/homer/2.0.10/migrations/migrate_from_kubernetes rename to trains/community/homer/2.0.11/migrations/migrate_from_kubernetes diff --git a/trains/community/homer/2.0.10/migrations/migration_helpers/__init__.py b/trains/community/homer/2.0.11/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/homer/2.0.10/migrations/migration_helpers/__init__.py rename to trains/community/homer/2.0.11/migrations/migration_helpers/__init__.py diff --git a/trains/community/homer/2.0.10/migrations/migration_helpers/cpu.py b/trains/community/homer/2.0.11/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/homer/2.0.10/migrations/migration_helpers/cpu.py rename to trains/community/homer/2.0.11/migrations/migration_helpers/cpu.py diff --git a/trains/community/homer/2.0.10/migrations/migration_helpers/dns_config.py b/trains/community/homer/2.0.11/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/homer/2.0.10/migrations/migration_helpers/dns_config.py rename to trains/community/homer/2.0.11/migrations/migration_helpers/dns_config.py diff --git a/trains/community/homer/2.0.10/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/homer/2.0.11/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/homer/2.0.10/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/homer/2.0.11/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/homer/2.0.10/migrations/migration_helpers/memory.py b/trains/community/homer/2.0.11/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/homer/2.0.10/migrations/migration_helpers/memory.py rename to trains/community/homer/2.0.11/migrations/migration_helpers/memory.py diff --git a/trains/community/homer/2.0.10/migrations/migration_helpers/resources.py b/trains/community/homer/2.0.11/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/homer/2.0.10/migrations/migration_helpers/resources.py rename to trains/community/homer/2.0.11/migrations/migration_helpers/resources.py diff --git a/trains/community/homer/2.0.10/migrations/migration_helpers/storage.py b/trains/community/homer/2.0.11/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/homer/2.0.10/migrations/migration_helpers/storage.py rename to trains/community/homer/2.0.11/migrations/migration_helpers/storage.py diff --git a/trains/community/homer/2.0.10/questions.yaml b/trains/community/homer/2.0.11/questions.yaml similarity index 100% rename from trains/community/homer/2.0.10/questions.yaml rename to trains/community/homer/2.0.11/questions.yaml diff --git a/trains/community/homer/2.0.10/templates/docker-compose.yaml b/trains/community/homer/2.0.11/templates/docker-compose.yaml similarity index 100% rename from trains/community/homer/2.0.10/templates/docker-compose.yaml rename to trains/community/homer/2.0.11/templates/docker-compose.yaml diff --git a/trains/community/homer/2.0.10/templates/library/base_v1_1_4/__init__.py b/trains/community/homer/2.0.11/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/homer/2.0.10/templates/library/base_v1_1_4/__init__.py rename to trains/community/homer/2.0.11/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/homer/2.0.10/templates/library/base_v1_1_4/environment.py b/trains/community/homer/2.0.11/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/homer/2.0.10/templates/library/base_v1_1_4/environment.py rename to trains/community/homer/2.0.11/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/homer/2.0.10/templates/library/base_v1_1_4/healthchecks.py b/trains/community/homer/2.0.11/templates/library/base_v1_1_4/healthchecks.py similarity index 100% rename from trains/community/homer/2.0.10/templates/library/base_v1_1_4/healthchecks.py rename to trains/community/homer/2.0.11/templates/library/base_v1_1_4/healthchecks.py diff --git a/trains/community/homer/2.0.10/templates/library/base_v1_1_4/mariadb.py b/trains/community/homer/2.0.11/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/homer/2.0.10/templates/library/base_v1_1_4/mariadb.py rename to trains/community/homer/2.0.11/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/homer/2.0.10/templates/library/base_v1_1_4/metadata.py b/trains/community/homer/2.0.11/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/homer/2.0.10/templates/library/base_v1_1_4/metadata.py rename to trains/community/homer/2.0.11/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/homer/2.0.10/templates/library/base_v1_1_4/network.py b/trains/community/homer/2.0.11/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/homer/2.0.10/templates/library/base_v1_1_4/network.py rename to trains/community/homer/2.0.11/templates/library/base_v1_1_4/network.py diff --git a/trains/community/homer/2.0.10/templates/library/base_v1_1_4/permissions.py b/trains/community/homer/2.0.11/templates/library/base_v1_1_4/permissions.py similarity index 100% rename from trains/community/homer/2.0.10/templates/library/base_v1_1_4/permissions.py rename to trains/community/homer/2.0.11/templates/library/base_v1_1_4/permissions.py diff --git a/trains/community/homer/2.0.10/templates/library/base_v1_1_4/ports.py b/trains/community/homer/2.0.11/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/homer/2.0.10/templates/library/base_v1_1_4/ports.py rename to trains/community/homer/2.0.11/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/homer/2.0.10/templates/library/base_v1_1_4/postgres.py b/trains/community/homer/2.0.11/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/homer/2.0.10/templates/library/base_v1_1_4/postgres.py rename to trains/community/homer/2.0.11/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/homer/2.0.10/templates/library/base_v1_1_4/redis.py b/trains/community/homer/2.0.11/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/homer/2.0.10/templates/library/base_v1_1_4/redis.py rename to trains/community/homer/2.0.11/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/homer/2.0.10/templates/library/base_v1_1_4/resources.py b/trains/community/homer/2.0.11/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/homer/2.0.10/templates/library/base_v1_1_4/resources.py rename to trains/community/homer/2.0.11/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/homer/2.0.10/templates/library/base_v1_1_4/security.py b/trains/community/homer/2.0.11/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/homer/2.0.10/templates/library/base_v1_1_4/security.py rename to trains/community/homer/2.0.11/templates/library/base_v1_1_4/security.py diff --git a/trains/community/homer/2.0.10/templates/library/base_v1_1_4/storage.py b/trains/community/homer/2.0.11/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/homer/2.0.10/templates/library/base_v1_1_4/storage.py rename to trains/community/homer/2.0.11/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/homer/2.0.10/templates/library/base_v1_1_4/utils.py b/trains/community/homer/2.0.11/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/homer/2.0.10/templates/library/base_v1_1_4/utils.py rename to trains/community/homer/2.0.11/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/homer/2.0.10/templates/test_values/basic-values.yaml b/trains/community/homer/2.0.11/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/homer/2.0.10/templates/test_values/basic-values.yaml rename to trains/community/homer/2.0.11/templates/test_values/basic-values.yaml diff --git a/trains/community/homer/2.0.10/templates/test_values/no-assets-values.yaml b/trains/community/homer/2.0.11/templates/test_values/no-assets-values.yaml similarity index 100% rename from trains/community/homer/2.0.10/templates/test_values/no-assets-values.yaml rename to trains/community/homer/2.0.11/templates/test_values/no-assets-values.yaml diff --git a/trains/community/nginx-proxy-manager/1.0.21/README.md b/trains/community/nginx-proxy-manager/1.0.22/README.md similarity index 100% rename from trains/community/nginx-proxy-manager/1.0.21/README.md rename to trains/community/nginx-proxy-manager/1.0.22/README.md diff --git a/trains/community/nginx-proxy-manager/1.0.21/app.yaml b/trains/community/nginx-proxy-manager/1.0.22/app.yaml similarity index 97% rename from trains/community/nginx-proxy-manager/1.0.21/app.yaml rename to trains/community/nginx-proxy-manager/1.0.22/app.yaml index a1b8b97dae..4882e954f1 100644 --- a/trains/community/nginx-proxy-manager/1.0.21/app.yaml +++ b/trains/community/nginx-proxy-manager/1.0.22/app.yaml @@ -1,4 +1,4 @@ -app_version: 2.12.0 +app_version: 2.12.1 capabilities: - description: Nginx Proxy Manager requires this ability to switch user for sub-processes. name: SETUID @@ -44,4 +44,4 @@ sources: - https://hub.docker.com/r/jc21/nginx-proxy-manager title: Nginx Proxy Manager train: community -version: 1.0.21 +version: 1.0.22 diff --git a/trains/community/nginx-proxy-manager/1.0.21/ix_values.yaml b/trains/community/nginx-proxy-manager/1.0.22/ix_values.yaml similarity index 95% rename from trains/community/nginx-proxy-manager/1.0.21/ix_values.yaml rename to trains/community/nginx-proxy-manager/1.0.22/ix_values.yaml index 3eab502535..f5f993749a 100644 --- a/trains/community/nginx-proxy-manager/1.0.21/ix_values.yaml +++ b/trains/community/nginx-proxy-manager/1.0.22/ix_values.yaml @@ -1,7 +1,7 @@ images: image: repository: jc21/nginx-proxy-manager - tag: 2.12.0 + tag: 2.12.1 consts: npm_container_name: npm data_path: /data diff --git a/trains/community/nginx-proxy-manager/1.0.21/migrations/migrate_from_kubernetes b/trains/community/nginx-proxy-manager/1.0.22/migrations/migrate_from_kubernetes similarity index 100% rename from trains/community/nginx-proxy-manager/1.0.21/migrations/migrate_from_kubernetes rename to trains/community/nginx-proxy-manager/1.0.22/migrations/migrate_from_kubernetes diff --git a/trains/community/nginx-proxy-manager/1.0.21/migrations/migration_helpers/__init__.py b/trains/community/nginx-proxy-manager/1.0.22/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/community/nginx-proxy-manager/1.0.21/migrations/migration_helpers/__init__.py rename to trains/community/nginx-proxy-manager/1.0.22/migrations/migration_helpers/__init__.py diff --git a/trains/community/nginx-proxy-manager/1.0.21/migrations/migration_helpers/cpu.py b/trains/community/nginx-proxy-manager/1.0.22/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/community/nginx-proxy-manager/1.0.21/migrations/migration_helpers/cpu.py rename to trains/community/nginx-proxy-manager/1.0.22/migrations/migration_helpers/cpu.py diff --git a/trains/community/nginx-proxy-manager/1.0.21/migrations/migration_helpers/dns_config.py b/trains/community/nginx-proxy-manager/1.0.22/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/community/nginx-proxy-manager/1.0.21/migrations/migration_helpers/dns_config.py rename to trains/community/nginx-proxy-manager/1.0.22/migrations/migration_helpers/dns_config.py diff --git a/trains/community/nginx-proxy-manager/1.0.21/migrations/migration_helpers/kubernetes_secrets.py b/trains/community/nginx-proxy-manager/1.0.22/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/community/nginx-proxy-manager/1.0.21/migrations/migration_helpers/kubernetes_secrets.py rename to trains/community/nginx-proxy-manager/1.0.22/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/community/nginx-proxy-manager/1.0.21/migrations/migration_helpers/memory.py b/trains/community/nginx-proxy-manager/1.0.22/migrations/migration_helpers/memory.py similarity index 100% rename from trains/community/nginx-proxy-manager/1.0.21/migrations/migration_helpers/memory.py rename to trains/community/nginx-proxy-manager/1.0.22/migrations/migration_helpers/memory.py diff --git a/trains/community/nginx-proxy-manager/1.0.21/migrations/migration_helpers/resources.py b/trains/community/nginx-proxy-manager/1.0.22/migrations/migration_helpers/resources.py similarity index 100% rename from trains/community/nginx-proxy-manager/1.0.21/migrations/migration_helpers/resources.py rename to trains/community/nginx-proxy-manager/1.0.22/migrations/migration_helpers/resources.py diff --git a/trains/community/nginx-proxy-manager/1.0.21/migrations/migration_helpers/storage.py b/trains/community/nginx-proxy-manager/1.0.22/migrations/migration_helpers/storage.py similarity index 100% rename from trains/community/nginx-proxy-manager/1.0.21/migrations/migration_helpers/storage.py rename to trains/community/nginx-proxy-manager/1.0.22/migrations/migration_helpers/storage.py diff --git a/trains/community/nginx-proxy-manager/1.0.21/questions.yaml b/trains/community/nginx-proxy-manager/1.0.22/questions.yaml similarity index 100% rename from trains/community/nginx-proxy-manager/1.0.21/questions.yaml rename to trains/community/nginx-proxy-manager/1.0.22/questions.yaml diff --git a/trains/community/nginx-proxy-manager/1.0.21/templates/docker-compose.yaml b/trains/community/nginx-proxy-manager/1.0.22/templates/docker-compose.yaml similarity index 100% rename from trains/community/nginx-proxy-manager/1.0.21/templates/docker-compose.yaml rename to trains/community/nginx-proxy-manager/1.0.22/templates/docker-compose.yaml diff --git a/trains/community/nginx-proxy-manager/1.0.21/templates/library/base_v1_1_4/__init__.py b/trains/community/nginx-proxy-manager/1.0.22/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/community/nginx-proxy-manager/1.0.21/templates/library/base_v1_1_4/__init__.py rename to trains/community/nginx-proxy-manager/1.0.22/templates/library/base_v1_1_4/__init__.py diff --git a/trains/community/nginx-proxy-manager/1.0.21/templates/library/base_v1_1_4/environment.py b/trains/community/nginx-proxy-manager/1.0.22/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/community/nginx-proxy-manager/1.0.21/templates/library/base_v1_1_4/environment.py rename to trains/community/nginx-proxy-manager/1.0.22/templates/library/base_v1_1_4/environment.py diff --git a/trains/community/nginx-proxy-manager/1.0.21/templates/library/base_v1_1_4/healthchecks.py b/trains/community/nginx-proxy-manager/1.0.22/templates/library/base_v1_1_4/healthchecks.py similarity index 100% rename from trains/community/nginx-proxy-manager/1.0.21/templates/library/base_v1_1_4/healthchecks.py rename to trains/community/nginx-proxy-manager/1.0.22/templates/library/base_v1_1_4/healthchecks.py diff --git a/trains/community/nginx-proxy-manager/1.0.21/templates/library/base_v1_1_4/mariadb.py b/trains/community/nginx-proxy-manager/1.0.22/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/community/nginx-proxy-manager/1.0.21/templates/library/base_v1_1_4/mariadb.py rename to trains/community/nginx-proxy-manager/1.0.22/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/community/nginx-proxy-manager/1.0.21/templates/library/base_v1_1_4/metadata.py b/trains/community/nginx-proxy-manager/1.0.22/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/community/nginx-proxy-manager/1.0.21/templates/library/base_v1_1_4/metadata.py rename to trains/community/nginx-proxy-manager/1.0.22/templates/library/base_v1_1_4/metadata.py diff --git a/trains/community/nginx-proxy-manager/1.0.21/templates/library/base_v1_1_4/network.py b/trains/community/nginx-proxy-manager/1.0.22/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/community/nginx-proxy-manager/1.0.21/templates/library/base_v1_1_4/network.py rename to trains/community/nginx-proxy-manager/1.0.22/templates/library/base_v1_1_4/network.py diff --git a/trains/community/nginx-proxy-manager/1.0.21/templates/library/base_v1_1_4/permissions.py b/trains/community/nginx-proxy-manager/1.0.22/templates/library/base_v1_1_4/permissions.py similarity index 100% rename from trains/community/nginx-proxy-manager/1.0.21/templates/library/base_v1_1_4/permissions.py rename to trains/community/nginx-proxy-manager/1.0.22/templates/library/base_v1_1_4/permissions.py diff --git a/trains/community/nginx-proxy-manager/1.0.21/templates/library/base_v1_1_4/ports.py b/trains/community/nginx-proxy-manager/1.0.22/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/community/nginx-proxy-manager/1.0.21/templates/library/base_v1_1_4/ports.py rename to trains/community/nginx-proxy-manager/1.0.22/templates/library/base_v1_1_4/ports.py diff --git a/trains/community/nginx-proxy-manager/1.0.21/templates/library/base_v1_1_4/postgres.py b/trains/community/nginx-proxy-manager/1.0.22/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/community/nginx-proxy-manager/1.0.21/templates/library/base_v1_1_4/postgres.py rename to trains/community/nginx-proxy-manager/1.0.22/templates/library/base_v1_1_4/postgres.py diff --git a/trains/community/nginx-proxy-manager/1.0.21/templates/library/base_v1_1_4/redis.py b/trains/community/nginx-proxy-manager/1.0.22/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/community/nginx-proxy-manager/1.0.21/templates/library/base_v1_1_4/redis.py rename to trains/community/nginx-proxy-manager/1.0.22/templates/library/base_v1_1_4/redis.py diff --git a/trains/community/nginx-proxy-manager/1.0.21/templates/library/base_v1_1_4/resources.py b/trains/community/nginx-proxy-manager/1.0.22/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/community/nginx-proxy-manager/1.0.21/templates/library/base_v1_1_4/resources.py rename to trains/community/nginx-proxy-manager/1.0.22/templates/library/base_v1_1_4/resources.py diff --git a/trains/community/nginx-proxy-manager/1.0.21/templates/library/base_v1_1_4/security.py b/trains/community/nginx-proxy-manager/1.0.22/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/community/nginx-proxy-manager/1.0.21/templates/library/base_v1_1_4/security.py rename to trains/community/nginx-proxy-manager/1.0.22/templates/library/base_v1_1_4/security.py diff --git a/trains/community/nginx-proxy-manager/1.0.21/templates/library/base_v1_1_4/storage.py b/trains/community/nginx-proxy-manager/1.0.22/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/community/nginx-proxy-manager/1.0.21/templates/library/base_v1_1_4/storage.py rename to trains/community/nginx-proxy-manager/1.0.22/templates/library/base_v1_1_4/storage.py diff --git a/trains/community/nginx-proxy-manager/1.0.21/templates/library/base_v1_1_4/utils.py b/trains/community/nginx-proxy-manager/1.0.22/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/community/nginx-proxy-manager/1.0.21/templates/library/base_v1_1_4/utils.py rename to trains/community/nginx-proxy-manager/1.0.22/templates/library/base_v1_1_4/utils.py diff --git a/trains/community/nginx-proxy-manager/1.0.21/templates/test_values/basic-values.yaml b/trains/community/nginx-proxy-manager/1.0.22/templates/test_values/basic-values.yaml similarity index 100% rename from trains/community/nginx-proxy-manager/1.0.21/templates/test_values/basic-values.yaml rename to trains/community/nginx-proxy-manager/1.0.22/templates/test_values/basic-values.yaml diff --git a/trains/stable/elastic-search/1.1.12/README.md b/trains/stable/elastic-search/1.1.13/README.md similarity index 100% rename from trains/stable/elastic-search/1.1.12/README.md rename to trains/stable/elastic-search/1.1.13/README.md diff --git a/trains/stable/elastic-search/1.1.12/app.yaml b/trains/stable/elastic-search/1.1.13/app.yaml similarity index 96% rename from trains/stable/elastic-search/1.1.12/app.yaml rename to trains/stable/elastic-search/1.1.13/app.yaml index e6c01ff439..4e0ac2e876 100644 --- a/trains/stable/elastic-search/1.1.12/app.yaml +++ b/trains/stable/elastic-search/1.1.13/app.yaml @@ -1,4 +1,4 @@ -app_version: 8.15.2 +app_version: 8.15.3 capabilities: [] categories: - monitoring @@ -30,4 +30,4 @@ sources: - https://www.elastic.co/guide/en/elasticsearch/reference/master/docker.html#docker-configuration-methods title: Elastic Search train: stable -version: 1.1.12 +version: 1.1.13 diff --git a/trains/stable/elastic-search/1.1.12/ix_values.yaml b/trains/stable/elastic-search/1.1.13/ix_values.yaml similarity index 96% rename from trains/stable/elastic-search/1.1.12/ix_values.yaml rename to trains/stable/elastic-search/1.1.13/ix_values.yaml index 7df5d21f1e..c9883e9c01 100644 --- a/trains/stable/elastic-search/1.1.12/ix_values.yaml +++ b/trains/stable/elastic-search/1.1.13/ix_values.yaml @@ -1,7 +1,7 @@ images: image: repository: docker.elastic.co/elasticsearch/elasticsearch - tag: 8.15.2 + tag: 8.15.3 consts: perms_container_name: "permissions" diff --git a/trains/stable/elastic-search/1.1.12/migrations/migrate_from_kubernetes b/trains/stable/elastic-search/1.1.13/migrations/migrate_from_kubernetes similarity index 100% rename from trains/stable/elastic-search/1.1.12/migrations/migrate_from_kubernetes rename to trains/stable/elastic-search/1.1.13/migrations/migrate_from_kubernetes diff --git a/trains/stable/elastic-search/1.1.12/migrations/migration_helpers/__init__.py b/trains/stable/elastic-search/1.1.13/migrations/migration_helpers/__init__.py similarity index 100% rename from trains/stable/elastic-search/1.1.12/migrations/migration_helpers/__init__.py rename to trains/stable/elastic-search/1.1.13/migrations/migration_helpers/__init__.py diff --git a/trains/stable/elastic-search/1.1.12/migrations/migration_helpers/cpu.py b/trains/stable/elastic-search/1.1.13/migrations/migration_helpers/cpu.py similarity index 100% rename from trains/stable/elastic-search/1.1.12/migrations/migration_helpers/cpu.py rename to trains/stable/elastic-search/1.1.13/migrations/migration_helpers/cpu.py diff --git a/trains/stable/elastic-search/1.1.12/migrations/migration_helpers/dns_config.py b/trains/stable/elastic-search/1.1.13/migrations/migration_helpers/dns_config.py similarity index 100% rename from trains/stable/elastic-search/1.1.12/migrations/migration_helpers/dns_config.py rename to trains/stable/elastic-search/1.1.13/migrations/migration_helpers/dns_config.py diff --git a/trains/stable/elastic-search/1.1.12/migrations/migration_helpers/kubernetes_secrets.py b/trains/stable/elastic-search/1.1.13/migrations/migration_helpers/kubernetes_secrets.py similarity index 100% rename from trains/stable/elastic-search/1.1.12/migrations/migration_helpers/kubernetes_secrets.py rename to trains/stable/elastic-search/1.1.13/migrations/migration_helpers/kubernetes_secrets.py diff --git a/trains/stable/elastic-search/1.1.12/migrations/migration_helpers/memory.py b/trains/stable/elastic-search/1.1.13/migrations/migration_helpers/memory.py similarity index 100% rename from trains/stable/elastic-search/1.1.12/migrations/migration_helpers/memory.py rename to trains/stable/elastic-search/1.1.13/migrations/migration_helpers/memory.py diff --git a/trains/stable/elastic-search/1.1.12/migrations/migration_helpers/resources.py b/trains/stable/elastic-search/1.1.13/migrations/migration_helpers/resources.py similarity index 100% rename from trains/stable/elastic-search/1.1.12/migrations/migration_helpers/resources.py rename to trains/stable/elastic-search/1.1.13/migrations/migration_helpers/resources.py diff --git a/trains/stable/elastic-search/1.1.12/migrations/migration_helpers/storage.py b/trains/stable/elastic-search/1.1.13/migrations/migration_helpers/storage.py similarity index 100% rename from trains/stable/elastic-search/1.1.12/migrations/migration_helpers/storage.py rename to trains/stable/elastic-search/1.1.13/migrations/migration_helpers/storage.py diff --git a/trains/stable/elastic-search/1.1.12/questions.yaml b/trains/stable/elastic-search/1.1.13/questions.yaml similarity index 100% rename from trains/stable/elastic-search/1.1.12/questions.yaml rename to trains/stable/elastic-search/1.1.13/questions.yaml diff --git a/trains/stable/elastic-search/1.1.12/templates/docker-compose.yaml b/trains/stable/elastic-search/1.1.13/templates/docker-compose.yaml similarity index 100% rename from trains/stable/elastic-search/1.1.12/templates/docker-compose.yaml rename to trains/stable/elastic-search/1.1.13/templates/docker-compose.yaml diff --git a/trains/stable/elastic-search/1.1.12/templates/library/base_v1_1_4/__init__.py b/trains/stable/elastic-search/1.1.13/templates/library/base_v1_1_4/__init__.py similarity index 100% rename from trains/stable/elastic-search/1.1.12/templates/library/base_v1_1_4/__init__.py rename to trains/stable/elastic-search/1.1.13/templates/library/base_v1_1_4/__init__.py diff --git a/trains/stable/elastic-search/1.1.12/templates/library/base_v1_1_4/environment.py b/trains/stable/elastic-search/1.1.13/templates/library/base_v1_1_4/environment.py similarity index 100% rename from trains/stable/elastic-search/1.1.12/templates/library/base_v1_1_4/environment.py rename to trains/stable/elastic-search/1.1.13/templates/library/base_v1_1_4/environment.py diff --git a/trains/stable/elastic-search/1.1.12/templates/library/base_v1_1_4/healthchecks.py b/trains/stable/elastic-search/1.1.13/templates/library/base_v1_1_4/healthchecks.py similarity index 100% rename from trains/stable/elastic-search/1.1.12/templates/library/base_v1_1_4/healthchecks.py rename to trains/stable/elastic-search/1.1.13/templates/library/base_v1_1_4/healthchecks.py diff --git a/trains/stable/elastic-search/1.1.12/templates/library/base_v1_1_4/mariadb.py b/trains/stable/elastic-search/1.1.13/templates/library/base_v1_1_4/mariadb.py similarity index 100% rename from trains/stable/elastic-search/1.1.12/templates/library/base_v1_1_4/mariadb.py rename to trains/stable/elastic-search/1.1.13/templates/library/base_v1_1_4/mariadb.py diff --git a/trains/stable/elastic-search/1.1.12/templates/library/base_v1_1_4/metadata.py b/trains/stable/elastic-search/1.1.13/templates/library/base_v1_1_4/metadata.py similarity index 100% rename from trains/stable/elastic-search/1.1.12/templates/library/base_v1_1_4/metadata.py rename to trains/stable/elastic-search/1.1.13/templates/library/base_v1_1_4/metadata.py diff --git a/trains/stable/elastic-search/1.1.12/templates/library/base_v1_1_4/network.py b/trains/stable/elastic-search/1.1.13/templates/library/base_v1_1_4/network.py similarity index 100% rename from trains/stable/elastic-search/1.1.12/templates/library/base_v1_1_4/network.py rename to trains/stable/elastic-search/1.1.13/templates/library/base_v1_1_4/network.py diff --git a/trains/stable/elastic-search/1.1.12/templates/library/base_v1_1_4/permissions.py b/trains/stable/elastic-search/1.1.13/templates/library/base_v1_1_4/permissions.py similarity index 100% rename from trains/stable/elastic-search/1.1.12/templates/library/base_v1_1_4/permissions.py rename to trains/stable/elastic-search/1.1.13/templates/library/base_v1_1_4/permissions.py diff --git a/trains/stable/elastic-search/1.1.12/templates/library/base_v1_1_4/ports.py b/trains/stable/elastic-search/1.1.13/templates/library/base_v1_1_4/ports.py similarity index 100% rename from trains/stable/elastic-search/1.1.12/templates/library/base_v1_1_4/ports.py rename to trains/stable/elastic-search/1.1.13/templates/library/base_v1_1_4/ports.py diff --git a/trains/stable/elastic-search/1.1.12/templates/library/base_v1_1_4/postgres.py b/trains/stable/elastic-search/1.1.13/templates/library/base_v1_1_4/postgres.py similarity index 100% rename from trains/stable/elastic-search/1.1.12/templates/library/base_v1_1_4/postgres.py rename to trains/stable/elastic-search/1.1.13/templates/library/base_v1_1_4/postgres.py diff --git a/trains/stable/elastic-search/1.1.12/templates/library/base_v1_1_4/redis.py b/trains/stable/elastic-search/1.1.13/templates/library/base_v1_1_4/redis.py similarity index 100% rename from trains/stable/elastic-search/1.1.12/templates/library/base_v1_1_4/redis.py rename to trains/stable/elastic-search/1.1.13/templates/library/base_v1_1_4/redis.py diff --git a/trains/stable/elastic-search/1.1.12/templates/library/base_v1_1_4/resources.py b/trains/stable/elastic-search/1.1.13/templates/library/base_v1_1_4/resources.py similarity index 100% rename from trains/stable/elastic-search/1.1.12/templates/library/base_v1_1_4/resources.py rename to trains/stable/elastic-search/1.1.13/templates/library/base_v1_1_4/resources.py diff --git a/trains/stable/elastic-search/1.1.12/templates/library/base_v1_1_4/security.py b/trains/stable/elastic-search/1.1.13/templates/library/base_v1_1_4/security.py similarity index 100% rename from trains/stable/elastic-search/1.1.12/templates/library/base_v1_1_4/security.py rename to trains/stable/elastic-search/1.1.13/templates/library/base_v1_1_4/security.py diff --git a/trains/stable/elastic-search/1.1.12/templates/library/base_v1_1_4/storage.py b/trains/stable/elastic-search/1.1.13/templates/library/base_v1_1_4/storage.py similarity index 100% rename from trains/stable/elastic-search/1.1.12/templates/library/base_v1_1_4/storage.py rename to trains/stable/elastic-search/1.1.13/templates/library/base_v1_1_4/storage.py diff --git a/trains/stable/elastic-search/1.1.12/templates/library/base_v1_1_4/utils.py b/trains/stable/elastic-search/1.1.13/templates/library/base_v1_1_4/utils.py similarity index 100% rename from trains/stable/elastic-search/1.1.12/templates/library/base_v1_1_4/utils.py rename to trains/stable/elastic-search/1.1.13/templates/library/base_v1_1_4/utils.py diff --git a/trains/stable/elastic-search/1.1.12/templates/test_values/basic-values.yaml b/trains/stable/elastic-search/1.1.13/templates/test_values/basic-values.yaml similarity index 100% rename from trains/stable/elastic-search/1.1.12/templates/test_values/basic-values.yaml rename to trains/stable/elastic-search/1.1.13/templates/test_values/basic-values.yaml diff --git a/trains/stable/elastic-search/1.1.12/templates/test_values/https-values.yaml b/trains/stable/elastic-search/1.1.13/templates/test_values/https-values.yaml similarity index 100% rename from trains/stable/elastic-search/1.1.12/templates/test_values/https-values.yaml rename to trains/stable/elastic-search/1.1.13/templates/test_values/https-values.yaml From 9fc6795906e8909c9d7ad14cd3b991dba2bf264e Mon Sep 17 00:00:00 2001 From: sonicaj Date: Thu, 17 Oct 2024 12:15:10 +0000 Subject: [PATCH 13/13] Update catalog changes [skip ci] --- catalog.json | 246 +++++++++--------- .../community/actual-budget/app_versions.json | 2 +- .../community/adguard-home/app_versions.json | 2 +- .../audiobookshelf/app_versions.json | 2 +- trains/community/autobrr/app_versions.json | 2 +- trains/community/bazarr/app_versions.json | 2 +- .../community/briefkasten/app_versions.json | 2 +- trains/community/castopod/app_versions.json | 2 +- trains/community/chia/app_versions.json | 2 +- trains/community/clamav/app_versions.json | 2 +- .../community/cloudflared/app_versions.json | 2 +- trains/community/dashy/app_versions.json | 2 +- .../community/ddns-updater/app_versions.json | 2 +- trains/community/deluge/app_versions.json | 2 +- .../community/distribution/app_versions.json | 2 +- trains/community/dockge/app_versions.json | 2 +- trains/community/drawio/app_versions.json | 2 +- .../community/filebrowser/app_versions.json | 2 +- .../community/firefly-iii/app_versions.json | 2 +- trains/community/flame/app_versions.json | 2 +- trains/community/freshrss/app_versions.json | 2 +- trains/community/frigate/app_versions.json | 2 +- trains/community/fscrawler/app_versions.json | 2 +- trains/community/gitea/app_versions.json | 2 +- trains/community/grafana/app_versions.json | 2 +- trains/community/handbrake/app_versions.json | 2 +- trains/community/homarr/app_versions.json | 2 +- trains/community/homepage/app_versions.json | 2 +- trains/community/homer/app_versions.json | 14 +- trains/community/immich/app_versions.json | 2 +- trains/community/invidious/app_versions.json | 2 +- trains/community/ipfs/app_versions.json | 2 +- trains/community/jellyfin/app_versions.json | 2 +- trains/community/jellyseerr/app_versions.json | 2 +- trains/community/jenkins/app_versions.json | 2 +- trains/community/joplin/app_versions.json | 2 +- trains/community/kapowarr/app_versions.json | 2 +- trains/community/kavita/app_versions.json | 2 +- trains/community/komga/app_versions.json | 2 +- trains/community/lidarr/app_versions.json | 2 +- trains/community/linkding/app_versions.json | 2 +- trains/community/listmonk/app_versions.json | 2 +- trains/community/logseq/app_versions.json | 2 +- trains/community/mealie/app_versions.json | 2 +- trains/community/metube/app_versions.json | 2 +- trains/community/minecraft/app_versions.json | 2 +- trains/community/mineos/app_versions.json | 2 +- trains/community/mumble/app_versions.json | 2 +- trains/community/n8n/app_versions.json | 2 +- trains/community/navidrome/app_versions.json | 2 +- trains/community/netbootxyz/app_versions.json | 2 +- .../nginx-proxy-manager/app_versions.json | 14 +- trains/community/node-red/app_versions.json | 2 +- trains/community/odoo/app_versions.json | 2 +- .../omada-controller/app_versions.json | 2 +- trains/community/organizr/app_versions.json | 2 +- trains/community/overseerr/app_versions.json | 2 +- trains/community/palworld/app_versions.json | 2 +- .../community/paperless-ngx/app_versions.json | 2 +- trains/community/passbolt/app_versions.json | 2 +- trains/community/pgadmin/app_versions.json | 2 +- trains/community/pigallery2/app_versions.json | 2 +- trains/community/piwigo/app_versions.json | 2 +- trains/community/planka/app_versions.json | 2 +- .../plex-auto-languages/app_versions.json | 2 +- trains/community/portainer/app_versions.json | 2 +- trains/community/prowlarr/app_versions.json | 2 +- .../community/qbittorrent/app_versions.json | 2 +- trains/community/radarr/app_versions.json | 2 +- trains/community/readarr/app_versions.json | 2 +- trains/community/recyclarr/app_versions.json | 2 +- trains/community/redis/app_versions.json | 2 +- trains/community/roundcube/app_versions.json | 2 +- trains/community/rsyncd/app_versions.json | 2 +- trains/community/rust-desk/app_versions.json | 2 +- trains/community/sabnzbd/app_versions.json | 2 +- trains/community/searxng/app_versions.json | 2 +- trains/community/sftpgo/app_versions.json | 2 +- trains/community/sonarr/app_versions.json | 2 +- trains/community/tailscale/app_versions.json | 2 +- trains/community/tautulli/app_versions.json | 2 +- trains/community/tdarr/app_versions.json | 2 +- trains/community/terraria/app_versions.json | 2 +- trains/community/tftpd-hpa/app_versions.json | 2 +- .../tiny-media-manager/app_versions.json | 2 +- .../community/transmission/app_versions.json | 2 +- .../twofactor-auth/app_versions.json | 2 +- .../unifi-controller/app_versions.json | 2 +- .../unifi-protect-backup/app_versions.json | 2 +- .../community/vaultwarden/app_versions.json | 2 +- trains/community/vikunja/app_versions.json | 2 +- trains/community/webdav/app_versions.json | 2 +- trains/community/whoogle/app_versions.json | 2 +- trains/community/wordpress/app_versions.json | 2 +- trains/community/zerotier/app_versions.json | 2 +- trains/enterprise/minio/app_versions.json | 2 +- trains/enterprise/syncthing/app_versions.json | 2 +- trains/stable/collabora/app_versions.json | 2 +- trains/stable/diskoverdata/app_versions.json | 2 +- .../stable/elastic-search/app_versions.json | 14 +- trains/stable/emby/app_versions.json | 2 +- .../stable/home-assistant/app_versions.json | 2 +- trains/stable/ix-app/app_versions.json | 2 +- trains/stable/minio/app_versions.json | 2 +- trains/stable/netdata/app_versions.json | 2 +- trains/stable/nextcloud/app_versions.json | 2 +- trains/stable/photoprism/app_versions.json | 2 +- trains/stable/pihole/app_versions.json | 2 +- trains/stable/plex/app_versions.json | 2 +- trains/stable/prometheus/app_versions.json | 2 +- trains/stable/storj/app_versions.json | 2 +- trains/stable/syncthing/app_versions.json | 2 +- trains/stable/wg-easy/app_versions.json | 2 +- trains/test/nginx/app_versions.json | 8 +- trains/test/other-nginx/app_versions.json | 4 +- 115 files changed, 259 insertions(+), 259 deletions(-) diff --git a/catalog.json b/catalog.json index 38196039f2..422687f9fd 100644 --- a/catalog.json +++ b/catalog.json @@ -13,7 +13,7 @@ "latest_version": "1.1.15", "latest_app_version": "24.04.8.2.1", "latest_human_version": "24.04.8.2.1_1.1.15", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "collabora", "recommended": false, "title": "Collabora", @@ -102,7 +102,7 @@ "latest_version": "1.0.23", "latest_app_version": "1.40.2.8395-c67dce28e", "latest_human_version": "1.40.2.8395-c67dce28e_1.0.23", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "plex", "recommended": false, "title": "Plex", @@ -180,7 +180,7 @@ "latest_version": "1.2.21", "latest_app_version": "2024.10.2", "latest_human_version": "2024.10.2_1.2.21", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "home-assistant", "recommended": false, "title": "Home Assistant", @@ -255,7 +255,7 @@ "latest_version": "1.1.14", "latest_app_version": "240915", "latest_human_version": "240915_1.1.14", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "photoprism", "recommended": false, "title": "Photoprism", @@ -328,7 +328,7 @@ "latest_version": "1.1.13", "latest_app_version": "RELEASE.2024-10-13T13-34-11Z", "latest_human_version": "RELEASE.2024-10-13T13-34-11Z_1.1.13", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "minio", "recommended": false, "title": "MinIO", @@ -377,7 +377,7 @@ "latest_version": "1.1.13", "latest_app_version": "4.8.10.0", "latest_human_version": "4.8.10.0_1.1.13", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "emby", "recommended": false, "title": "Emby Server", @@ -456,7 +456,7 @@ "latest_version": "1.1.14", "latest_app_version": "v1.47.4", "latest_human_version": "v1.47.4_1.1.14", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "netdata", "recommended": false, "title": "Netdata", @@ -533,7 +533,7 @@ "latest_version": "1.0.20", "latest_app_version": "14", "latest_human_version": "14_1.0.20", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "wg-easy", "recommended": false, "title": "WG Easy", @@ -593,7 +593,7 @@ "latest_version": "1.1.11", "latest_app_version": "v2.54.1", "latest_human_version": "v2.54.1_1.1.11", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "prometheus", "recommended": false, "title": "Prometheus", @@ -641,7 +641,7 @@ "latest_version": "1.0.28", "latest_app_version": "1.28.0", "latest_human_version": "1.28.0_1.0.28", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "syncthing", "recommended": false, "title": "Syncthing", @@ -726,7 +726,7 @@ "latest_version": "1.0.11", "latest_app_version": "1.0.0", "latest_human_version": "1.0.0_1.0.11", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "ix-app", "recommended": false, "title": "iX App", @@ -757,7 +757,7 @@ "latest_version": "1.3.20", "latest_app_version": "30.0.0", "latest_human_version": "30.0.0_1.3.20", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "nextcloud", "recommended": false, "title": "Nextcloud", @@ -861,7 +861,7 @@ "latest_version": "1.1.10", "latest_app_version": "6f87ea801-v1.71.2-go1.18.8", "latest_human_version": "6f87ea801-v1.71.2-go1.18.8_1.1.10", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "storj", "recommended": false, "title": "Storj", @@ -922,7 +922,7 @@ "latest_version": "1.3.8", "latest_app_version": "2.3.0", "latest_human_version": "2.3.0_1.3.8", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "diskoverdata", "recommended": false, "title": "Diskover Data", @@ -1005,7 +1005,7 @@ "latest_version": "1.1.11", "latest_app_version": "2024.07.0", "latest_human_version": "2024.07.0_1.1.11", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "pihole", "recommended": false, "title": "Pi-hole", @@ -1098,10 +1098,10 @@ "healthy_error": null, "home": "https://www.elastic.co", "location": "/__w/apps/apps/trains/stable/elastic-search", - "latest_version": "1.1.12", - "latest_app_version": "8.15.2", - "latest_human_version": "8.15.2_1.1.12", - "last_update": "2024-10-16 19:36:28", + "latest_version": "1.1.13", + "latest_app_version": "8.15.3", + "latest_human_version": "8.15.3_1.1.13", + "last_update": "2024-10-17 12:14:47", "name": "elastic-search", "recommended": false, "title": "Elastic Search", @@ -1149,7 +1149,7 @@ "latest_version": "1.0.1", "latest_app_version": "v1", "latest_human_version": "v1_1.0.1", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "other-nginx", "recommended": false, "title": "Other Nginx", @@ -1197,7 +1197,7 @@ "latest_version": "1.0.6", "latest_app_version": "v1", "latest_human_version": "v1_1.0.6", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "nginx", "recommended": false, "title": "Nginx", @@ -1247,7 +1247,7 @@ "latest_version": "1.1.7", "latest_app_version": "RELEASE.2024-08-26T15-33-07Z", "latest_human_version": "RELEASE.2024-08-26T15-33-07Z_1.1.7", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "minio", "recommended": false, "title": "MinIO", @@ -1296,7 +1296,7 @@ "latest_version": "1.0.15", "latest_app_version": "1.27.10", "latest_human_version": "1.27.10_1.0.15", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "syncthing", "recommended": false, "title": "Syncthing", @@ -1382,7 +1382,7 @@ "latest_version": "1.0.20", "latest_app_version": "0.9.0", "latest_human_version": "0.9.0_1.0.20", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "whoogle", "recommended": false, "title": "Whoogle", @@ -1430,7 +1430,7 @@ "latest_version": "1.0.14", "latest_app_version": "1.0.0", "latest_human_version": "1.0.0_1.0.14", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "rsyncd", "recommended": false, "title": "Rsync Daemon", @@ -1501,7 +1501,7 @@ "latest_version": "1.0.9", "latest_app_version": "v3.0.0", "latest_human_version": "v3.0.0_1.0.9", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "listmonk", "recommended": false, "title": "Listmonk", @@ -1557,7 +1557,7 @@ "latest_version": "1.11.18", "latest_app_version": "2024.10.1", "latest_human_version": "2024.10.1_1.11.18", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "minecraft", "recommended": false, "title": "Minecraft", @@ -1623,7 +1623,7 @@ "latest_version": "1.0.9", "latest_app_version": "2.26.01", "latest_human_version": "2.26.01_1.0.9", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "tdarr", "recommended": false, "title": "Tdarr", @@ -1689,7 +1689,7 @@ "latest_version": "1.0.21", "latest_app_version": "v2.14.6", "latest_human_version": "v2.14.6_1.0.21", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "tautulli", "recommended": false, "title": "Tautulli", @@ -1740,7 +1740,7 @@ "latest_version": "1.1.14", "latest_app_version": "v1.47.1", "latest_human_version": "v1.47.1_1.1.14", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "autobrr", "recommended": false, "title": "Autobrr", @@ -1789,7 +1789,7 @@ "latest_version": "1.0.18", "latest_app_version": "1.33.2", "latest_human_version": "1.33.2_1.0.18", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "overseerr", "recommended": false, "title": "Overseerr", @@ -1833,7 +1833,7 @@ "latest_version": "1.0.17", "latest_app_version": "1.4.2", "latest_human_version": "1.4.2_1.0.17", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "dockge", "recommended": false, "title": "Dockge", @@ -1913,7 +1913,7 @@ "latest_version": "1.1.13", "latest_app_version": "2024.10.0", "latest_human_version": "2024.10.0_1.1.13", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "cloudflared", "recommended": false, "title": "Cloudflared", @@ -1959,7 +1959,7 @@ "latest_version": "1.0.19", "latest_app_version": "0.7.3-nbxyz1", "latest_human_version": "0.7.3-nbxyz1_1.0.19", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "netbootxyz", "recommended": false, "title": "Netboot.xyz", @@ -2043,7 +2043,7 @@ "latest_version": "1.2.11", "latest_app_version": "8.5.6", "latest_human_version": "8.5.6_1.2.11", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "unifi-controller", "recommended": false, "title": "Unifi Controller", @@ -2090,7 +2090,7 @@ "latest_version": "1.0.9", "latest_app_version": "0.14.1", "latest_human_version": "0.14.1_1.0.9", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "frigate", "recommended": false, "title": "Frigate", @@ -2159,7 +2159,7 @@ "latest_version": "1.0.23", "latest_app_version": "v0.9.11", "latest_human_version": "v0.9.11_1.0.23", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "homepage", "recommended": false, "title": "Homepage", @@ -2210,7 +2210,7 @@ "latest_version": "1.0.19", "latest_app_version": "2.3.1", "latest_human_version": "2.3.1_1.0.19", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "flame", "recommended": false, "title": "Flame", @@ -2269,7 +2269,7 @@ "latest_version": "1.0.12", "latest_app_version": "2.12.1", "latest_human_version": "2.12.1_1.0.12", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "paperless-ngx", "recommended": false, "title": "Paperless-ngx", @@ -2358,7 +2358,7 @@ "latest_version": "1.0.10", "latest_app_version": "1.0.0", "latest_human_version": "1.0.0_1.0.10", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "tftpd-hpa", "recommended": false, "title": "TFTP Server", @@ -2420,7 +2420,7 @@ "latest_version": "1.0.6", "latest_app_version": "4.0.6", "latest_human_version": "4.0.6_1.0.6", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "transmission", "recommended": false, "title": "Transmission", @@ -2466,7 +2466,7 @@ "latest_version": "1.0.18", "latest_app_version": "latest", "latest_human_version": "latest_1.0.18", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "logseq", "recommended": false, "title": "Logseq", @@ -2510,7 +2510,7 @@ "latest_version": "1.1.11", "latest_app_version": "24.7.17", "latest_human_version": "24.7.17_1.1.11", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "drawio", "recommended": false, "title": "Draw.io", @@ -2560,7 +2560,7 @@ "latest_version": "1.1.11", "latest_app_version": "3.0.1-beta", "latest_human_version": "3.0.1-beta_1.1.11", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "joplin", "recommended": false, "title": "Joplin", @@ -2615,7 +2615,7 @@ "latest_version": "1.0.19", "latest_app_version": "0.8.3", "latest_human_version": "0.8.3_1.0.19", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "kavita", "recommended": false, "title": "Kavita", @@ -2687,7 +2687,7 @@ "latest_version": "1.0.7", "latest_app_version": "4.3.3", "latest_human_version": "4.3.3_1.0.7", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "sabnzbd", "recommended": false, "title": "SABnzbd", @@ -2737,7 +2737,7 @@ "latest_version": "1.1.13", "latest_app_version": "24.10.1", "latest_human_version": "24.10.1_1.1.13", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "actual-budget", "recommended": false, "title": "Actual Budget", @@ -2787,7 +2787,7 @@ "latest_version": "1.0.6", "latest_app_version": "5.0.12", "latest_human_version": "5.0.12_1.0.6", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "tiny-media-manager", "recommended": false, "title": "Tiny Media Manager", @@ -2851,7 +2851,7 @@ "latest_version": "1.2.14", "latest_app_version": "0.24.4", "latest_human_version": "0.24.4_1.2.14", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "vikunja", "recommended": false, "title": "Vikunja", @@ -2919,7 +2919,7 @@ "latest_version": "1.0.7", "latest_app_version": "4.9.1-1-ce-non-root", "latest_human_version": "4.9.1-1-ce-non-root_1.0.7", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "passbolt", "recommended": false, "title": "Passbolt", @@ -2976,7 +2976,7 @@ "latest_version": "1.0.19", "latest_app_version": "1.9.2", "latest_human_version": "1.9.2_1.0.19", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "jellyseerr", "recommended": false, "title": "Jellyseerr", @@ -3022,7 +3022,7 @@ "latest_version": "1.0.7", "latest_app_version": "1.32.2", "latest_human_version": "1.32.2_1.0.7", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "vaultwarden", "recommended": false, "title": "Vaultwarden", @@ -3075,7 +3075,7 @@ "latest_version": "1.0.10", "latest_app_version": "1.12.11", "latest_human_version": "1.12.11_1.0.10", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "castopod", "recommended": false, "title": "Castopod", @@ -3156,7 +3156,7 @@ "latest_version": "1.3.24", "latest_app_version": "1.64.0", "latest_human_version": "1.64.0_1.3.24", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "n8n", "recommended": false, "title": "n8n", @@ -3220,7 +3220,7 @@ "latest_version": "1.0.19", "latest_app_version": "2.8.3", "latest_human_version": "2.8.3_1.0.19", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "distribution", "recommended": false, "title": "Distribution", @@ -3266,7 +3266,7 @@ "latest_version": "1.0.17", "latest_app_version": "2.10-SNAPSHOT-ocr-es7", "latest_human_version": "2.10-SNAPSHOT-ocr-es7_1.0.17", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "fscrawler", "recommended": false, "title": "FSCrawler", @@ -3312,7 +3312,7 @@ "latest_version": "1.0.20", "latest_app_version": "v0.31.0", "latest_human_version": "v0.31.0_1.0.20", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "ipfs", "recommended": false, "title": "IPFS", @@ -3362,7 +3362,7 @@ "latest_version": "1.0.24", "latest_app_version": "0.53.3", "latest_human_version": "0.53.3_1.0.24", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "navidrome", "recommended": false, "title": "Navidrome", @@ -3410,7 +3410,7 @@ "latest_version": "1.0.6", "latest_app_version": "2.0.0", "latest_human_version": "2.0.0_1.0.6", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "pigallery2", "recommended": false, "title": "PiGallery2", @@ -3466,7 +3466,7 @@ "latest_version": "1.0.18", "latest_app_version": "latest", "latest_human_version": "latest_1.0.18", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "mineos", "recommended": false, "title": "MineOS", @@ -3533,7 +3533,7 @@ "latest_version": "1.1.12", "latest_app_version": "11.2.2", "latest_human_version": "11.2.2_1.1.12", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "grafana", "recommended": false, "title": "Grafana", @@ -3584,7 +3584,7 @@ "latest_version": "1.1.15", "latest_app_version": "v1.74.1", "latest_human_version": "v1.74.1_1.1.15", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "tailscale", "recommended": false, "title": "Tailscale", @@ -3654,7 +3654,7 @@ "latest_version": "1.0.16", "latest_app_version": "2024.10.4-3e747d049", "latest_human_version": "2024.10.4-3e747d049_1.0.16", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "searxng", "recommended": false, "title": "SearXNG", @@ -3707,7 +3707,7 @@ "latest_version": "1.0.22", "latest_app_version": "1.4.5", "latest_human_version": "1.4.5_1.0.22", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "bazarr", "recommended": false, "title": "Bazarr", @@ -3755,7 +3755,7 @@ "latest_version": "1.0.4", "latest_app_version": "17.0", "latest_human_version": "17.0_1.0.4", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "odoo", "recommended": false, "title": "Odoo", @@ -3803,7 +3803,7 @@ "latest_version": "1.0.6", "latest_app_version": "14.5.0", "latest_human_version": "14.5.0_1.0.6", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "piwigo", "recommended": false, "title": "Piwigo", @@ -3882,7 +3882,7 @@ "latest_version": "1.2.13", "latest_app_version": "1.25.2.4794", "latest_human_version": "1.25.2.4794_1.2.13", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "prowlarr", "recommended": false, "title": "Prowlarr", @@ -3928,7 +3928,7 @@ "latest_version": "1.0.19", "latest_app_version": "v1.0.0", "latest_human_version": "v1.0.0_1.0.19", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "kapowarr", "recommended": false, "title": "Kapowarr", @@ -3976,7 +3976,7 @@ "latest_version": "1.0.19", "latest_app_version": "1.14.1", "latest_human_version": "1.14.1_1.0.19", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "zerotier", "recommended": false, "title": "Zerotier", @@ -4066,7 +4066,7 @@ "latest_version": "1.2.14", "latest_app_version": "2.15.0", "latest_human_version": "2.15.0_1.2.14", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "audiobookshelf", "recommended": false, "title": "Audiobookshelf", @@ -4117,7 +4117,7 @@ "latest_version": "1.0.18", "latest_app_version": "latest", "latest_human_version": "latest_1.0.18", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "organizr", "recommended": false, "title": "Organizr", @@ -4186,7 +4186,7 @@ "latest_version": "1.0.7", "latest_app_version": "5.3.1", "latest_human_version": "5.3.1_1.0.7", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "twofactor-auth", "recommended": false, "title": "2FAuth", @@ -4234,7 +4234,7 @@ "latest_version": "1.0.17", "latest_app_version": "0.11.0", "latest_human_version": "0.11.0_1.0.17", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "unifi-protect-backup", "recommended": false, "title": "Unifi Protect Backup", @@ -4296,7 +4296,7 @@ "latest_version": "1.0.19", "latest_app_version": "4.0.9.2244", "latest_human_version": "4.0.9.2244_1.0.19", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "sonarr", "recommended": false, "title": "Sonarr", @@ -4345,7 +4345,7 @@ "latest_version": "1.0.22", "latest_app_version": "v0.107.53", "latest_human_version": "v0.107.53_1.0.22", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "adguard-home", "recommended": false, "title": "AdGuard Home", @@ -4411,7 +4411,7 @@ "latest_version": "1.1.12", "latest_app_version": "2.6.4.4402", "latest_human_version": "2.6.4.4402_1.1.12", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "lidarr", "recommended": false, "title": "Lidarr", @@ -4460,7 +4460,7 @@ "latest_version": "1.2.14", "latest_app_version": "2.23.0", "latest_human_version": "2.23.0_1.2.14", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "portainer", "recommended": false, "title": "Portainer", @@ -4542,7 +4542,7 @@ "latest_version": "1.1.10", "latest_app_version": "v1.5.634", "latest_human_version": "v1.5.634_1.1.10", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "mumble", "recommended": false, "title": "Mumble", @@ -4586,7 +4586,7 @@ "latest_version": "1.1.12", "latest_app_version": "5.12.2.9335", "latest_human_version": "5.12.2.9335_1.1.12", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "radarr", "recommended": false, "title": "Radarr", @@ -4636,7 +4636,7 @@ "latest_version": "1.0.6", "latest_app_version": "tshock-1.4.4.9-5.2.0-3", "latest_human_version": "tshock-1.4.4.9-5.2.0-3_1.0.6", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "terraria", "recommended": false, "title": "Terraria", @@ -4684,7 +4684,7 @@ "latest_version": "1.0.16", "latest_app_version": "2.4.4", "latest_human_version": "2.4.4_1.0.16", - "last_update": "2024-10-16 19:37:58", + "last_update": "2024-10-17 12:13:29", "name": "chia", "recommended": false, "title": "Chia", @@ -4730,7 +4730,7 @@ "latest_version": "1.0.18", "latest_app_version": "3.1.0", "latest_human_version": "3.1.0_1.0.18", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "dashy", "recommended": false, "title": "Dashy", @@ -4777,7 +4777,7 @@ "latest_version": "1.0.7", "latest_app_version": "6.6.2", "latest_human_version": "6.6.2_1.0.7", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "wordpress", "recommended": false, "title": "Wordpress", @@ -4838,7 +4838,7 @@ "latest_version": "1.0.12", "latest_app_version": "1.22.3", "latest_human_version": "1.22.3_1.0.12", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "gitea", "recommended": false, "title": "Gitea", @@ -4889,7 +4889,7 @@ "latest_version": "1.1.10", "latest_app_version": "5.14", "latest_human_version": "5.14_1.1.10", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "omada-controller", "recommended": false, "title": "Bazarr", @@ -4957,7 +4957,7 @@ "latest_version": "1.1.14", "latest_app_version": "1.14.1", "latest_human_version": "1.14.1_1.1.14", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "komga", "recommended": false, "title": "Komga", @@ -5006,7 +5006,7 @@ "latest_version": "1.0.7", "latest_app_version": "2.6.2", "latest_human_version": "2.6.2_1.0.7", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "sftpgo", "recommended": false, "title": "SFTPGo", @@ -5050,7 +5050,7 @@ "latest_version": "1.0.5", "latest_app_version": "8.12", "latest_human_version": "8.12_1.0.5", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "pgadmin", "recommended": false, "title": "pgAdmin", @@ -5104,7 +5104,7 @@ "latest_version": "1.0.13", "latest_app_version": "2.4.62", "latest_human_version": "2.4.62_1.0.13", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "webdav", "recommended": false, "title": "WebDAV", @@ -5148,7 +5148,7 @@ "latest_version": "1.0.13", "latest_app_version": "2.462.1-jdk17", "latest_human_version": "2.462.1-jdk17_1.0.13", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "jenkins", "recommended": false, "title": "Jenkins", @@ -5197,7 +5197,7 @@ "latest_version": "1.0.16", "latest_app_version": "v1.2.3", "latest_human_version": "v1.2.3_1.0.16", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "plex-auto-languages", "recommended": false, "title": "Plex Auto Languages", @@ -5242,7 +5242,7 @@ "latest_version": "1.1.17", "latest_app_version": "2024-10-08", "latest_human_version": "2024-10-08_1.1.17", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "metube", "recommended": false, "title": "MeTube", @@ -5289,7 +5289,7 @@ "latest_version": "1.0.7", "latest_app_version": "1.1.11-1", "latest_human_version": "1.1.11-1_1.0.7", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "rust-desk", "recommended": false, "title": "Rust Desk", @@ -5334,7 +5334,7 @@ "latest_version": "1.0.20", "latest_app_version": "palworld", "latest_human_version": "palworld_1.0.20", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "palworld", "recommended": false, "title": "Palworld", @@ -5412,7 +5412,7 @@ "latest_version": "1.0.19", "latest_app_version": "latest", "latest_human_version": "latest_1.0.19", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "briefkasten", "recommended": false, "title": "Briefkasten", @@ -5467,7 +5467,7 @@ "latest_version": "1.6.21", "latest_app_version": "v1.118.2", "latest_human_version": "v1.118.2_1.6.21", - "last_update": "2024-10-16 19:37:58", + "last_update": "2024-10-17 12:13:29", "name": "immich", "recommended": false, "title": "Immich", @@ -5539,7 +5539,7 @@ "latest_version": "1.0.24", "latest_app_version": "v2.8.1", "latest_human_version": "v2.8.1_1.0.24", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "ddns-updater", "recommended": false, "title": "DDNS Updater", @@ -5587,7 +5587,7 @@ "latest_version": "1.0.11", "latest_app_version": "2.20240825.2", "latest_human_version": "2.20240825.2_1.0.11", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "invidious", "recommended": false, "title": "Invidious", @@ -5645,7 +5645,7 @@ "latest_version": "1.0.19", "latest_app_version": "0.3.32.2587", "latest_human_version": "0.3.32.2587_1.0.19", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "readarr", "recommended": false, "title": "Readarr", @@ -5695,7 +5695,7 @@ "latest_version": "1.0.8", "latest_app_version": "7.2.4", "latest_human_version": "7.2.4_1.0.8", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "recyclarr", "recommended": false, "title": "Recyclarr", @@ -5741,7 +5741,7 @@ "latest_version": "2.0.11", "latest_app_version": "v24.09.1", "latest_human_version": "v24.09.1_2.0.11", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "handbrake", "recommended": false, "title": "Handbrake", @@ -5813,10 +5813,10 @@ "healthy_error": null, "home": "https://github.com/bastienwirtz/homer", "location": "/__w/apps/apps/trains/community/homer", - "latest_version": "2.0.10", - "latest_app_version": "v24.05.1", - "latest_human_version": "v24.05.1_2.0.10", - "last_update": "2024-10-16 19:36:28", + "latest_version": "2.0.11", + "latest_app_version": "v24.10.1", + "latest_human_version": "v24.10.1_2.0.11", + "last_update": "2024-10-17 12:14:47", "name": "homer", "recommended": false, "title": "Homer", @@ -5860,7 +5860,7 @@ "latest_version": "1.1.10", "latest_app_version": "1.1.2-2", "latest_human_version": "1.1.2-2_1.1.10", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "clamav", "recommended": false, "title": "ClamAV", @@ -5926,7 +5926,7 @@ "latest_version": "1.0.33", "latest_app_version": "4.0.5", "latest_human_version": "4.0.5_1.0.33", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "node-red", "recommended": false, "title": "Node-RED", @@ -5972,7 +5972,7 @@ "latest_version": "1.1.11", "latest_app_version": "v2.31.2", "latest_human_version": "v2.31.2_1.1.11", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "filebrowser", "recommended": false, "title": "File Browser", @@ -6022,7 +6022,7 @@ "latest_version": "1.0.17", "latest_app_version": "1.36.0", "latest_human_version": "1.36.0_1.0.17", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "linkding", "recommended": false, "title": "Linkding", @@ -6075,7 +6075,7 @@ "latest_version": "1.0.11", "latest_app_version": "1.23.2", "latest_human_version": "1.23.2_1.0.11", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "planka", "recommended": false, "title": "Planka", @@ -6130,7 +6130,7 @@ "latest_version": "1.0.28", "latest_app_version": "5.0.0", "latest_human_version": "5.0.0_1.0.28", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "qbittorrent", "recommended": false, "title": "qBittorrent", @@ -6178,7 +6178,7 @@ "latest_version": "1.2.18", "latest_app_version": "version-6.1.21", "latest_human_version": "version-6.1.21_1.2.18", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "firefly-iii", "recommended": false, "title": "Firefly III", @@ -6265,7 +6265,7 @@ "latest_version": "1.0.7", "latest_app_version": "7.4.1", "latest_human_version": "7.4.1_1.0.7", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "redis", "recommended": false, "title": "Redis", @@ -6310,7 +6310,7 @@ "latest_version": "1.0.25", "latest_app_version": "10.9.11", "latest_human_version": "10.9.11_1.0.25", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "jellyfin", "recommended": false, "title": "Jellyfin", @@ -6362,7 +6362,7 @@ "latest_version": "1.0.18", "latest_app_version": "2.1.1", "latest_human_version": "2.1.1_1.0.18", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "deluge", "recommended": false, "title": "Deluge", @@ -6428,7 +6428,7 @@ "latest_version": "1.2.10", "latest_app_version": "v1.12.0", "latest_human_version": "v1.12.0_1.2.10", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "mealie", "recommended": false, "title": "Mealie", @@ -6481,7 +6481,7 @@ "latest_version": "1.1.14", "latest_app_version": "1.24.3", "latest_human_version": "1.24.3_1.1.14", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "freshrss", "recommended": false, "title": "FreshRSS", @@ -6549,7 +6549,7 @@ "latest_version": "1.0.19", "latest_app_version": "0.15.4", "latest_human_version": "0.15.4_1.0.19", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "homarr", "recommended": false, "title": "Homarr", @@ -6597,7 +6597,7 @@ "latest_version": "1.0.7", "latest_app_version": "1.6.9-apache", "latest_human_version": "1.6.9-apache_1.0.7", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "name": "roundcube", "recommended": false, "title": "Roundcube", @@ -6673,10 +6673,10 @@ "healthy_error": null, "home": "https://nginxproxymanager.com/", "location": "/__w/apps/apps/trains/community/nginx-proxy-manager", - "latest_version": "1.0.21", - "latest_app_version": "2.12.0", - "latest_human_version": "2.12.0_1.0.21", - "last_update": "2024-10-16 19:36:28", + "latest_version": "1.0.22", + "latest_app_version": "2.12.1", + "latest_human_version": "2.12.1_1.0.22", + "last_update": "2024-10-17 12:14:47", "name": "nginx-proxy-manager", "recommended": false, "title": "Nginx Proxy Manager", diff --git a/trains/community/actual-budget/app_versions.json b/trains/community/actual-budget/app_versions.json index 0f0ddf4e7b..160e179064 100644 --- a/trains/community/actual-budget/app_versions.json +++ b/trains/community/actual-budget/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/actual-budget/1.1.13", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "24.10.1_1.1.13", "version": "1.1.13", diff --git a/trains/community/adguard-home/app_versions.json b/trains/community/adguard-home/app_versions.json index a134137c44..afc63f479d 100644 --- a/trains/community/adguard-home/app_versions.json +++ b/trains/community/adguard-home/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/adguard-home/1.0.22", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "v0.107.53_1.0.22", "version": "1.0.22", diff --git a/trains/community/audiobookshelf/app_versions.json b/trains/community/audiobookshelf/app_versions.json index 550541ef1c..dd9b733769 100644 --- a/trains/community/audiobookshelf/app_versions.json +++ b/trains/community/audiobookshelf/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/audiobookshelf/1.2.14", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "2.15.0_1.2.14", "version": "1.2.14", diff --git a/trains/community/autobrr/app_versions.json b/trains/community/autobrr/app_versions.json index c8a8d0ddda..7c8fde911e 100644 --- a/trains/community/autobrr/app_versions.json +++ b/trains/community/autobrr/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/autobrr/1.1.14", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "v1.47.1_1.1.14", "version": "1.1.14", diff --git a/trains/community/bazarr/app_versions.json b/trains/community/bazarr/app_versions.json index 0a1bfe5769..02f7424786 100644 --- a/trains/community/bazarr/app_versions.json +++ b/trains/community/bazarr/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/bazarr/1.0.22", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "1.4.5_1.0.22", "version": "1.0.22", diff --git a/trains/community/briefkasten/app_versions.json b/trains/community/briefkasten/app_versions.json index 8adf85ff02..c001469894 100644 --- a/trains/community/briefkasten/app_versions.json +++ b/trains/community/briefkasten/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/briefkasten/1.0.19", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "latest_1.0.19", "version": "1.0.19", diff --git a/trains/community/castopod/app_versions.json b/trains/community/castopod/app_versions.json index 1c546527c1..192dbb7033 100644 --- a/trains/community/castopod/app_versions.json +++ b/trains/community/castopod/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/castopod/1.0.10", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "1.12.11_1.0.10", "version": "1.0.10", diff --git a/trains/community/chia/app_versions.json b/trains/community/chia/app_versions.json index 0e777de787..f0c0e351d4 100644 --- a/trains/community/chia/app_versions.json +++ b/trains/community/chia/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/chia/1.0.16", - "last_update": "2024-10-16 19:37:58", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "2.4.4_1.0.16", "version": "1.0.16", diff --git a/trains/community/clamav/app_versions.json b/trains/community/clamav/app_versions.json index 60bf08ae1a..9b61428b8a 100644 --- a/trains/community/clamav/app_versions.json +++ b/trains/community/clamav/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/clamav/1.1.10", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "1.1.2-2_1.1.10", "version": "1.1.10", diff --git a/trains/community/cloudflared/app_versions.json b/trains/community/cloudflared/app_versions.json index d51a5cdfa8..a9dbc94054 100644 --- a/trains/community/cloudflared/app_versions.json +++ b/trains/community/cloudflared/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/cloudflared/1.1.13", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "2024.10.0_1.1.13", "version": "1.1.13", diff --git a/trains/community/dashy/app_versions.json b/trains/community/dashy/app_versions.json index 5226982156..88b0a3de65 100644 --- a/trains/community/dashy/app_versions.json +++ b/trains/community/dashy/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/dashy/1.0.18", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "3.1.0_1.0.18", "version": "1.0.18", diff --git a/trains/community/ddns-updater/app_versions.json b/trains/community/ddns-updater/app_versions.json index edf8721549..7bd02ed618 100644 --- a/trains/community/ddns-updater/app_versions.json +++ b/trains/community/ddns-updater/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/ddns-updater/1.0.24", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "v2.8.1_1.0.24", "version": "1.0.24", diff --git a/trains/community/deluge/app_versions.json b/trains/community/deluge/app_versions.json index 6dcb2a7926..a78d68590d 100644 --- a/trains/community/deluge/app_versions.json +++ b/trains/community/deluge/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/deluge/1.0.18", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "2.1.1_1.0.18", "version": "1.0.18", diff --git a/trains/community/distribution/app_versions.json b/trains/community/distribution/app_versions.json index 299a514ddd..83ff24efd7 100644 --- a/trains/community/distribution/app_versions.json +++ b/trains/community/distribution/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/distribution/1.0.19", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "2.8.3_1.0.19", "version": "1.0.19", diff --git a/trains/community/dockge/app_versions.json b/trains/community/dockge/app_versions.json index e37b9ac575..d347d74f65 100644 --- a/trains/community/dockge/app_versions.json +++ b/trains/community/dockge/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/dockge/1.0.17", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "1.4.2_1.0.17", "version": "1.0.17", diff --git a/trains/community/drawio/app_versions.json b/trains/community/drawio/app_versions.json index d417ec3868..a4ce8d6df5 100644 --- a/trains/community/drawio/app_versions.json +++ b/trains/community/drawio/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/drawio/1.1.11", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "24.7.17_1.1.11", "version": "1.1.11", diff --git a/trains/community/filebrowser/app_versions.json b/trains/community/filebrowser/app_versions.json index dc7139b995..996bc3360e 100644 --- a/trains/community/filebrowser/app_versions.json +++ b/trains/community/filebrowser/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/filebrowser/1.1.11", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "v2.31.2_1.1.11", "version": "1.1.11", diff --git a/trains/community/firefly-iii/app_versions.json b/trains/community/firefly-iii/app_versions.json index 16a1874e08..f2b5fc243e 100644 --- a/trains/community/firefly-iii/app_versions.json +++ b/trains/community/firefly-iii/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/firefly-iii/1.2.18", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "version-6.1.21_1.2.18", "version": "1.2.18", diff --git a/trains/community/flame/app_versions.json b/trains/community/flame/app_versions.json index 6bc66ba164..21d34e9dfe 100644 --- a/trains/community/flame/app_versions.json +++ b/trains/community/flame/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/flame/1.0.19", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "2.3.1_1.0.19", "version": "1.0.19", diff --git a/trains/community/freshrss/app_versions.json b/trains/community/freshrss/app_versions.json index 1fd07c8ef8..13d314a8ad 100644 --- a/trains/community/freshrss/app_versions.json +++ b/trains/community/freshrss/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/freshrss/1.1.14", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "1.24.3_1.1.14", "version": "1.1.14", diff --git a/trains/community/frigate/app_versions.json b/trains/community/frigate/app_versions.json index 8590572f4d..84a5db2286 100644 --- a/trains/community/frigate/app_versions.json +++ b/trains/community/frigate/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/frigate/1.0.9", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "0.14.1_1.0.9", "version": "1.0.9", diff --git a/trains/community/fscrawler/app_versions.json b/trains/community/fscrawler/app_versions.json index 96b3340231..a12e967455 100644 --- a/trains/community/fscrawler/app_versions.json +++ b/trains/community/fscrawler/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/fscrawler/1.0.17", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "2.10-SNAPSHOT-ocr-es7_1.0.17", "version": "1.0.17", diff --git a/trains/community/gitea/app_versions.json b/trains/community/gitea/app_versions.json index 4e71c71fcb..1216ceacd5 100644 --- a/trains/community/gitea/app_versions.json +++ b/trains/community/gitea/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/gitea/1.0.12", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "1.22.3_1.0.12", "version": "1.0.12", diff --git a/trains/community/grafana/app_versions.json b/trains/community/grafana/app_versions.json index f80de8335a..a9d964fd2b 100644 --- a/trains/community/grafana/app_versions.json +++ b/trains/community/grafana/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/grafana/1.1.12", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "11.2.2_1.1.12", "version": "1.1.12", diff --git a/trains/community/handbrake/app_versions.json b/trains/community/handbrake/app_versions.json index f1956911bf..2b86fe4831 100644 --- a/trains/community/handbrake/app_versions.json +++ b/trains/community/handbrake/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/handbrake/2.0.11", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "v24.09.1_2.0.11", "version": "2.0.11", diff --git a/trains/community/homarr/app_versions.json b/trains/community/homarr/app_versions.json index ebdd496d0c..df3fdf2316 100644 --- a/trains/community/homarr/app_versions.json +++ b/trains/community/homarr/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/homarr/1.0.19", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "0.15.4_1.0.19", "version": "1.0.19", diff --git a/trains/community/homepage/app_versions.json b/trains/community/homepage/app_versions.json index 20b1224384..0f0b72b210 100644 --- a/trains/community/homepage/app_versions.json +++ b/trains/community/homepage/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/homepage/1.0.23", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "v0.9.11_1.0.23", "version": "1.0.23", diff --git a/trains/community/homer/app_versions.json b/trains/community/homer/app_versions.json index e2df79b706..3a3321218a 100644 --- a/trains/community/homer/app_versions.json +++ b/trains/community/homer/app_versions.json @@ -1,15 +1,15 @@ { - "2.0.10": { + "2.0.11": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/homer/2.0.10", - "last_update": "2024-10-16 19:36:28", + "location": "/__w/apps/apps/trains/community/homer/2.0.11", + "last_update": "2024-10-17 12:14:47", "required_features": [], - "human_version": "v24.05.1_2.0.10", - "version": "2.0.10", + "human_version": "v24.10.1_2.0.11", + "version": "2.0.11", "app_metadata": { - "app_version": "v24.05.1", + "app_version": "v24.10.1", "capabilities": [], "categories": [ "productivity" @@ -50,7 +50,7 @@ ], "title": "Homer", "train": "community", - "version": "2.0.10" + "version": "2.0.11" }, "schema": { "groups": [ diff --git a/trains/community/immich/app_versions.json b/trains/community/immich/app_versions.json index 158bf52ce6..104591a479 100644 --- a/trains/community/immich/app_versions.json +++ b/trains/community/immich/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/immich/1.6.21", - "last_update": "2024-10-16 19:37:58", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "v1.118.2_1.6.21", "version": "1.6.21", diff --git a/trains/community/invidious/app_versions.json b/trains/community/invidious/app_versions.json index d897a3db55..bb62ddaf91 100644 --- a/trains/community/invidious/app_versions.json +++ b/trains/community/invidious/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/invidious/1.0.11", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "2.20240825.2_1.0.11", "version": "1.0.11", diff --git a/trains/community/ipfs/app_versions.json b/trains/community/ipfs/app_versions.json index 318343ab10..d4cc0194b5 100644 --- a/trains/community/ipfs/app_versions.json +++ b/trains/community/ipfs/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/ipfs/1.0.20", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "v0.31.0_1.0.20", "version": "1.0.20", diff --git a/trains/community/jellyfin/app_versions.json b/trains/community/jellyfin/app_versions.json index 824aa4f850..be6dea7ab9 100644 --- a/trains/community/jellyfin/app_versions.json +++ b/trains/community/jellyfin/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/jellyfin/1.0.25", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "10.9.11_1.0.25", "version": "1.0.25", diff --git a/trains/community/jellyseerr/app_versions.json b/trains/community/jellyseerr/app_versions.json index 15db417e66..59fe8cd28d 100644 --- a/trains/community/jellyseerr/app_versions.json +++ b/trains/community/jellyseerr/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/jellyseerr/1.0.19", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "1.9.2_1.0.19", "version": "1.0.19", diff --git a/trains/community/jenkins/app_versions.json b/trains/community/jenkins/app_versions.json index 38e25d55da..ebffcac7a3 100644 --- a/trains/community/jenkins/app_versions.json +++ b/trains/community/jenkins/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/jenkins/1.0.13", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "2.462.1-jdk17_1.0.13", "version": "1.0.13", diff --git a/trains/community/joplin/app_versions.json b/trains/community/joplin/app_versions.json index 7a1dd49716..bd621b4be2 100644 --- a/trains/community/joplin/app_versions.json +++ b/trains/community/joplin/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/joplin/1.1.11", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "3.0.1-beta_1.1.11", "version": "1.1.11", diff --git a/trains/community/kapowarr/app_versions.json b/trains/community/kapowarr/app_versions.json index d3eda228ab..9a4a5cce88 100644 --- a/trains/community/kapowarr/app_versions.json +++ b/trains/community/kapowarr/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/kapowarr/1.0.19", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "v1.0.0_1.0.19", "version": "1.0.19", diff --git a/trains/community/kavita/app_versions.json b/trains/community/kavita/app_versions.json index b9349000a3..57f5260998 100644 --- a/trains/community/kavita/app_versions.json +++ b/trains/community/kavita/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/kavita/1.0.19", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "0.8.3_1.0.19", "version": "1.0.19", diff --git a/trains/community/komga/app_versions.json b/trains/community/komga/app_versions.json index 3fb08391a3..3bff8f2ba0 100644 --- a/trains/community/komga/app_versions.json +++ b/trains/community/komga/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/komga/1.1.14", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "1.14.1_1.1.14", "version": "1.1.14", diff --git a/trains/community/lidarr/app_versions.json b/trains/community/lidarr/app_versions.json index 4d04c91e41..3c8c8efb96 100644 --- a/trains/community/lidarr/app_versions.json +++ b/trains/community/lidarr/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/lidarr/1.1.12", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "2.6.4.4402_1.1.12", "version": "1.1.12", diff --git a/trains/community/linkding/app_versions.json b/trains/community/linkding/app_versions.json index eb13776d99..43bb5783b9 100644 --- a/trains/community/linkding/app_versions.json +++ b/trains/community/linkding/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/linkding/1.0.17", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "1.36.0_1.0.17", "version": "1.0.17", diff --git a/trains/community/listmonk/app_versions.json b/trains/community/listmonk/app_versions.json index 75bb82c2e5..992eadc755 100644 --- a/trains/community/listmonk/app_versions.json +++ b/trains/community/listmonk/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/listmonk/1.0.9", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "v3.0.0_1.0.9", "version": "1.0.9", diff --git a/trains/community/logseq/app_versions.json b/trains/community/logseq/app_versions.json index 87ebdedf71..314d48eba5 100644 --- a/trains/community/logseq/app_versions.json +++ b/trains/community/logseq/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/logseq/1.0.18", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "latest_1.0.18", "version": "1.0.18", diff --git a/trains/community/mealie/app_versions.json b/trains/community/mealie/app_versions.json index c3464e8c86..a4639b742f 100644 --- a/trains/community/mealie/app_versions.json +++ b/trains/community/mealie/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/mealie/1.2.10", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "v1.12.0_1.2.10", "version": "1.2.10", diff --git a/trains/community/metube/app_versions.json b/trains/community/metube/app_versions.json index 22a5f5b72c..02ad5269df 100644 --- a/trains/community/metube/app_versions.json +++ b/trains/community/metube/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/metube/1.1.17", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "2024-10-08_1.1.17", "version": "1.1.17", diff --git a/trains/community/minecraft/app_versions.json b/trains/community/minecraft/app_versions.json index 0681dcbed9..8eec62ea03 100644 --- a/trains/community/minecraft/app_versions.json +++ b/trains/community/minecraft/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/minecraft/1.11.18", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "2024.10.1_1.11.18", "version": "1.11.18", diff --git a/trains/community/mineos/app_versions.json b/trains/community/mineos/app_versions.json index a6199535d3..c1bc7c83d2 100644 --- a/trains/community/mineos/app_versions.json +++ b/trains/community/mineos/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/mineos/1.0.18", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "latest_1.0.18", "version": "1.0.18", diff --git a/trains/community/mumble/app_versions.json b/trains/community/mumble/app_versions.json index 681d058602..61f00c5479 100644 --- a/trains/community/mumble/app_versions.json +++ b/trains/community/mumble/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/mumble/1.1.10", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "v1.5.634_1.1.10", "version": "1.1.10", diff --git a/trains/community/n8n/app_versions.json b/trains/community/n8n/app_versions.json index 386ccf793c..637cab55e0 100644 --- a/trains/community/n8n/app_versions.json +++ b/trains/community/n8n/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/n8n/1.3.24", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "1.64.0_1.3.24", "version": "1.3.24", diff --git a/trains/community/navidrome/app_versions.json b/trains/community/navidrome/app_versions.json index b6ed472bc7..32e5d9d05c 100644 --- a/trains/community/navidrome/app_versions.json +++ b/trains/community/navidrome/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/navidrome/1.0.24", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "0.53.3_1.0.24", "version": "1.0.24", diff --git a/trains/community/netbootxyz/app_versions.json b/trains/community/netbootxyz/app_versions.json index 9419b8f075..53e5e17897 100644 --- a/trains/community/netbootxyz/app_versions.json +++ b/trains/community/netbootxyz/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/netbootxyz/1.0.19", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "0.7.3-nbxyz1_1.0.19", "version": "1.0.19", diff --git a/trains/community/nginx-proxy-manager/app_versions.json b/trains/community/nginx-proxy-manager/app_versions.json index 3166a1b398..7aa00e591c 100644 --- a/trains/community/nginx-proxy-manager/app_versions.json +++ b/trains/community/nginx-proxy-manager/app_versions.json @@ -1,15 +1,15 @@ { - "1.0.21": { + "1.0.22": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/community/nginx-proxy-manager/1.0.21", - "last_update": "2024-10-16 19:36:28", + "location": "/__w/apps/apps/trains/community/nginx-proxy-manager/1.0.22", + "last_update": "2024-10-17 12:14:47", "required_features": [], - "human_version": "2.12.0_1.0.21", - "version": "1.0.21", + "human_version": "2.12.1_1.0.22", + "version": "1.0.22", "app_metadata": { - "app_version": "2.12.0", + "app_version": "2.12.1", "capabilities": [ { "description": "Nginx Proxy Manager requires this ability to switch user for sub-processes.", @@ -74,7 +74,7 @@ ], "title": "Nginx Proxy Manager", "train": "community", - "version": "1.0.21" + "version": "1.0.22" }, "schema": { "groups": [ diff --git a/trains/community/node-red/app_versions.json b/trains/community/node-red/app_versions.json index 4a7a19daf4..66a8a5e9c4 100644 --- a/trains/community/node-red/app_versions.json +++ b/trains/community/node-red/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/node-red/1.0.33", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "4.0.5_1.0.33", "version": "1.0.33", diff --git a/trains/community/odoo/app_versions.json b/trains/community/odoo/app_versions.json index 4fb6fdac71..e182adf52d 100644 --- a/trains/community/odoo/app_versions.json +++ b/trains/community/odoo/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/odoo/1.0.4", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "17.0_1.0.4", "version": "1.0.4", diff --git a/trains/community/omada-controller/app_versions.json b/trains/community/omada-controller/app_versions.json index 884d11ef72..d039f1f9c4 100644 --- a/trains/community/omada-controller/app_versions.json +++ b/trains/community/omada-controller/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/omada-controller/1.1.10", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "5.14_1.1.10", "version": "1.1.10", diff --git a/trains/community/organizr/app_versions.json b/trains/community/organizr/app_versions.json index 59c5ada4da..b3b83aa5ac 100644 --- a/trains/community/organizr/app_versions.json +++ b/trains/community/organizr/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/organizr/1.0.18", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "latest_1.0.18", "version": "1.0.18", diff --git a/trains/community/overseerr/app_versions.json b/trains/community/overseerr/app_versions.json index 6a7d748c44..57921e0edf 100644 --- a/trains/community/overseerr/app_versions.json +++ b/trains/community/overseerr/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/overseerr/1.0.18", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "1.33.2_1.0.18", "version": "1.0.18", diff --git a/trains/community/palworld/app_versions.json b/trains/community/palworld/app_versions.json index 3001345005..df72298586 100644 --- a/trains/community/palworld/app_versions.json +++ b/trains/community/palworld/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/palworld/1.0.20", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "palworld_1.0.20", "version": "1.0.20", diff --git a/trains/community/paperless-ngx/app_versions.json b/trains/community/paperless-ngx/app_versions.json index f06949c1d2..b671790d4e 100644 --- a/trains/community/paperless-ngx/app_versions.json +++ b/trains/community/paperless-ngx/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/paperless-ngx/1.0.12", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "2.12.1_1.0.12", "version": "1.0.12", diff --git a/trains/community/passbolt/app_versions.json b/trains/community/passbolt/app_versions.json index c9c1c964ab..d782b844c2 100644 --- a/trains/community/passbolt/app_versions.json +++ b/trains/community/passbolt/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/passbolt/1.0.7", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "4.9.1-1-ce-non-root_1.0.7", "version": "1.0.7", diff --git a/trains/community/pgadmin/app_versions.json b/trains/community/pgadmin/app_versions.json index 847fbbf02f..3b68d2595e 100644 --- a/trains/community/pgadmin/app_versions.json +++ b/trains/community/pgadmin/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/pgadmin/1.0.5", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "8.12_1.0.5", "version": "1.0.5", diff --git a/trains/community/pigallery2/app_versions.json b/trains/community/pigallery2/app_versions.json index 587617f0dc..4bf5d28199 100644 --- a/trains/community/pigallery2/app_versions.json +++ b/trains/community/pigallery2/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/pigallery2/1.0.6", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "2.0.0_1.0.6", "version": "1.0.6", diff --git a/trains/community/piwigo/app_versions.json b/trains/community/piwigo/app_versions.json index bf9ab669ec..d5357185c8 100644 --- a/trains/community/piwigo/app_versions.json +++ b/trains/community/piwigo/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/piwigo/1.0.6", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "14.5.0_1.0.6", "version": "1.0.6", diff --git a/trains/community/planka/app_versions.json b/trains/community/planka/app_versions.json index af67776f7d..51468c28dd 100644 --- a/trains/community/planka/app_versions.json +++ b/trains/community/planka/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/planka/1.0.11", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "1.23.2_1.0.11", "version": "1.0.11", diff --git a/trains/community/plex-auto-languages/app_versions.json b/trains/community/plex-auto-languages/app_versions.json index b5d885cdb4..7e5886492b 100644 --- a/trains/community/plex-auto-languages/app_versions.json +++ b/trains/community/plex-auto-languages/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/plex-auto-languages/1.0.16", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "v1.2.3_1.0.16", "version": "1.0.16", diff --git a/trains/community/portainer/app_versions.json b/trains/community/portainer/app_versions.json index 6300e92b3d..e948405b48 100644 --- a/trains/community/portainer/app_versions.json +++ b/trains/community/portainer/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/portainer/1.2.14", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "2.23.0_1.2.14", "version": "1.2.14", diff --git a/trains/community/prowlarr/app_versions.json b/trains/community/prowlarr/app_versions.json index 247be02b6a..0e93064fb5 100644 --- a/trains/community/prowlarr/app_versions.json +++ b/trains/community/prowlarr/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/prowlarr/1.2.13", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "1.25.2.4794_1.2.13", "version": "1.2.13", diff --git a/trains/community/qbittorrent/app_versions.json b/trains/community/qbittorrent/app_versions.json index cc6a63c093..5ff2427d78 100644 --- a/trains/community/qbittorrent/app_versions.json +++ b/trains/community/qbittorrent/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/qbittorrent/1.0.28", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "5.0.0_1.0.28", "version": "1.0.28", diff --git a/trains/community/radarr/app_versions.json b/trains/community/radarr/app_versions.json index 5f6528899e..9d374cdbb3 100644 --- a/trains/community/radarr/app_versions.json +++ b/trains/community/radarr/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/radarr/1.1.12", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "5.12.2.9335_1.1.12", "version": "1.1.12", diff --git a/trains/community/readarr/app_versions.json b/trains/community/readarr/app_versions.json index 5c6e4c8f81..37f00e5a63 100644 --- a/trains/community/readarr/app_versions.json +++ b/trains/community/readarr/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/readarr/1.0.19", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "0.3.32.2587_1.0.19", "version": "1.0.19", diff --git a/trains/community/recyclarr/app_versions.json b/trains/community/recyclarr/app_versions.json index 572d484c54..2d774c9827 100644 --- a/trains/community/recyclarr/app_versions.json +++ b/trains/community/recyclarr/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/recyclarr/1.0.8", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "7.2.4_1.0.8", "version": "1.0.8", diff --git a/trains/community/redis/app_versions.json b/trains/community/redis/app_versions.json index d808c49339..b0a2e54fc1 100644 --- a/trains/community/redis/app_versions.json +++ b/trains/community/redis/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/redis/1.0.7", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "7.4.1_1.0.7", "version": "1.0.7", diff --git a/trains/community/roundcube/app_versions.json b/trains/community/roundcube/app_versions.json index 7910c74f95..2c803118ef 100644 --- a/trains/community/roundcube/app_versions.json +++ b/trains/community/roundcube/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/roundcube/1.0.7", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "1.6.9-apache_1.0.7", "version": "1.0.7", diff --git a/trains/community/rsyncd/app_versions.json b/trains/community/rsyncd/app_versions.json index 28c9d9193b..f31baa0cb8 100644 --- a/trains/community/rsyncd/app_versions.json +++ b/trains/community/rsyncd/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/rsyncd/1.0.14", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "1.0.0_1.0.14", "version": "1.0.14", diff --git a/trains/community/rust-desk/app_versions.json b/trains/community/rust-desk/app_versions.json index 1ca594cbea..50b351f677 100644 --- a/trains/community/rust-desk/app_versions.json +++ b/trains/community/rust-desk/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/rust-desk/1.0.7", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "1.1.11-1_1.0.7", "version": "1.0.7", diff --git a/trains/community/sabnzbd/app_versions.json b/trains/community/sabnzbd/app_versions.json index d486917d3a..b3b75a0e45 100644 --- a/trains/community/sabnzbd/app_versions.json +++ b/trains/community/sabnzbd/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/sabnzbd/1.0.7", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "4.3.3_1.0.7", "version": "1.0.7", diff --git a/trains/community/searxng/app_versions.json b/trains/community/searxng/app_versions.json index 656aa6d9f3..ace8861d2f 100644 --- a/trains/community/searxng/app_versions.json +++ b/trains/community/searxng/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/searxng/1.0.16", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "2024.10.4-3e747d049_1.0.16", "version": "1.0.16", diff --git a/trains/community/sftpgo/app_versions.json b/trains/community/sftpgo/app_versions.json index 7080353cef..8ed37ab129 100644 --- a/trains/community/sftpgo/app_versions.json +++ b/trains/community/sftpgo/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/sftpgo/1.0.7", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "2.6.2_1.0.7", "version": "1.0.7", diff --git a/trains/community/sonarr/app_versions.json b/trains/community/sonarr/app_versions.json index 97a1033a81..08ca72c18d 100644 --- a/trains/community/sonarr/app_versions.json +++ b/trains/community/sonarr/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/sonarr/1.0.19", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "4.0.9.2244_1.0.19", "version": "1.0.19", diff --git a/trains/community/tailscale/app_versions.json b/trains/community/tailscale/app_versions.json index 71a303ac69..c009f3cfc7 100644 --- a/trains/community/tailscale/app_versions.json +++ b/trains/community/tailscale/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/tailscale/1.1.15", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "v1.74.1_1.1.15", "version": "1.1.15", diff --git a/trains/community/tautulli/app_versions.json b/trains/community/tautulli/app_versions.json index d49a438215..fea4bab723 100644 --- a/trains/community/tautulli/app_versions.json +++ b/trains/community/tautulli/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/tautulli/1.0.21", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "v2.14.6_1.0.21", "version": "1.0.21", diff --git a/trains/community/tdarr/app_versions.json b/trains/community/tdarr/app_versions.json index 7952cead78..2f50e8081b 100644 --- a/trains/community/tdarr/app_versions.json +++ b/trains/community/tdarr/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/tdarr/1.0.9", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "2.26.01_1.0.9", "version": "1.0.9", diff --git a/trains/community/terraria/app_versions.json b/trains/community/terraria/app_versions.json index 10ffd5dd8e..3630712ab7 100644 --- a/trains/community/terraria/app_versions.json +++ b/trains/community/terraria/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/terraria/1.0.6", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "tshock-1.4.4.9-5.2.0-3_1.0.6", "version": "1.0.6", diff --git a/trains/community/tftpd-hpa/app_versions.json b/trains/community/tftpd-hpa/app_versions.json index 7d80e96a29..3479afe3c6 100644 --- a/trains/community/tftpd-hpa/app_versions.json +++ b/trains/community/tftpd-hpa/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/tftpd-hpa/1.0.10", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "1.0.0_1.0.10", "version": "1.0.10", diff --git a/trains/community/tiny-media-manager/app_versions.json b/trains/community/tiny-media-manager/app_versions.json index c76a854c9f..f8b646a7d4 100644 --- a/trains/community/tiny-media-manager/app_versions.json +++ b/trains/community/tiny-media-manager/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/tiny-media-manager/1.0.6", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "5.0.12_1.0.6", "version": "1.0.6", diff --git a/trains/community/transmission/app_versions.json b/trains/community/transmission/app_versions.json index 5e12d325b7..4a1938e63a 100644 --- a/trains/community/transmission/app_versions.json +++ b/trains/community/transmission/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/transmission/1.0.6", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "4.0.6_1.0.6", "version": "1.0.6", diff --git a/trains/community/twofactor-auth/app_versions.json b/trains/community/twofactor-auth/app_versions.json index 0b7594d809..b183a4e936 100644 --- a/trains/community/twofactor-auth/app_versions.json +++ b/trains/community/twofactor-auth/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/twofactor-auth/1.0.7", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "5.3.1_1.0.7", "version": "1.0.7", diff --git a/trains/community/unifi-controller/app_versions.json b/trains/community/unifi-controller/app_versions.json index e1afac7f57..5e5078e780 100644 --- a/trains/community/unifi-controller/app_versions.json +++ b/trains/community/unifi-controller/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/unifi-controller/1.2.11", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "8.5.6_1.2.11", "version": "1.2.11", diff --git a/trains/community/unifi-protect-backup/app_versions.json b/trains/community/unifi-protect-backup/app_versions.json index 7269e70ccc..4cfd76642a 100644 --- a/trains/community/unifi-protect-backup/app_versions.json +++ b/trains/community/unifi-protect-backup/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/unifi-protect-backup/1.0.17", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "0.11.0_1.0.17", "version": "1.0.17", diff --git a/trains/community/vaultwarden/app_versions.json b/trains/community/vaultwarden/app_versions.json index 8c882bc0db..c4be508c23 100644 --- a/trains/community/vaultwarden/app_versions.json +++ b/trains/community/vaultwarden/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/vaultwarden/1.0.7", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "1.32.2_1.0.7", "version": "1.0.7", diff --git a/trains/community/vikunja/app_versions.json b/trains/community/vikunja/app_versions.json index 5bc70ac590..14bdc06449 100644 --- a/trains/community/vikunja/app_versions.json +++ b/trains/community/vikunja/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/vikunja/1.2.14", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "0.24.4_1.2.14", "version": "1.2.14", diff --git a/trains/community/webdav/app_versions.json b/trains/community/webdav/app_versions.json index 7d84b4f300..cd739f5bf5 100644 --- a/trains/community/webdav/app_versions.json +++ b/trains/community/webdav/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/webdav/1.0.13", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "2.4.62_1.0.13", "version": "1.0.13", diff --git a/trains/community/whoogle/app_versions.json b/trains/community/whoogle/app_versions.json index 0d579dc780..4186d4e4af 100644 --- a/trains/community/whoogle/app_versions.json +++ b/trains/community/whoogle/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/whoogle/1.0.20", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "0.9.0_1.0.20", "version": "1.0.20", diff --git a/trains/community/wordpress/app_versions.json b/trains/community/wordpress/app_versions.json index bb6170664a..e726aa96cb 100644 --- a/trains/community/wordpress/app_versions.json +++ b/trains/community/wordpress/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/wordpress/1.0.7", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "6.6.2_1.0.7", "version": "1.0.7", diff --git a/trains/community/zerotier/app_versions.json b/trains/community/zerotier/app_versions.json index dd6d7957f6..efbeeedbd0 100644 --- a/trains/community/zerotier/app_versions.json +++ b/trains/community/zerotier/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/community/zerotier/1.0.19", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "1.14.1_1.0.19", "version": "1.0.19", diff --git a/trains/enterprise/minio/app_versions.json b/trains/enterprise/minio/app_versions.json index ee72cf4362..9958c80025 100644 --- a/trains/enterprise/minio/app_versions.json +++ b/trains/enterprise/minio/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/enterprise/minio/1.1.7", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "RELEASE.2024-08-26T15-33-07Z_1.1.7", "version": "1.1.7", diff --git a/trains/enterprise/syncthing/app_versions.json b/trains/enterprise/syncthing/app_versions.json index 68512f3b27..ba92030e46 100644 --- a/trains/enterprise/syncthing/app_versions.json +++ b/trains/enterprise/syncthing/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/enterprise/syncthing/1.0.15", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "1.27.10_1.0.15", "version": "1.0.15", diff --git a/trains/stable/collabora/app_versions.json b/trains/stable/collabora/app_versions.json index 8c1b3d21cb..1d3d6db65b 100644 --- a/trains/stable/collabora/app_versions.json +++ b/trains/stable/collabora/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/stable/collabora/1.1.15", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "24.04.8.2.1_1.1.15", "version": "1.1.15", diff --git a/trains/stable/diskoverdata/app_versions.json b/trains/stable/diskoverdata/app_versions.json index 36e4a5dd7d..19b56ba7cb 100644 --- a/trains/stable/diskoverdata/app_versions.json +++ b/trains/stable/diskoverdata/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/stable/diskoverdata/1.3.8", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "2.3.0_1.3.8", "version": "1.3.8", diff --git a/trains/stable/elastic-search/app_versions.json b/trains/stable/elastic-search/app_versions.json index 20775967fc..ca7439f3af 100644 --- a/trains/stable/elastic-search/app_versions.json +++ b/trains/stable/elastic-search/app_versions.json @@ -1,15 +1,15 @@ { - "1.1.12": { + "1.1.13": { "healthy": true, "supported": true, "healthy_error": null, - "location": "/__w/apps/apps/trains/stable/elastic-search/1.1.12", - "last_update": "2024-10-16 19:36:28", + "location": "/__w/apps/apps/trains/stable/elastic-search/1.1.13", + "last_update": "2024-10-17 12:14:47", "required_features": [], - "human_version": "8.15.2_1.1.12", - "version": "1.1.12", + "human_version": "8.15.3_1.1.13", + "version": "1.1.13", "app_metadata": { - "app_version": "8.15.2", + "app_version": "8.15.3", "capabilities": [], "categories": [ "monitoring" @@ -49,7 +49,7 @@ ], "title": "Elastic Search", "train": "stable", - "version": "1.1.12" + "version": "1.1.13" }, "schema": { "groups": [ diff --git a/trains/stable/emby/app_versions.json b/trains/stable/emby/app_versions.json index 88a3cef63c..7ed2c3a005 100644 --- a/trains/stable/emby/app_versions.json +++ b/trains/stable/emby/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/stable/emby/1.1.13", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "4.8.10.0_1.1.13", "version": "1.1.13", diff --git a/trains/stable/home-assistant/app_versions.json b/trains/stable/home-assistant/app_versions.json index d4303e9744..f61aa70c9e 100644 --- a/trains/stable/home-assistant/app_versions.json +++ b/trains/stable/home-assistant/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/stable/home-assistant/1.2.21", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "2024.10.2_1.2.21", "version": "1.2.21", diff --git a/trains/stable/ix-app/app_versions.json b/trains/stable/ix-app/app_versions.json index 3499d77585..fa19654e9f 100644 --- a/trains/stable/ix-app/app_versions.json +++ b/trains/stable/ix-app/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/stable/ix-app/1.0.11", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "1.0.0_1.0.11", "version": "1.0.11", diff --git a/trains/stable/minio/app_versions.json b/trains/stable/minio/app_versions.json index ff9295098e..42b4e59fa5 100644 --- a/trains/stable/minio/app_versions.json +++ b/trains/stable/minio/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/stable/minio/1.1.13", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "RELEASE.2024-10-13T13-34-11Z_1.1.13", "version": "1.1.13", diff --git a/trains/stable/netdata/app_versions.json b/trains/stable/netdata/app_versions.json index 64e3f5b6fb..392c59f0da 100644 --- a/trains/stable/netdata/app_versions.json +++ b/trains/stable/netdata/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/stable/netdata/1.1.14", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "v1.47.4_1.1.14", "version": "1.1.14", diff --git a/trains/stable/nextcloud/app_versions.json b/trains/stable/nextcloud/app_versions.json index 8e74cab935..0176e47e27 100644 --- a/trains/stable/nextcloud/app_versions.json +++ b/trains/stable/nextcloud/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/stable/nextcloud/1.3.20", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "30.0.0_1.3.20", "version": "1.3.20", diff --git a/trains/stable/photoprism/app_versions.json b/trains/stable/photoprism/app_versions.json index 6c03ea9dcb..86c388a2f7 100644 --- a/trains/stable/photoprism/app_versions.json +++ b/trains/stable/photoprism/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/stable/photoprism/1.1.14", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "240915_1.1.14", "version": "1.1.14", diff --git a/trains/stable/pihole/app_versions.json b/trains/stable/pihole/app_versions.json index b0d8b99200..7d940b77f9 100644 --- a/trains/stable/pihole/app_versions.json +++ b/trains/stable/pihole/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/stable/pihole/1.1.11", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "2024.07.0_1.1.11", "version": "1.1.11", diff --git a/trains/stable/plex/app_versions.json b/trains/stable/plex/app_versions.json index c54953fd0a..2d6591db96 100644 --- a/trains/stable/plex/app_versions.json +++ b/trains/stable/plex/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/stable/plex/1.0.23", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "1.40.2.8395-c67dce28e_1.0.23", "version": "1.0.23", diff --git a/trains/stable/prometheus/app_versions.json b/trains/stable/prometheus/app_versions.json index 53c0567e03..07066415ec 100644 --- a/trains/stable/prometheus/app_versions.json +++ b/trains/stable/prometheus/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/stable/prometheus/1.1.11", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "v2.54.1_1.1.11", "version": "1.1.11", diff --git a/trains/stable/storj/app_versions.json b/trains/stable/storj/app_versions.json index cb0f511ab5..656af58ce8 100644 --- a/trains/stable/storj/app_versions.json +++ b/trains/stable/storj/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/stable/storj/1.1.10", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "6f87ea801-v1.71.2-go1.18.8_1.1.10", "version": "1.1.10", diff --git a/trains/stable/syncthing/app_versions.json b/trains/stable/syncthing/app_versions.json index 292390f20f..451b5f3798 100644 --- a/trains/stable/syncthing/app_versions.json +++ b/trains/stable/syncthing/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/stable/syncthing/1.0.28", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "1.28.0_1.0.28", "version": "1.0.28", diff --git a/trains/stable/wg-easy/app_versions.json b/trains/stable/wg-easy/app_versions.json index 7c9d52a33a..86a0e0d3eb 100644 --- a/trains/stable/wg-easy/app_versions.json +++ b/trains/stable/wg-easy/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/stable/wg-easy/1.0.20", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "14_1.0.20", "version": "1.0.20", diff --git a/trains/test/nginx/app_versions.json b/trains/test/nginx/app_versions.json index 474d0f9439..f22821d702 100644 --- a/trains/test/nginx/app_versions.json +++ b/trains/test/nginx/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/test/nginx/1.0.6", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "v1_1.0.6", "version": "1.0.6", @@ -107,7 +107,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/test/nginx/1.0.5", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "v1_1.0.5", "version": "1.0.5", @@ -200,7 +200,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/test/nginx/1.0.4", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "v1_1.0.4", "version": "1.0.4", @@ -293,7 +293,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/test/nginx/1.0.3", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "v1_1.0.3", "version": "1.0.3", diff --git a/trains/test/other-nginx/app_versions.json b/trains/test/other-nginx/app_versions.json index e95cd76aa9..165b27a65d 100644 --- a/trains/test/other-nginx/app_versions.json +++ b/trains/test/other-nginx/app_versions.json @@ -4,7 +4,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/test/other-nginx/1.0.1", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "v1_1.0.1", "version": "1.0.1", @@ -97,7 +97,7 @@ "supported": true, "healthy_error": null, "location": "/__w/apps/apps/trains/test/other-nginx/1.0.0", - "last_update": "2024-10-16 19:36:28", + "last_update": "2024-10-17 12:13:29", "required_features": [], "human_version": "v1_1.0.0", "version": "1.0.0",