1
0
Fork 0
mirror of https://git.sr.ht/~goorzhel/turboprop synced 2024-12-14 11:37:37 +00:00

Add kyverno

I have my answer to 2638113, and it's what I was suspecting: the
flake-builder was never using clusterData until I added a release
that needs it, at which point I got the dreaded "error: attribute
'apiVersions' missing".

Remediation was simple: realize the wrongheadedness of passing
an empty attrset when the values are already well-known.
This commit is contained in:
Antonio Gurgel 2023-11-21 20:58:13 -08:00
parent dc3060aa30
commit 6aff849da7
3 changed files with 18 additions and 9 deletions

View file

@ -47,6 +47,7 @@
inherit system;
overlays = [devshell.overlays.default];
};
kubeVersion = pkgs.k3s.version;
kubelib = nix-kube-generators.lib {inherit pkgs;};
# When I move lib/eureka to a separate flake
@ -59,9 +60,13 @@
charts = buildDerivations.charts self.repos;
systemReleases = buildDerivations.releases self.systemReleaseData {};
systemReleases = buildDerivations.releases self.systemReleaseData {
inherit kubeVersion;
apiVersions = [];
};
clusterData = {
kubeVersion = pkgs.k3s.version;
inherit kubeVersion;
apiVersions =
pkgs.lib.lists.flatten
(map

View file

@ -43,13 +43,6 @@ in {
# Values understood by lib.builders.helmChart
# and ignored by the rest.
# COMBAK: How in the world does this work when
# clusterData is empty, as it is when building
# the flake's `systemReleases`?
# When I do this in a REPL:
# > foo={a=1;}
# > {inherit(foo)b;}
# ... I get an attribute-missing error.
inherit (clusterData) kubeVersion apiVersions;
})
# By injecting `name` and `namespace` here, I remove

View file

@ -0,0 +1,11 @@
{
charts,
lib,
...
}: {
builder = lib.builders.helmChart;
args = {
chart = charts.kyverno.kyverno;
values = {replicaCount = 3;};
};
}