Skip to content

Commit

Permalink
Merge branch 'master' into ix-app-v2
Browse files Browse the repository at this point in the history
  • Loading branch information
stavros-k authored Dec 5, 2024
2 parents 00abcbb + 5bcebdb commit d487b86
Show file tree
Hide file tree
Showing 586 changed files with 36,033 additions and 7,378 deletions.
260 changes: 130 additions & 130 deletions catalog.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion ix-dev/community/linkding/app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ sources:
- https://hub.docker.com/r/sissbruecker/linkding/
title: Linkding
train: community
version: 1.1.3
version: 1.1.4
40 changes: 40 additions & 0 deletions ix-dev/community/linkding/questions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ groups:
description: Configure Network for Linkding
- name: Storage Configuration
description: Configure Storage for Linkding
- name: Labels Configuration
description: Configure Labels for Linkding
- name: Resources Configuration
description: Configure Resources for Linkding

Expand Down Expand Up @@ -496,6 +498,44 @@ questions:
description: The domain to use for the SMB share.
schema:
type: string
- variable: labels
label: ""
group: Labels Configuration
schema:
type: list
default: []
items:
- variable: label
label: Label
schema:
type: dict
attrs:
- variable: key
label: Key
schema:
type: string
required: true
- variable: value
label: Value
schema:
type: string
required: true
- variable: containers
label: Containers
description: Containers where the label should be applied
schema:
type: list
items:
- variable: container
label: Container
schema:
type: string
required: true
enum:
- value: linkding
description: linkding
- value: postgres
description: postgres
- variable: resources
label: ""
group: Resources Configuration
Expand Down
2 changes: 1 addition & 1 deletion ix-dev/community/palworld/app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ sources:
- https://github.com/ich777/docker-steamcmd-server/tree/palworld
title: Palworld
train: community
version: 1.1.1
version: 1.1.2
38 changes: 38 additions & 0 deletions ix-dev/community/palworld/questions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ groups:
description: Configure Network for Palworld
- name: Storage Configuration
description: Configure Storage for Palworld
- name: Labels Configuration
description: Configure Labels for Palworld
- name: Resources Configuration
description: Configure Resources for Palworld

Expand Down Expand Up @@ -553,6 +555,42 @@ questions:
description: The domain to use for the SMB share.
schema:
type: string
- variable: labels
label: ""
group: Labels Configuration
schema:
type: list
default: []
items:
- variable: label
label: Label
schema:
type: dict
attrs:
- variable: key
label: Key
schema:
type: string
required: true
- variable: value
label: Value
schema:
type: string
required: true
- variable: containers
label: Containers
description: Containers where the label should be applied
schema:
type: list
items:
- variable: container
label: Container
schema:
type: string
required: true
enum:
- value: palworld
description: palworld
- variable: resources
label: ""
group: Resources Configuration
Expand Down
6 changes: 3 additions & 3 deletions ix-dev/community/tftpd-hpa/app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ icon: https://media.sys.truenas.net/apps/tftpd-hpa/icons/icon.png
keywords:
- tftp
- netboot
lib_version: 2.0.29
lib_version_hash: 3c2dd83143491fdfc23e5e13de9db0aa79bb7846a2b7c32a76a479e334c54590
lib_version: 2.0.32
lib_version_hash: 4a0bf69cccda322e191eab36ab81ca6d0c8e5d64a0b2fa117c609804b55b86c6
maintainers:
- email: [email protected]
name: truenas
Expand All @@ -36,4 +36,4 @@ sources:
- https://hub.docker.com/r/ixsystems/tftpd-hpa
title: TFTP Server
train: community
version: 1.1.0
version: 1.1.1
6 changes: 5 additions & 1 deletion ix-dev/community/tftpd-hpa/templates/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@
{% do c1.ports.add_port(values.network.tftp_port, values.consts.internal_tftp_port) %}
{% endif %}

{% set tftpboot_store = dict(values.storage.tftpboot, **{"host_path_config": {"auto_permission": True}}) %}
{% set tftpboot_store = tpl.funcs.copy_dict(values.storage.tftpboot) %}
{% if values.storage.tftpboot.type == "host_path" %}
{% do tftpboot_store.host_path_config.update({"auto_permission": True}) %}
{% endif %}

{% do c1.add_storage("/tftpboot", tftpboot_store) %}
{% do perm_container.add_or_skip_action("tftpboot", tftpboot_store, dict(perm_config, **{"chmod": "0757" if values.tftpd.allow_create else "0555"})) %}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import re
import copy
import bcrypt
import secrets
from base64 import b64encode
Expand Down Expand Up @@ -79,7 +80,7 @@ def _is_number(self, string):
return False

def _copy_dict(self, dict):
return dict.copy()
return copy.deepcopy(dict)

def _merge_dicts(self, *dicts):
merged_dict = {}
Expand All @@ -93,6 +94,16 @@ def _disallow_chars(self, string: str, chars: list[str], key: str):
raise RenderError(f"Disallowed character [{char}] in [{key}]")
return string

def _or_default(self, value, default):
if not value:
return default
return value

def _temp_config(self, name):
if not name:
raise RenderError("Expected [name] to be set when calling [temp_config].")
return {"type": "temporary", "volume_config": {"volume_name": name}}

def _get_host_path(self, storage):
source_type = storage.get("type", "")
if not source_type:
Expand Down Expand Up @@ -133,4 +144,6 @@ def func_map(self):
"secure_string": self._secure_string,
"disallow_chars": self._disallow_chars,
"get_host_path": self._get_host_path,
"or_default": self._or_default,
"temp_config": self._temp_config,
}
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,16 @@ def test_funcs(mock_values):
"values": [{"type": "ix_volume", "ix_volume_config": {"dataset_name": "test"}}],
"expected": "/mnt/test123",
},
{"func": "or_default", "values": [None, 1], "expected": 1},
{"func": "or_default", "values": [1, None], "expected": 1},
{"func": "or_default", "values": [False, 1], "expected": 1},
{"func": "or_default", "values": [True, 1], "expected": True},
{"func": "temp_config", "values": [""], "expect_raise": True},
{
"func": "temp_config",
"values": ["test"],
"expected": {"type": "temporary", "volume_config": {"volume_name": "test"}},
},
]

for test in tests:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,10 @@ network:
host_network: false
tftp_port: 69

ix_volumes:
tftpboot: /opt/tests/mnt/tftpboot

storage:
tftpboot:
type: ix_volume
ix_volume_config:
dataset_name: tftpboot
type: host_path
host_path_config:
path: /opt/tests/mnt/tftpboot
create_host_path: true
additional_storage: []
6 changes: 3 additions & 3 deletions ix-dev/stable/elastic-search/app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ icon: https://media.sys.truenas.net/apps/elastic-search/icons/icon.svg
keywords:
- search
- elastic
lib_version: 1.1.7
lib_version_hash: d05e43e25b7dc1736be6cc1efa4b9255368aa346e3e7a4350a38440f29b73186
lib_version: 2.0.32
lib_version_hash: 4a0bf69cccda322e191eab36ab81ca6d0c8e5d64a0b2fa117c609804b55b86c6
maintainers:
- email: [email protected]
name: truenas
Expand All @@ -29,4 +29,4 @@ sources:
- https://www.elastic.co/guide/en/elasticsearch/reference/master/docker.html#docker-configuration-methods
title: Elastic Search
train: stable
version: 1.1.19
version: 1.2.0
10 changes: 5 additions & 5 deletions ix-dev/stable/elastic-search/ix_values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ images:
tag: 8.16.1

consts:
perms_container_name: "permissions"
elastic_container_name: "elastic"
tls_key_path: "/usr/share/elasticsearch/config/certs/tls.key"
tls_cert_path: "/usr/share/elasticsearch/config/certs/tls.crt"
tls_ca_path: "/usr/share/elasticsearch/config/certs/ca.crt"
perms_container_name: permissions
elastic_container_name: elastic
tls_key_path: /usr/share/elasticsearch/config/certs/tls.key
tls_cert_path: /usr/share/elasticsearch/config/certs/tls.crt
tls_ca_path: /usr/share/elasticsearch/config/certs/ca.crt
user_id: 1000
group_id: 1000
notes_body: |
Expand Down
38 changes: 38 additions & 0 deletions ix-dev/stable/elastic-search/questions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ groups:
description: Configure Network for Elastic Search
- name: Storage Configuration
description: Configure Storage for Elastic Search
- name: Labels Configuration
description: Configure Labels for Elastic Search
- name: Resources Configuration
description: Configure Resources for Elastic Search

Expand Down Expand Up @@ -312,6 +314,42 @@ questions:
description: The domain to use for the SMB share.
schema:
type: string
- variable: labels
label: ""
group: Labels Configuration
schema:
type: list
default: []
items:
- variable: label
label: Label
schema:
type: dict
attrs:
- variable: key
label: Key
schema:
type: string
required: true
- variable: value
label: Value
schema:
type: string
required: true
- variable: containers
label: Containers
description: Containers where the label should be applied
schema:
type: list
items:
- variable: container
label: Container
schema:
type: string
required: true
enum:
- value: elastic
description: elastic
- variable: resources
label: ""
group: Resources Configuration
Expand Down
Loading

0 comments on commit d487b86

Please sign in to comment.