use unstructured builder - oc export
@@ -110,8 +110,17 @@ func RunExport(f *clientcmd.Factory, exporter Exporter, in io.Reader, out io.Wri
return err
}
- mapper, typer := f.Object()
- b := f.NewBuilder(true).
+ builder, err := f.NewUnstructuredBuilder(true)
+ if err != nil {
+ return err
+ }
+
+ mapper, typer, err := f.UnstructuredObject()
+ if err != nil {
+ return err
+ }
+
+ b := builder.
NamespaceParam(cmdNamespace).DefaultNamespace().AllNamespaces(allNamespaces).
FilenameParam(explicit, &resource.FilenameOptions{Recursive: false, Filenames: filenames}).
SelectorParam(selector).
