Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Custom Resource Definitions #2493

Closed
maciaszczykm opened this issue Oct 18, 2017 · 25 comments
Closed

Support Custom Resource Definitions #2493

maciaszczykm opened this issue Oct 18, 2017 · 25 comments
Assignees
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete.

Comments

@maciaszczykm
Copy link
Member

maciaszczykm commented Oct 18, 2017

Third Party Resources support was removed in #2491 as it was causing some issues. We should add support for Custom Resource Definitions. It was started in #2449 by @kenan435.

@maciaszczykm maciaszczykm added help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature. priority/P1 labels Oct 18, 2017
@maciaszczykm maciaszczykm added this to the 1.8 milestone Oct 24, 2017
@maciaszczykm maciaszczykm removed this from the 1.8 milestone Nov 21, 2017
@nikhita
Copy link
Member

nikhita commented Jan 23, 2018

@maciaszczykm To clarify, this means that we don't need to support TPRs anymore, right? (TPRs have been removed in 1.8)

@floreks
Copy link
Member

floreks commented Jan 23, 2018

Correct.

@EronWright
Copy link

EronWright commented Feb 14, 2018

I bet that this has been discussed before, but I'll ask anyway. Would it be desirable that the UI be made extensible such that custom resources are rendered by appropriate UI plugins? I have a doubt that the generic experience that is articulated in docs/design/thirdpartyresources.md will be adequate.

@klustria
Copy link

Will this also cover Custom Resources created through API aggregation? This k8s doc https://kubernetes.io/docs/concepts/api-extension/custom-resources/#should-i-add-a-custom-resource-to-my-kubernetes-cluster states “Consider API aggregation if….. You want to view your new types in a Kubernetes UI, such as dashboard, alongside built-in types.“, but this seem to be not true at the moment.

@floreks
Copy link
Member

floreks commented Feb 22, 2018

CRD support has not been implemented yet. I think that we could start with generic solution similar to old TRP support and give possibility to enhance the UI using third-party plugins. We do plan to introduce plugins but still haven't decided what will be the modifications scope of such plugins (how exactly will they be able to modify UI).

@maciaszczykm maciaszczykm added lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. and removed lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. labels Feb 27, 2018
@fabiand
Copy link

fabiand commented May 28, 2018

Yes, please bundle logic and UI (cockpit does it in a similar way)

@wild-endeavor
Copy link

Is there any update on this? Still running into this problem on the dashboard.
Thanks!

@imdhruvgupta
Copy link

Hi @maciaszczykm @floreks ,
I'm Dhruv Gupta pursuing B.Tech in Information Technology. I am proficient in Javascript and have done some work in Typescript and Angular as well. I would like to make to proposal for this feature and would like to work on it.

@maciaszczykm
Copy link
Member Author

@imdhruvgupta Sorry, but this is frozen for now as it is a possible topic for Google Summer of Code.

@imdhruvgupta
Copy link

@imdhruvgupta Sorry, but this is frozen for now as it is a possible topic for Google Summer of Code.

@maciaszczykm Okay, No problem! Given the opportunity I would like to work on it during GSoC 2019. Any help would be very appreciable regarding making a good proposal.

@xxmyjk
Copy link

xxmyjk commented Apr 17, 2019

Any idea on this?

@eloyekunle
Copy link
Contributor

I am currently working on this issue for GSoC.

@maciaszczykm maciaszczykm added priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. and removed lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. labels Jul 4, 2019
@eloyekunle eloyekunle mentioned this issue Jul 8, 2019
6 tasks
@eloyekunle
Copy link
Contributor

These are the mockups for the frontend implementation:

  • Sidebar Menu and CRD List
    Sidebar menu is dynamically populated from the server.

image

  • CRD Detail Page
    The details of the CRD itself is displayed and objects created using that CRD are listed below.

image

  • Object Detail Page
    Shows the object details in structured format.
    image

Please share your thoughts.

@javajon
Copy link

javajon commented Jul 8, 2019

Good to see progress on this and nice mocks.

CRDs are not namespaced and are global to the cluster, therefore a single menu choice under Cluster. Makes more sense to have a single line called "Custom Resource Definitions" under "Cluster". Clicking on that would present a paged list of the dozens, hundreds of CRDs (Istio has 51 all by itself).

Don't put it under the "Namespace" dropdown as all those choices are relative to the selected namespace.

The primary CRD list in the context pane should first show CRDs grouped by their "Group". From that main pane each item can be drilled down on to see detailed descriptions.

@floreks
Copy link
Member

floreks commented Jul 8, 2019

I'd still consider leaving it on the bottom, maybe just use additional separator. Leaving registered CRDs under 'Custom Resource Definition' entry would make it easier to access them.

If we move it to the top then we should change CRDs list view to only list registered CRDs, then user would have to click on it to see its' details and instances.

There are pros and cons for both approaches. We should discuss it more.

@javajon
Copy link

javajon commented Jul 9, 2019

The left menu is currently not a place to enumerate individual resources. The only exception to that is the namespaces as a dropdown to allow the menu to change the selections to a specific namespace context.

@eloyekunle
Copy link
Contributor

Leaving it on the sidebar

Pros

  • Makes the registered CRDs easily accessible in the sidebar. You can click on a CRD and it takes you straight to the CRD's details page.

Cons

  • Clusters can have lots of CRDs, dozens of them. This can make the sidebar very long in such cases.

Any other Pros and Cons I'm missing?

Possible alternatives

Searchable sidebar

Add the CRD menu option to the top under Cluster, with an icon beside it which opens a search box on click. E.g. Managing projects for a Github Issue/PR:
image.

Any other suggestions?

@maciaszczykm
Copy link
Member Author

I'd start with just a CRD entry in the menu and then perhaps allow to "pin" some of the CRD types to the menu. You can store config globally in the config map for example.

@floreks
Copy link
Member

floreks commented Jul 10, 2019

+1 for pinning commonly accessed CRDs

@javajon
Copy link

javajon commented Jul 10, 2019

CRDs are simply similar to many objects/resources/items in K8s. Pods, deployments, secrets, nodes, namespaces etc. Why do anything special just for CRDs on the sidebar? If CRDs search or pinning or any other UX construct is added, then this slippery slope would add the expectation that searching and pinning would be available for all other K8s items.

KISS principle:

  • Click on Cluster | Namespace and you get a list of namespaces (paged). Click on the namespace and you get further details.
  • Click on Pods and you get a list of Pods (paged). Click on the pod and you get further details.
  • Click on Cluster | Custom Resource Definitions and you get a list of CRDs (pages). Click on the CRD and you get further details.

This would make the introduction of CRDs consistent with the rest of the dashboard design. Users would expect this consistency.

Other actions such as pinning, searching are actions that could be proposed should be for all k8s resources and outside the scope of just CRDs.

Keep the first release of CRD listing simple and clean.

@floreks
Copy link
Member

floreks commented Jul 10, 2019

Custom Resource Definition is similar to Pod resource which has an exclusive entry in our menu. It defines a new resource with its own properties. After we create CRD, we can create instances of this CRD. We could think of a Pod as a predefined Custom Resource Definition and kubernetes-dashboard-pod-xxx would be an instance of it. Every CRD registers its own endpoints for listing, creating, updating, removing instances. Same as default K8S resources.

Following this logic, every CRD should have its own entry in the menu and then after clicking on it, the user would see instances of this CRD (same as with pod list).

Right now if we follow what you have described, we will see a list of definitions. We can compare that to displaying a view with an actual Cluster|Namespace|Node|Pod|Deployment etc. list. After we click on the definition, we will see the list of actual instances and then if we pick one, its details.

@javajon
Copy link

javajon commented Jul 11, 2019

Good to call out that distinction of CR Definition vs instance of the CRD. There are many other standard Kubernetes "Kinds" seemingly missing from the left side menu. As of now the only instances of Kinds on the left side are "namespaces", but that just to change hte menu context to the namespace. All other menu actions are just general definition picks, no instances.

As the left side menu stands now, people benefit from a simple list to quickly find things. Low cognitive load. Perhaps overall, there could be a new UI construct to handle all the other K8s resources and resource instances, outside of the boxed left side menu. Something outside the scope of CRDs.

After we click on the definition, we will see the list of actual instances and then if we pick one, its details.

or

After we click on the definition, we will see the list of definitions. If we pick one CRD item the instances associated with that CRD are listed.

...works for me.

@eloyekunle
Copy link
Contributor

The initial frontend implementation of CRDs has now been merged in #4030. Please share your thoughts and observations. Cheers!

@eloyekunle
Copy link
Contributor

This support has now been added to the dashboard.

/close

@k8s-ci-robot
Copy link
Contributor

@eloyekunle: Closing this issue.

In response to this:

This support has now been added to the dashboard.

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete.
Projects
None yet
Development

No branches or pull requests