cluster/services/patroni: implement raw format for locksmith provider

This commit is contained in:
Max Headroom 2024-08-11 20:47:19 +02:00
parent d1f2bc1227
commit bb22fe0176
2 changed files with 5 additions and 1 deletions

View file

@ -79,6 +79,10 @@ in
echo "*:*:*:${user}:$(cat /run/keys/locksmith-provider-patroni-${user})"
rm -f /run/keys/locksmith-provider-patroni-${user}
'';
raw = ''
cat /run/keys/locksmith-provider-patroni-${user}
rm -f /run/keys/locksmith-provider-patroni-${user}
'';
}.${userConfig.locksmith.format};
checkUpdate = "test -e /run/keys/locksmith-provider-patroni-${user}";
inherit (userConfig.locksmith) nodes;

View file

@ -26,7 +26,7 @@ in
default = [];
};
format = mkOption {
type = enum [ "pgpass" "envFile" ];
type = enum [ "pgpass" "envFile" "raw" ];
default = "pgpass";
};
};