simplify apiVersion lookup slightly
This commit is contained in:
parent
0f733d8627
commit
3e924040f6
1 changed files with 1 additions and 4 deletions
|
|
@ -211,10 +211,7 @@ in
|
|||
resourceToAttr = resource: {
|
||||
name = resource.kind;
|
||||
value =
|
||||
if !(resource ? group) || resource.group == "" then
|
||||
resource.version
|
||||
else
|
||||
"${resource.group}/${resource.version}";
|
||||
if resource.group or "" == "" then resource.version else "${resource.group}/${resource.version}";
|
||||
};
|
||||
in
|
||||
lib.listToAttrs (map resourceToAttr data.resources);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue