Commit graph

18 commits

Author SHA1 Message Date
lillecarl
3cd366c3bd apiMappings from imports should be default value 2026-02-16 20:38:15 +00:00
lillecarl
b88b7b9623 derive apiMappings from CRDs in importers instead of kubernetes.nix
Move CRD-to-apiMapping extraction into importyaml.nix and helm.nix where
raw objects are available before module evaluation, breaking the infinite
recursion cycle that occurred when kubernetes.nix read CRD data from
config.kubernetes.objects (which triggered submodule evaluation that
depended on apiMappings).

Drop the apiVersions default in helm.nix that referenced apiMappings,
since it created a dependency from helm objects back to apiMappings.
Users can still pass a hardcoded list if a chart needs it.
2026-01-31 19:18:17 +00:00
lillecarl
eb2a380f7b kubeListsToAttrs: skip CustomResourceDefinition objects 2026-01-31 18:43:16 +00:00
lillecarl
255f0da314 helm: better tracing when importing broken manifests 2026-01-20 08:07:06 +00:00
lillecarl
70ba20d76f helm: filter null root objects 2026-01-20 08:06:39 +00:00
lillecarl
0194dcf575 simplify helm -> kubernetes.objects insertion 2026-01-20 06:55:40 +00:00
lillecarl
aa7bf3ad3b helm: remove overrideNamespace which is dumb asf 2026-01-20 06:36:07 +00:00
Carl Andersson
b5f0a09c8e helm: support chart paths 2025-10-25 16:40:39 +02:00
Carl Andersson
85ddaf23cb Add examples to overrides 2025-10-21 13:45:41 +02:00
Carl Andersson
f215aad2bc helm: Same imroved error reporting as importyaml 2025-10-21 13:39:46 +02:00
Carl Andersson
948dd2050e helm: Rework overrideNamespace
Use same style as importyaml.
Only override namespace on namespaced resources

We need to handle the namespace case specifically since it's part of
the attribute path for resources and can't rely on the "overrides"
functionality for this since it relies on the module system to to the
merging and we don't have the resources as part of the module system
when deciding the attrkey
2025-10-21 12:55:23 +02:00
Carl Andersson
119210c2e0 Set overrides type to json format compatible 2025-10-21 02:37:50 +02:00
Carl Andersson
c6ae8138d0 Implement convertLists for Helm and importyaml
This converts lists where all elements have the name attributes into
attrsets where the name is inherited from the element. Except for a
special case (initContainers) where execution order is determined by
list order.
All other lists are converted into attrsets with an index as name so
that they're also easily overrideable. This is an optional setting that
takes the bad parts out of using imported manifests.
2025-10-20 10:10:50 +02:00
Carl Andersson
5fa4336f8f Support setting Helm renderer package
Users are still going to use nixpkgs default for fetching. That's fine
unless we want to change the module API to include all parameters for
chart fetching, which would gain nothing.
2025-10-15 02:50:58 +02:00
Carl Andersson
9bf2cbec32 Use overlays to extend pkgs instead of passing Helm specialArgs
Move writeMultipleFiles to pkgs
Add empty lib overlay
2025-10-15 02:45:41 +02:00
Carl Andersson
09e6569dc5 Move kubernetes package options
From validation into kubernetes, makes more sense there.
2025-10-14 16:23:17 +02:00
Carl Andersson
12c92f4235 Use JSON format type instead of types.anything 2025-10-14 16:19:20 +02:00
Carl Andersson
3103a2ad4c Initial commit 2025-10-13 16:25:19 +02:00