service: Use saner defaults for additional containers

This commit is contained in:
uumas
2026-03-25 19:29:30 +02:00
parent 9eaa306aa4
commit 1d180106d6
3 changed files with 99 additions and 32 deletions

View File

@@ -340,9 +340,10 @@ argument_specs:
service_additional_containers:
description:
- List of additional containers for the service.
- >
Will inherit most options from main service container. All options can be overridden
per-container.
- >-
If image is not specified, will use service container image and
inherit most options from main service container.
- All options can be overridden per-container.
type: list
required: false
default: []
@@ -363,26 +364,30 @@ argument_specs:
required: false
default: "{{ service_container_image }}"
user:
description: The UID to run as inside the container
description:
- The UID to run as inside the container.
- Defaults to <service_container_user> if same image, "" otherwise.
type: str
required: false
default: "{{ service_container_user }}"
command:
description: Command to start the container with.
description:
- Command to start the container with.
- Defaults to <service_container_command> if same image, [] otherwise.
type: list
required: false
default: []
elements: str
entrypoint:
description: Entrypoint to use in the container
description:
- Entrypoint to use in the container
- Defaults to <service_container_entrypoint> if same image, "" otherwise.
type: str
required: false
default: ""
mounts:
description: List of bind mounts or volumes to be mounted inside the container.
description:
- List of bind mounts or volumes to be mounted inside the container.
- Defaults to <service_container_mounts> if same image, [] otherwise.
type: list
required: false
default: "{{ service_container_mounts }}"
elements: dict
options:
type:
@@ -450,10 +455,11 @@ argument_specs:
required: false
default: []
devices:
description: List of devices to be added inside the container.
description:
- List of devices to be added inside the container.
- Defaults to <service_container_devices> if same image, [] otherwise.
type: list
required: false
default: "{{ service_container_devices }}"
elements: dict
options:
source:
@@ -506,15 +512,17 @@ argument_specs:
type: int
required: false
env:
description: A dict of environment variables for the container
description:
- A dict of environment variables for the container
- Defaults to <service_container_env> if same image, {} otherwise.
type: dict
required: false
default: "{{ service_container_env }}"
add_capabilities:
description: List of capabilities to add to the container
description:
- List of capabilities to add to the container
- Defaults to <service_container_add_capabilities> if same image, [] otherwise.
type: list
required: false
default: "{{ service_container_add_capabilities }}"
elements: str
secrets:
description:
@@ -525,9 +533,9 @@ argument_specs:
A dict of secrets and their values (including autogenerated values) is available as
`service_podman_secrets` for use in templates. This should only be used if the
container doesn't support reading the secret from file or environment variable.
- Defaults to <service_container_secrets> if same image, [] otherwise.
type: list
required: false
default: "{{ service_container_secrets }}"
elements: dict
options:
name: