b9a8b87e7f
generate: container: Fix the image sanity check added by the last version
...
Signed-off-by: Enno Tensing <tenno@suij.in>
2025-08-13 17:52:08 +02:00
a8d0148f72
generate: container: Add or improve log messages
...
Signed-off-by: Enno Tensing <tenno@suij.in>
2025-08-12 18:33:44 +02:00
8f156e9f70
generate: container: Combine Network, Dns and Ports to ContainerNetwork
...
Signed-off-by: Enno Tensing <tenno@suij.in>
2025-08-09 20:19:30 +02:00
147e5630aa
generate: container: Create new ContainerOptions class for read_only and Co
...
Signed-off-by: Enno Tensing <tenno@suij.in>
2025-08-08 16:20:12 +02:00
7a794197f4
generate: container: Allow one volume to be mounted multiple times
...
Signed-off-by: Enno Tensing <tenno@suij.in>
2025-08-08 15:58:53 +02:00
8b7221363c
generate: container: Allow one secret to be used multiple times
...
Secret a can now be used more than once, but currently only with the same
secret type.
Signed-off-by: Enno Tensing <tenno@suij.in>
2025-08-08 15:51:53 +02:00
486a38440f
generate: container: Add command section to image configuration
...
Signed-off-by: Enno Tensing <tenno@suij.in>
2025-08-08 15:43:39 +02:00
2476d72192
generate: container: Update Network.from_json and Environment.command
...
Signed-off-by: Enno Tensing <tenno@suij.in>
2025-08-07 21:03:33 +02:00
ec61600b87
generate: container: s/container crate/container create
...
Signed-off-by: Enno Tensing <tenno@suij.in>
2025-08-07 21:00:39 +02:00
75b9b15f47
generate: container: Accept empty env section
...
Signed-off-by: Enno Tensing <tenno@suij.in>
2025-08-07 20:12:00 +02:00
b638686cc4
generate: container: Change environment-file location
...
Signed-off-by: Enno Tensing <tenno@suij.in>
2025-08-04 21:42:18 +02:00
260a0dcc52
generate: container: Improve optional feature handling
...
Things missing should now cause less problems.
Signed-off-by: Enno Tensing <tenno@suij.in>
2025-08-04 21:33:41 +02:00
6d9f63abb5
generate: container: Remove Nones and log_error() on missing optional keys
...
Signed-off-by: Enno Tensing <tenno@suij.in>
2025-08-04 20:45:52 +02:00
76b8728fec
generate: container: Fix Ports.command
...
The long option is --publish, not --ports...
Signed-off-by: Enno Tensing <tenno@suij.in>
2025-08-04 20:32:04 +02:00
0654f06a71
generate: container: The correct data type is guaranteed by maybe_or()
...
Signed-off-by: Enno Tensing <tenno@suij.in>
2025-08-01 19:28:34 +02:00
058af68169
generate: container: Implement Memory Accounting support
...
Add a Memory class and create it and its options from the Accounting
class.
Signed-off-by: Enno Tensing <tenno@suij.in>
2025-07-30 11:23:30 +02:00
a8bf51020d
generate: container: Implement timezone support
...
Get timezone from the container config and fall back to local, which
uses the hosts timezone, if the config entry is missing or not a string.
Signed-off-by: Enno Tensing <tenno@suij.in>
2025-07-30 11:07:21 +02:00
3ed71b48ef
generate: container: Switch some maybe() calls to maybe_or()
...
Some places can use maybe_or() intead of maybe(), so use it there.
Signed-off-by: Enno Tensing <tenno@suij.in>
2025-07-30 10:59:18 +02:00
487be8c49a
generate: container: Don't warn or crash on missing optional keys
...
The entire accounting section is optional, so silently ignore when it is missing.
Signed-off-by: Enno Tensing <tenno@suij.in>
2025-07-30 10:51:33 +02:00
4224112c62
generate: container: Fix Cgroup.command formatting
...
--cgroup-conf was missing the seperator.
Signed-off-by: Enno Tensing <tenno@suij.in>
2025-07-30 10:34:13 +02:00
1cd43e0c95
generate: container: Fix maybe_or()
...
isinstance() sadly can not get the type itself, so type() needs to be
called on _or first.
Signed-off-by: Enno Tensing <tenno@suij.in>
2025-07-30 10:32:15 +02:00
93245d5bc6
genreate: container: Add accounting support to Container.create
...
Add support for accouting to __init__ and create.
Signed-off-by: Enno Tensing <tenno@suij.in>
2025-07-30 10:31:02 +02:00
2a7bb0115c
generate: container: Implement Accounting, Cgroup and Cpu
...
Implment the 'Accounting', 'Cgroup', and 'Cpu' classes to control the
contaienr cgroup and cpu usage.
Signed-off-by: Enno Tensing <tenno@suij.in>
2025-07-30 10:24:51 +02:00
a601e76a93
generate: container: Enable usage of host files / directories as volumes
...
From podman-create(1):
If a volume source is specified, it must be a path on the host or the
name of a named volume. Host paths are allowed to be absolute or relative;
relative paths are resolved relative to the directory Podman is run in.
If the source does not exist, Podman returns an error. Users must pre-create
the source files or directories. Any source that does not begin with
a . or / is treated as the name of a named volume.
Implement this with the is_host_volume() check.
Signed-off-by: Enno Tensing <tenno@suij.in>
2025-07-29 10:03:14 +02:00
3616cc9abd
generate: container: Split Secret.command()'s cmd over multiple lines
...
Neatly sperate the options to one per line.
Signed-off-by: Enno Tensing <tenno@suij.in>
2025-07-29 09:46:01 +02:00
53677fb84e
generate: container: Add missing f to f-strings
...
Two f-strings where missing their f and thus volume creation and
env-file deletion where broken.
Signed-off-by: Enno Tensing <tenno@suij.in>
2025-07-29 09:42:22 +02:00
13ab593a59
generate: container: Fix printf call in Environment.create
...
When creating the env-vars printf is called with arguments in single
quotes to prevent variable and sub-shell expansions. However, only one
single quote was passed as an argument to printf, but two format
specifiers are present in the escpaed string.
Fix this by adding another \"'\" to the variable cmd.
Signed-off-by: Enno Tensing <tenno@suij.in>
2025-07-26 21:39:28 +02:00
83a2a38180
reuse: Add reuse information
...
Signed-off-by: Enno Tensing <tenno@suij.in>
2025-07-26 19:04:27 +02:00
131ff71f34
generate: container: Use ",".join() and fix Secret.command()
...
Use ",".join() instead of the custom join() method and fix
Secret.command() by checking if secret_type and not target is mount...
Signed-off-by: Enno Tensing <tenno@suij.in>
2025-07-22 16:50:24 +02:00
ca9d914449
generate: container: Remove command_join()
...
It is not used anywhere, so it can be safely removed.
Signed-off-by: Enno Tensing <tenno@suij.in>
2025-07-22 16:20:51 +02:00
72062edbf5
generate: container: Fix some issues reported by pylint
...
This fixes various issues reported by pylint. It now only reports to
issues, that can be ignored, since they're only about too many local
variables or class attributes.
Signed-off-by: Enno Tensing <tenno@suij.in>
2025-07-22 16:15:47 +02:00
e2f2b3e35f
generate: container: Fix spelling mistake
...
Search, not serach...
Signed-off-by: Enno Tensing <tenno@suij.in>
2025-07-22 15:58:53 +02:00
015f2e5a16
generate: container: Rename Container.crate to Container.create_container
...
Since the environemt creation are now seperate methods, the create and
create_container split is no longer needed.
Signed-off-by: Enno Tensing <tenno@suij.in>
2025-07-22 13:34:04 +02:00
d67dcfd466
generate: container: Remoev unused import
...
Remove an import that is no longer used.
Signed-off-by: Enno Tensing <tenno@suij.in>
2025-07-22 13:24:32 +02:00
13cbc2f403
generate: container: Update methods to use {create,remove}_environment
...
Update Container methods to use the new {create,remove}_environment
methods.
Signed-off-by: Enno Tensing <tenno@suij.in>
2025-07-22 13:22:38 +02:00
3f5ccffc4a
generate: container: Add {create,remove}_environment wrappers
...
Add {create,remove}_environment wrappers to the Container class, so that
the generate script can access them.
Signed-off-by: Enno Tensing <tenno@suij.in>
2025-07-22 13:17:35 +02:00
17adc701a8
generate: container: Remove if ! [ -d dir ] from Environment.create
...
Remove the if ! [ -d {file.parent} ] check from Envrionment.create(), as
the directory has to exists, since the script checking if it exists also
is located in that directort...
Signed-off-by: Enno Tensing <tenno@suij.in>
2025-07-22 13:08:30 +02:00
995a66c753
generate: Add python script to generate control scripts
...
Generates control scripts from a given container config. For now the
actual generate.py does nothing.
Signed-off-by: Enno Tensing <tenno@suij.in>
2025-07-22 13:00:41 +02:00