Skip to content

Commit

Permalink
zerotier: add storage
Browse files Browse the repository at this point in the history
  • Loading branch information
stavros-k committed Oct 18, 2024
1 parent b6f920f commit 5586790
Show file tree
Hide file tree
Showing 4 changed files with 82 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ix-dev/community/zerotier/app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@ sources:
- https://hub.docker.com/r/zerotier/zerotier
title: Zerotier
train: community
version: 1.0.19
version: 1.0.20
77 changes: 77 additions & 0 deletions ix-dev/community/zerotier/questions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,83 @@ questions:
schema:
type: dict
attrs:
- variable: config
label: Zerotier Config Storage
description: The path to store Zerotier Config.
schema:
type: dict
attrs:
- variable: type
label: Type
description: |
ixVolume: Is dataset created automatically by the system.</br>
Host Path: Is a path that already exists on the system.
schema:
type: string
required: true
default: "ix_volume"
enum:
- value: "host_path"
description: Host Path (Path that already exists on the system)
- value: "ix_volume"
description: ixVolume (Dataset created automatically by the system)
- variable: ix_volume_config
label: ixVolume Configuration
description: The configuration for the ixVolume dataset.
schema:
type: dict
show_if: [["type", "=", "ix_volume"]]
$ref:
- "normalize/ix_volume"
attrs:
- variable: acl_enable
label: Enable ACL
description: Enable ACL for the storage.
schema:
type: boolean
default: false
- variable: dataset_name
label: Dataset Name
description: The name of the dataset to use for storage.
schema:
type: string
required: true
immutable: true
hidden: true
default: "config"
- variable: acl_entries
label: ACL Configuration
schema:
type: dict
show_if: [["acl_enable", "=", true]]
attrs: []
- variable: host_path_config
label: Host Path Configuration
schema:
type: dict
show_if: [["type", "=", "host_path"]]
attrs:
- variable: acl_enable
label: Enable ACL
description: Enable ACL for the storage.
schema:
type: boolean
default: false
- variable: acl
label: ACL Configuration
schema:
type: dict
show_if: [["acl_enable", "=", true]]
attrs: []
$ref:
- "normalize/acl"
- variable: path
label: Host Path
description: The host path to use for storage.
schema:
type: hostpath
show_if: [["acl_enable", "=", false]]
required: true
- variable: additional_storage
label: Additional Storage
description: Additional storage for Zerotier.
Expand Down
1 change: 1 addition & 0 deletions ix-dev/community/zerotier/templates/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
data={"type": "host_path", "mount_path": tun_dev, "host_path_config": {"path": tun_dev, "create_host_path": false} },
)) %}

{% do storage_items.items.append(ix_lib.base.storage.storage_item(data=dict(values.storage.config, **{"mount_path": "/var/lib/zerotier-one"}), values=values)) %}
{% do storage_items.items.append(ix_lib.base.storage.storage_item(data={"type":"anonymous", "mount_path": "/tmp"})) %}
{% for store in values.storage.additional_storage %}
{% set _ = storage_items.items.append(ix_lib.base.storage.storage_item(data=store, values=values)) %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,7 @@ network:
host_network: true

storage:
config:
type: volume
volume_name: zerotier-config
additional_storage: []

0 comments on commit 5586790

Please sign in to comment.