Add more Nix Apps
Rewrite of some of the Apps to Nix. Tried to convert
ApplicationSets to simple Applications with an ${env}
modifier.
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
{ lib, config, ... }:
|
||||
let
|
||||
cfg = config.apps.rabbitmq;
|
||||
env = config.apps.env;
|
||||
|
||||
values = lib.apps.appValues {
|
||||
inherit env;
|
||||
base = ../values/rabbitmq;
|
||||
extraValues = {};
|
||||
};
|
||||
in
|
||||
{
|
||||
options.apps.rabbitmq = lib.apps.appOptions {
|
||||
enable = lib.mkEnableOption "RabbitMQ";
|
||||
revision = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "12.9.0";
|
||||
description = "RabbitMQ chart version";
|
||||
};
|
||||
hostname = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
description = "RabbitMQ hostname";
|
||||
default = "rabbitmq.${env}.oceanbox.io";
|
||||
};
|
||||
};
|
||||
config = lib.apps.appConfig cfg "${env}-rabbitmq" {
|
||||
namespace = "rabbitmq";
|
||||
helm.releases.rabbitmq = {
|
||||
inherit values;
|
||||
chart = lib.helm.downloadHelmChart {
|
||||
repo = "https://charts.bitnami.com/bitnami";
|
||||
chart = "rabbitmq";
|
||||
version = cfg.revision;
|
||||
chartHash = "";
|
||||
};
|
||||
transformer = rs: builtins.map (x: kustomize x) rs;
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user