Postgres: Added option depends_on (#71)

* Added option depends_on which will be useful to append extra depends_on configuration to the <name>-init process.

* more meaningful `depends_on` option's description

---------

Co-authored-by: shivaraj-bh <sbh69840@gmail.com>
This commit is contained in:
Rohit Singh 2023-12-28 20:44:32 +05:30 committed by GitHub
parent d6b73e401e
commit 2211042f3e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -230,6 +230,24 @@ in
'';
};
depends_on = lib.mkOption {
description = "Extra process dependency relationships for `${name}-init` process.";
type = types.nullOr (types.attrsOf (types.submodule {
options = {
condition = lib.mkOption {
type = types.enum [
"process_completed"
"process_completed_successfully"
"process_healthy"
"process_started"
];
example = "process_healthy";
};
};
}));
default = null;
};
initialDumps = lib.mkOption {
type = types.listOf types.path;
default = [ ];
@ -290,6 +308,7 @@ in
in
{
command = setupScript;
depends_on = config.depends_on;
namespace = name;
};