From 056fe3e9223e2fead07331a4d6fecf2f6c343828 Mon Sep 17 00:00:00 2001 From: Luis Rascao Date: Thu, 5 Nov 2020 17:21:48 +0000 Subject: [PATCH] Allow default inclusion of .conf files beneath conf.d --- src/cuttlefish_conf.erl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/cuttlefish_conf.erl b/src/cuttlefish_conf.erl index 2adb63b..3396446 100644 --- a/src/cuttlefish_conf.erl +++ b/src/cuttlefish_conf.erl @@ -113,6 +113,12 @@ generate_file(Mappings, Filename) -> _ = [ begin io:format(S, "~s~n", [lists:flatten(Line)]) end || Line <- ConfFileLines], + % add an include directive at the end that will allow + % other conf files in `conf.d` and have them get picked up + % in order to override settings + % example use case is a k8s configMap that is mapped as a file + % to conf.d/erlang_vm.conf + io:format(S, "include conf.d/*.conf~n~n"), _ = file:close(S), ok.