Bug 1875018 - Cannot create a Kubernetes List object via the UI
Summary: Cannot create a Kubernetes List object via the UI
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 4.5
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.7.0
Assignee: Zac Herman
QA Contact: Yadan Pei
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-09-02 18:20 UTC by Erik M Jacobs
Modified: 2020-10-05 15:35 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-10-05 15:35:32 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.