Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1875018

Summary: Cannot create a Kubernetes List object via the UI
Product: OpenShift Container Platform Reporter: Erik M Jacobs <ejacobs>
Component: Management ConsoleAssignee: Zac Herman <zherman>
Status: CLOSED NOTABUG QA Contact: Yadan Pei <yapei>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.5CC: aos-bugs, jhadvig, jokerman, nmukherj, sdoyle
Target Milestone: ---Keywords: UpcomingSprint
Target Release: 4.7.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-10-05 15:35:32 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Erik M Jacobs 2020-09-02 18:20:20 UTC
Description of problem:
It appears to be impossible to create a valid k8s List object using the UI

Version-Release number of selected component (if applicable):
4.5.7

How reproducible:
100%

Steps to Reproduce:
1. Go to developer perspective
2. Click +Add
3. Choose "from yaml"
4. enter the following valid YAML

apiVersion: v1
kind: List
items:
- apiVersion: v1
  kind: Service
  metadata:
    name: list-service-test
  spec:
    ports:
    - protocol: TCP
      port: 80
    selector:
      app: list-deployment-test
- apiVersion: apps/v1
  kind: Deployment
  metadata:
    name: list-deployment-test
    labels:
      app: list-deployment-test
  spec:
    replicas: 1
    selector:
      matchLabels:
        app: list-deployment-test
    template:
      metadata:
        labels:
          app: list-deployment-test
      spec:
        containers:
          - name: nginx
            image: nginx


Actual results:
An error: 
The server doesn't have a resource type "kind: List, apiVersion: v1".

Expected results:
It should create the objects

Additional info:
Doing this via "oc create -f foo.yaml" works fine with the same content.

Comment 1 Serena 2020-09-02 18:37:10 UTC
List doesn't show up in the Explore or Search pages in Admin.  Moving to Management Console

Comment 2 Zac Herman 2020-10-02 15:08:52 UTC
Lower priority so did not make the cutoff.  Pushing to next sprint.

Comment 3 Zac Herman 2020-10-05 15:35:32 UTC
Quoting from the issues pages of kubernetes https://github.com/kubernetes/kubectl/issues/837 - 

I think this is because List is not actually a "resource". Each resource can have an associated list type, PodList or CronJobList, but those are not actually resources. And each of those lists is represented in yaml by kind: List.

If you do a kubectl api-resources you should see a list of resources and kubectl explain should work for any of these:

$ kubectl api-resources
NAME                              SHORTNAMES   APIGROUP                       NAMESPACED   KIND
bindings                                                                      true         Binding
componentstatuses                 cs                                          false        ComponentStatus
configmaps                        cm                                          true         ConfigMap
endpoints                         ep                                          true         Endpoints
events                            ev                                          true         Event
limitranges                       limits                                      true         LimitRange
namespaces                        ns                                          false        Namespace
nodes                             no                                          false        Node
persistentvolumeclaims            pvc                                         true         PersistentVolumeClaim
...truncating for space...

I believe we are handling this properly and therefore I am closing this bug.