mirror of
https://github.com/TECHNOFAB11/kubenix.git
synced 2025-12-13 00:20:07 +01:00
feat(submodules): support for submodule passthru
This commit is contained in:
parent
7afbc91301
commit
a8dcc69d54
5 changed files with 30 additions and 30 deletions
|
|
@ -363,21 +363,10 @@ in {
|
|||
resources.${group}.${version}.${kind}.${name} = object;
|
||||
}) cfg.imports));
|
||||
|
||||
kubernetes.objects = mkMerge [
|
||||
# versioned resources
|
||||
(flatten (map (type:
|
||||
mapAttrsToList (name: resource: moduleToAttrs resource)
|
||||
cfg.api.resources.${type.group}.${type.version}.${type.kind}
|
||||
) cfg.api.types))
|
||||
|
||||
# passthru of child kubernetes objects if passthru is enabled on submodule
|
||||
# and submodule has k8s module loaded
|
||||
(flatten (mapAttrsToList (_: submodule:
|
||||
optionals
|
||||
(submodule.passthru.enable && (elem "k8s" submodule.config._module.features))
|
||||
submodule.config.kubernetes.objects
|
||||
) config.submodules.instances))
|
||||
];
|
||||
kubernetes.objects = flatten (map (type:
|
||||
mapAttrsToList (name: resource: moduleToAttrs resource)
|
||||
cfg.api.resources.${type.group}.${type.version}.${type.kind}
|
||||
) cfg.api.types);
|
||||
|
||||
kubernetes.generated = k8s.mkHashedList {
|
||||
items = config.kubernetes.objects;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue