Return KubeObject for successfully created unknown resources

Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
This commit is contained in:
Lauri Nevala committed 2020-07-29 11:25:39 +03:00
1 parent 4bd29a6d88
commit e6fa314fd8
1 file changed
+4
@@ -18,7 +18,11 @@ export const resourceApplierApi = {
.then(data => {
const items = data.map(obj => {
const api = apiManager.getApi(obj.metadata.selfLink);
if (api) {
return new api.objectConstructor(obj);
} else {
return new KubeObject(obj)
}
});
return items.length === 1 ? items[0] : items;
});