wip: kustomization experiments
This commit is contained in:
+19
-2
@@ -2,11 +2,27 @@
|
||||
let
|
||||
cfg = config.apps.atlantis;
|
||||
env = config.apps.env;
|
||||
|
||||
values = lib.apps.appValues {
|
||||
inherit env;
|
||||
base = ../values/atlantis;
|
||||
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
|
||||
{
|
||||
options.apps.atlantis = lib.apps.appOptions {
|
||||
@@ -27,8 +43,9 @@ in
|
||||
|
||||
config = lib.apps.appConfig cfg "${env}-atlantis" {
|
||||
helm.releases."${env}-atlantis" = {
|
||||
inherit values;
|
||||
chart = ../charts/atlantis;
|
||||
inherit values;
|
||||
chart = ../charts/atlantis;
|
||||
transformer = rs: builtins.map (x: kustomize x) rs;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user