mirror of
https://github.com/TECHNOFAB11/kubenix.git
synced 2025-12-12 08:00:06 +01:00
Implemented features: - Improved and reimplemented submodule system, independent of kubernetes module definitions - Pre-generated kubernetes module definitions with explicit API versioning support
35 lines
713 B
Nix
35 lines
713 B
Nix
{ lib, ... }:
|
|
|
|
with lib;
|
|
|
|
let
|
|
k8s = {
|
|
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;
|
|
};
|
|
|
|
key = mkOption {
|
|
description = "Name of the key where secret is stored";
|
|
type = types.str;
|
|
};
|
|
};
|
|
|
|
config = mkDefault default;
|
|
});
|
|
default = {};
|
|
};
|
|
|
|
secretToEnv = value: {
|
|
valueFrom.secretKeyRef = {
|
|
inherit (value) name key;
|
|
};
|
|
};
|
|
};
|
|
in {
|
|
_module.args.k8s = k8s;
|
|
}
|