Better error reporting when no apiMappings can be found
This commit is contained in:
parent
c9bbdfd70a
commit
36e3e4b72f
1 changed files with 8 additions and 1 deletions
|
|
@ -131,7 +131,14 @@ in
|
|||
# so any user-defined values for these fields will take precedence.
|
||||
lib.recursiveUpdate (
|
||||
{
|
||||
apiVersion = cfg.apiMappings.${kind};
|
||||
apiVersion =
|
||||
if lib.hasAttr kind cfg.apiMappings then
|
||||
cfg.apiMappings.${kind}
|
||||
else
|
||||
builtins.throw ''
|
||||
Resource kind: ${kind} name: ${name} has no apiMappings
|
||||
${builtins.toJSON resourceAttrs}
|
||||
'';
|
||||
kind = kind;
|
||||
metadata.name = name;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue