9e1beb6895
Rewrite of some of the Apps to Nix. Tried to convert
ApplicationSets to simple Applications with an ${env}
modifier.
39 lines
976 B
Nix
39 lines
976 B
Nix
{ 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;
|
|
};
|
|
};
|
|
} |