-
Bug
-
Resolution: Done-Errata
-
Minor
-
4.12.0
-
No
-
ODC Sprint 236
-
1
-
Rejected
-
False
-
Description of problem:
Version-Release number of selected component (if applicable):
All versions?
At least on 4.12+
How reproducible:
Always
Steps to Reproduce:
- Open the console and click on the + sign in the top right navigation header.
This JSON works fine:
{ "apiVersion": "v1", "kind": "ConfigMap", "metadata": { "generateName": "a-configmap-" } }
But neither an array could be used to import multiple resources:
[ { "apiVersion": "v1", "kind": "ConfigMap", "metadata": { "generateName": "a-configmap-" } }, { "apiVersion": "v1", "kind": "ConfigMap", "metadata": { "generateName": "a-configmap-" } } ]
Fails with error: No "apiVersion" field found in YAML.
Nor a Kubernetes List "resource" could be used:
{ "apiVersion": "v1", "kind": "List", "items": [ { "apiVersion": "v1", "kind": "ConfigMap", "metadata": { "generateName": "a-configmap-" } }, { "apiVersion": "v1", "kind": "ConfigMap", "metadata": { "generateName": "a-configmap-" } } ] }
Fails with error: The server doesn't have a resource type "kind: List, apiVersion: v1".
Actual results:
Both JSON structures could not be imported.
Expected results:
Both JSON structures works fine and create multiple resources.
If the JSON array contains just one item the resource detail page should be opened, otherwise the import result page similar to when the user imports a yaml with multiple resources.
Additional info:
Found this JSON structure for example in issue OCPBUGS-4646
- blocks
-
OCPBUGS-14310 Could not import multiple resources via JSON (while YAML supports this)
- Closed
- is cloned by
-
OCPBUGS-14310 Could not import multiple resources via JSON (while YAML supports this)
- Closed
- links to
-
RHEA-2023:5006 rpm