From 1cd24badac999c1487ed994464bdaeceed62bc52 Mon Sep 17 00:00:00 2001 From: lillecarl Date: Mon, 19 Jan 2026 13:39:27 +0000 Subject: [PATCH] add filter function list just for consistency --- kubernetes.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/kubernetes.nix b/kubernetes.nix index b94e32e..08a16e2 100644 --- a/kubernetes.nix +++ b/kubernetes.nix @@ -160,6 +160,12 @@ in ''; }; + filters = lib.mkOption { + type = lib.types.listOf (lib.types.functionTo lib.types.bool); + default = [ ]; + description = "List of functions that filter resources"; + }; + apiMappings = lib.mkOption { type = lib.types.attrsOf lib.types.str; default = { }; @@ -246,6 +252,8 @@ in ) # Run a transformation pass over all resources (map (resource: lib.pipe resource cfg.transformers)) + # Run filter pass over all resources + (lib.filter (resource: lib.all (function: function resource) cfg.filters)) # Convert attrset with _namedlist attribute true to lists. This is useful # when we want to override things in the Kubernetes containers list for # example.