feat(k8s): deprecate createCustomTypesFromCRDs, only support in legacy

This commit is contained in:
Jaka Hudoklin 2020-04-04 18:26:11 +07:00
parent 13e47144fd
commit 3534f5fc61
2 changed files with 9 additions and 19 deletions

View file

@ -190,8 +190,15 @@ in {
) config.kubernetes.modules
);
# create custom types from CRDs was old behavior
createCustomTypesFromCRDs = true;
# custom types created from customResourceDefinitions
customTypes =
mapAttrsToList (name: crd: {
group = crd.spec.group;
version = crd.spec.version;
kind = crd.spec.names.kind;
name = crd.spec.names.plural;
attrName = mkOptionDefault name;
}) (config.kubernetes.resources.customResourceDefinitions or {});
defaultModuleConfiguration.all = {
_file = head options.kubernetes.defaultModuleConfiguration.files;