wip: kustomization experiments
This commit is contained in:
@@ -2,11 +2,27 @@
|
|||||||
let
|
let
|
||||||
cfg = config.apps.atlantis;
|
cfg = config.apps.atlantis;
|
||||||
env = config.apps.env;
|
env = config.apps.env;
|
||||||
|
|
||||||
values = lib.apps.appValues {
|
values = lib.apps.appValues {
|
||||||
inherit env;
|
inherit env;
|
||||||
base = ../values/atlantis;
|
base = ../values/atlantis;
|
||||||
extraValues = {};
|
extraValues = {};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
kustomize = r:
|
||||||
|
if r.kind == "Deployment" then
|
||||||
|
lib.attrsets.recursiveUpdate r {
|
||||||
|
spec.template.spec.containers =
|
||||||
|
builtins.map (x:
|
||||||
|
x // {
|
||||||
|
livenessProbe.httpGet.path = "/healthz";
|
||||||
|
readinessProble.httpGet.path = "/healthz";
|
||||||
|
env = x.env ++ [ { name = "INERNAL_PORT"; value = 8000; } ];
|
||||||
|
}) r.spec.template.spec.containers;
|
||||||
|
}
|
||||||
|
else if r.kind == "Service" then
|
||||||
|
{}
|
||||||
|
else r;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.apps.atlantis = lib.apps.appOptions {
|
options.apps.atlantis = lib.apps.appOptions {
|
||||||
@@ -29,6 +45,7 @@ in
|
|||||||
helm.releases."${env}-atlantis" = {
|
helm.releases."${env}-atlantis" = {
|
||||||
inherit values;
|
inherit values;
|
||||||
chart = ../charts/atlantis;
|
chart = ../charts/atlantis;
|
||||||
|
transformer = rs: builtins.map (x: kustomize x) rs;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user