mirror of
https://github.com/TECHNOFAB11/kubenix.git
synced 2025-12-12 08:00:06 +01:00
Merge branch 'kubenix-2.0' of github.com:xtruder/kubenix into kubenix-2.0
This commit is contained in:
commit
ba26ce8e60
2 changed files with 8 additions and 5 deletions
12
lib/k8s.nix
12
lib/k8s.nix
|
|
@ -3,25 +3,27 @@
|
|||
with lib;
|
||||
|
||||
rec {
|
||||
mkSecretOption = {description ? "", default ? null}: mkOption {
|
||||
mkSecretOption = {description ? "", default ? {}}: mkOption ({
|
||||
inherit description;
|
||||
type = types.nullOr (types.submodule {
|
||||
options = {
|
||||
name = mkOption {
|
||||
description = "Name of the secret where secret is stored";
|
||||
type = types.str;
|
||||
default = default.name or null;
|
||||
};
|
||||
|
||||
key = mkOption {
|
||||
description = "Name of the key where secret is stored";
|
||||
type = types.str;
|
||||
default = default.key or null;
|
||||
};
|
||||
};
|
||||
|
||||
config = mkDefault (if default == null then {} else default);
|
||||
});
|
||||
default = default;
|
||||
};
|
||||
default = {};
|
||||
} // (optionalAttrs (default == null) {
|
||||
default = null;
|
||||
}));
|
||||
|
||||
secretToEnv = value: {
|
||||
valueFrom.secretKeyRef = {
|
||||
|
|
|
|||
|
|
@ -74,6 +74,7 @@ let
|
|||
};
|
||||
}));
|
||||
default = [];
|
||||
apply = unique;
|
||||
};
|
||||
|
||||
types = mkOption {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue