mirror of
https://github.com/TECHNOFAB11/kubenix.git
synced 2025-12-12 08:00:06 +01:00
feat(k8s): allow to define customTypes from CRDs
This commit is contained in:
parent
baea3cc3b3
commit
086780088c
4 changed files with 144 additions and 59 deletions
|
|
@ -164,7 +164,7 @@ in {
|
|||
|
||||
config = {
|
||||
kubernetes.api.defaults = mapAttrsToList (attrName: default: let
|
||||
type = head (filter (type: type.attrName == attrName) config.kubernetes.api.types);
|
||||
type = head (mapAttrsToList (_: v: v) (filterAttrs (_: type: type.attrName == attrName) config.kubernetes.api.types));
|
||||
in {
|
||||
default = { imports = default; };
|
||||
} // (if (attrName == "all") then {} else {
|
||||
|
|
@ -184,6 +184,9 @@ in {
|
|||
# custom resources are now included in normal resources, so just make an alias
|
||||
kubernetes.customResources = mkAliasDefinitions options.kubernetes.resources;
|
||||
|
||||
# create custom types from CRDs was old behavior
|
||||
kubernetes.createCustomTypesFromCRDs = true;
|
||||
|
||||
kubernetes.defaultModuleConfiguration.all = {
|
||||
_file = head options.kubernetes.defaultModuleConfiguration.files;
|
||||
config.kubernetes.version = mkDefault config.kubernetes.version;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue