Commit graph

65 commits

Author SHA1 Message Date
lillecarl
20c74bdc38 todo, todont 2026-01-31 18:40:57 +00:00
lillecarl
945cab25b6 dump specialargs 2026-01-31 18:40:47 +00:00
lillecarl
724859ec1b fmt 2026-01-21 17:23:32 +00:00
lillecarl
672d465dc6 helm: don't filter anything before it hits Nix 2026-01-20 08:08:43 +00:00
lillecarl
7941d48ea9 importyaml: align with Helm 2026-01-20 08:07:43 +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
4e73ba0d6d kluctl: add skipDeleteIfTags globally 2026-01-20 06:55:40 +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
lillecarl
c7408e7333 rename kubernetes.resources -> kubernetes.objects 2026-01-20 06:35:09 +00:00
lillecarl
1cd24badac add filter function list
just for consistency
2026-01-19 14:45:43 +00:00
lillecarl
97bca5365b convert generators from attrset -> listof attrset to attrset -> attrset
if you need to generate more than one resource per resource you're a true special snowflake
2026-01-19 14:44:56 +00:00
lillecarl
e4f5567500 Don't filter nulls by default, let transformers decide instead 2026-01-19 14:43:55 +00:00
lillecarl
6273746ef1 add generatedByPath attrset. mimics kubernetes.resources with everything applied to it 2026-01-19 14:36:01 +00:00
lillecarl
3e924040f6 simplify apiVersion lookup slightly 2026-01-19 14:34:45 +00:00
lillecarl
0f733d8627 exclude namespace option since it's optional 2026-01-19 13:40:44 +00:00
lillecarl
baf3f1d63a move apiVersion, kind and name backfilling into the module system proper
looks worse but is better
2026-01-19 13:13:08 +00:00
lillecarl
2aae7369b8 add generators option which allows generating resources from resources, useful for VPA 2026-01-19 12:36:54 +00:00
lillecarl
d8a0ef321c runCommandLocal -> runCommand
useless optimization in this case
2026-01-12 17:31:31 +00:00
lillecarl
a4af992573 add kubernetes.transformers option
this option allows you to add transformer functions that'll run over each
resource in the cluster, useful for adding metadata to all or some resources
2026-01-12 15:59:41 +00:00
lillecarl
80e022a4c1 add postDeployScript 2026-01-09 20:30:03 +00:00
lillecarl
b3b9997e93 convert preDeployScript to lines type 2026-01-09 20:30:01 +00:00
lillecarl
f6ac33b8e0 don't require apiMappings for resources that has apiVersion set 2025-12-12 10:56:09 +01:00
Carl Andersson
31d4df88af fix mkNumberedList 2025-11-24 01:17:30 +01:00
Carl Andersson
6601749776 runCommandLocal -> runCommand 2025-11-23 18:57:51 +01:00
Carl Andersson
01cedc5d8c Add hashAttrs helper to lib 2025-11-19 21:49:26 +01:00
Carl Andersson
36e3e4b72f Better error reporting when no apiMappings can be found 2025-11-12 21:53:45 +01:00
Carl Andersson
c9bbdfd70a runCommandNoCCLocal -> runCommandLocal 2025-11-01 19:52:10 +01:00
Carl Andersson
b0c78e8b05 Change pushManifest into preDeployScript
Much more generic, allows users to do whatever they want with the manifest ahead of time.
2025-10-27 18:04:39 +01:00
Carl Andersson
b5f0a09c8e helm: support chart paths 2025-10-25 16:40:39 +02:00
Carl Andersson
fa1fc178f7 Make failCachePush default true 2025-10-24 17:59:57 +02:00
Carl Andersson
ae89ea7769 Implement support to fail deployment if cache push fails
Rewrite deployment script in bash
2025-10-23 16:07:38 +02:00
Carl Andersson
8bddef6e01 Implement support for pushing manifests to cache
This is very conveninent in combination with nix-csi
2025-10-23 15:50:33 +02:00
Carl Andersson
635bd0cfbb Add assertions module 2025-10-23 15:44:52 +02:00
Carl Andersson
50d419507c Add YAML document representation too
Might be something someone somewhere wants
2025-10-21 16:15:24 +02:00
Carl Andersson
1afb98f178 Implement kubeconform validation 2025-10-21 16:09:15 +02:00
Carl Andersson
2bbb388f25 Oops, stringdata is for secrets 2025-10-21 16:09:02 +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
67f221ef11 Implement better error reporting in importyaml
Report if namespacedMappings doesn't have entry for the kind and we're trying to override
2025-10-21 13:39:22 +02:00
Carl Andersson
8ac1ef6583 kluctl: Apply resources by priority instead of kind
This means we can group multiple kinds into one barrier deployment
2025-10-21 13:35:04 +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
583be3aedc importyaml: rework overrideNamespace
Don't do any deep search for namespace attributes.
Only apply namespace override to namespaced resources.
2025-10-21 12:53:29 +02:00
Carl Andersson
7056e70e19 Add namespacedMappings for API resources
This is needed for conditionally overriding namespace on imported resources.
2025-10-21 12:51:28 +02:00
Carl Andersson
119210c2e0 Set overrides type to json format compatible 2025-10-21 02:37:50 +02:00
Carl Andersson
508175238c Add mkNamedList and mkNumberedList helpers
Validates the attrsets and sets the "special scauce" attr
2025-10-20 12:35:30 +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
03c69a0f63 Implement converting to and from _namedlist
With this we'll be able to convert imported resources into attrsets that
we can easily override with Nix. Then we convert back into lists that
Kubernetes expects.
2025-10-20 08:52:23 +02:00
Carl Andersson
e9a6c674a5 Add TODO 2025-10-19 15:05:35 +02:00