mirror of
https://github.com/TECHNOFAB11/kubenix.git
synced 2025-12-12 08:00:06 +01:00
feat(k8s): improve aliased resource naming
This commit is contained in:
parent
3d149d6101
commit
ec3f7ecb10
12 changed files with 808 additions and 790 deletions
|
|
@ -322,6 +322,7 @@ in {
|
|||
|
||||
# import of yaml files
|
||||
(map (i: let
|
||||
# load yaml file
|
||||
object = loadYAML i;
|
||||
groupVersion = splitString "/" object.apiVersion;
|
||||
name = object.metadata.name;
|
||||
|
|
@ -331,7 +332,7 @@ in {
|
|||
then "core" else head groupVersion;
|
||||
kind = object.kind;
|
||||
in {
|
||||
${group}.${version}.${kind}.${name} = object;
|
||||
resources.${group}.${version}.${kind}.${name} = object;
|
||||
}) cfg.imports));
|
||||
|
||||
kubernetes.objects = mkMerge [
|
||||
|
|
@ -341,13 +342,6 @@ in {
|
|||
cfg.api.resources.${type.group}.${type.version}.${type.kind}
|
||||
) cfg.api.types))
|
||||
|
||||
# latest resources
|
||||
(flatten (map (type:
|
||||
if type.name == null then []
|
||||
else mapAttrsToList (name: resource: moduleToAttrs resource)
|
||||
cfg.api.resources.${type.name}
|
||||
) cfg.api.types))
|
||||
|
||||
# passthru of child kubernetes objects if passthru is enabled on submodule
|
||||
# and submodule has k8s module loaded
|
||||
(flatten (mapAttrsToList (_: submodule:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue