wip: figuring out how to do multiple envs and stuff
This commit is contained in:
@@ -25,6 +25,24 @@
|
||||
description = "Enable server-side diffing";
|
||||
};
|
||||
|
||||
namespace = mkOption {
|
||||
type = types.string;
|
||||
default = null;
|
||||
description = "Namespace";
|
||||
};
|
||||
|
||||
project = mkOption {
|
||||
type = types.string;
|
||||
default = "default";
|
||||
description = "Project";
|
||||
};
|
||||
|
||||
cluster = mkOption {
|
||||
type = types.string;
|
||||
default = "https://kubernetes.default.svc";
|
||||
description = "Cluster";
|
||||
};
|
||||
|
||||
values = mkOption {
|
||||
type = types.attrsOf types.anything;
|
||||
default = {};
|
||||
@@ -55,4 +73,11 @@
|
||||
};
|
||||
|
||||
in mkIf cfg.enable { applications.${name} = app; };
|
||||
|
||||
appValues = with pkgs.lib; vs: values:
|
||||
attrsets.mergeAttrsList (lists.flatten [
|
||||
(lib.kube.fromYAML (builtins.readFile "${vs}/values.yaml"))
|
||||
(lib.kube.fromYAML (builtins.readFile "${vs}/values-${env}.yaml"))
|
||||
[ values ]
|
||||
]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user