orange-cloudfoundry / paas-templates-public-issues

Public issues from paas-templates
Apache License 2.0
0 stars 0 forks source link

Webui for consuming custom [Crossplane] K8S CR apis #1

Open gberche-orange opened 1 year ago

gberche-orange commented 1 year ago

Expected behavior

Observed behavior

No yet webui is currently offered in paas-templates

Possible alternatives

Backstage

https://backstage.io/

An open platform for building developer portals

4 main fuctionnalities:

an exemple of what it would look like for k8s env : https://backstage.io/blog/2021/01/12/new-backstage-feature-kubernetes-for-service-owners/ https://youtu.be/VivuOxn3VQ8?si=FQchS0nChfQ_C49A

https://github.com/backstage/backstage/issues/5511 https://github.com/backstage/backstage/issues/12455

https://artifacthub.io/packages/helm/backstage/backstage

Headlamp

https://www.headlamp.dev

Headlamp is an easy-to-use and extensible Kubernetes web UI.

https://github.com/headlamp-k8s/headlamp/ https://www.headlamp.dev/docs/latest/development/frontend/

Example of head lamp custom UI for displaying custom CRDs https://github.com/epam/edp-headlamp

Pending feature suggestion to improve CRD support https://github.com/headlamp-k8s/headlamp/issues/955

https://artifacthub.io/packages/helm/headlamp/headlamp

devtron

https://github.com/devtron-labs/devtron https://docs.devtron.ai/usage/resource-browser https://preview.devtron.ai/dashboard/resource-browser/1/all/prometheusrule/monitoring.coreos.com image

portainer

https://docs.portainer.io/user/kubernetes/dashboard

https://github.com/kubernetes-sigs/kui

vscode

Theia

Lens

kubernetes/dashboard

karpor

https://www.kusionstack.io/karpor/ https://www.kusionstack.io/karpor/user-guide/insight/topology https://karpor-demo.kusionstack.io/

does not display CR as of Sep 2024. Mostly ready-only visualization

Rancher dashboard

Others

Wrapping through app installer (helm chart, carvel package, OLM package)

See sample helm chart for wrapping CRDs https://artifacthub.io/packages/search?ts_query_web=crd&sort=stars

Affected releases

Guilamb commented 9 months ago

Kubesphere -> Don't provide only a webui https://github.com/kubesphere/kubesphere?tab=readme-ov-file

kube-web-view -> Seems dead https://codeberg.org/hjacobs/kube-web-view

Guilamb commented 8 months ago

Evaluation report of WebUI for consuming custom [Crossplane] K8S CR apis

Introduction

Context of the evaluation

As a marketplace user of our platform, we needed a web UI in order to consume Kubernetes API offering provisioning capabilities such as databases, compute (Kubernetes clusters, namespaces, etc.). This web UI needed to support various operations, including authentication, namespace selection, CRD (Custom Resource Definition) discovery, creation, modification, and deletion. Additionally, we needed other Features such as a clear list of existing CRs (Custom Resources), grouping of linked CRs, visualization of their status, and the ability to view secrets. We also wanted to mask non-CR related Features for demo purposes.

Objective of the report

The main objective of this report is to share our results with the community and to provide feedback on our experiences with those services.

Overview of WebUI

Rancher: Kubernetes management platform for multi-cluster orchestration.

info

Git Repo: https://github.com/rancher/ui

Number of contributors: 141

Last commit: 3 weeks ago

Business model: Sell an Entreprise Kubernetes Management Platform

GetPort: Cloud-native platform for developing, deploying, and managing applications.

info

Git Repo: https://github.com/port-labs

Number of contributors: /

Last commit: /

Business model: Sell an open internal developer portal

kubernetes/dashboard: Official web-based user interface for Kubernetes clusters.

info

Git Repo: https://github.com/kubernetes/dashboard

Number of contributors: 370

Last commit: 28 march 2024

Business model: Unknown

Lens: Kubernetes IDE for managing and monitoring clusters and workloads.

info

Git Repo: https://github.com/lensapp/lens

Number of contributors: 112

Last commit: 3 months ago

Business model: Sell of Lens

Openshift console: Web console for managing OpenShift clusters and applications.

info ![openshift-console](https://github.com/orange-cloudfoundry/paas-templates/assets/18172904/71804754-1f2a-43b5-9baa-f2e10beef581)

Git Repo: https://github.com/openshift/console

Number of contributors: 196

Last commit: This week

Business model: Sell of Openshift

Theia: Extensible platform for building cloud and desktop IDEs.

info

Git Repo: https://github.com/vscode-kubernetes-tools

Number of contributors: 84

Last commit: last week

Business model: /

Vscode: Lightweight and extensible code editor with rich ecosystem support.

info ![vscode](https://github.com/orange-cloudfoundry/paas-templates/assets/18172904/fef20473-4186-40c0-85db-a0af3815143f)

Same as theia since the kubernetes plugin is the same

**Kui:** Command-line interface (CLI) with enhanced visualization for Kubernetes.
info Git Repo: https://github.com/kub

ernetes-sigs/kui

Number of contributors: 25

Last commit: Last year

Business model: /

Portainer: Docker container management tool with a simple web-based interface.

info

Git Repo: https://github.com/portainer/portainer/

Number of contributors: 228

Last commit: Today

Business model: Sell https://www.portainer.io/

Headlamp: Kubernetes dashboard and management tool focused on simplicity and ease of use.

info ![headlamp](https://github.com/orange-cloudfoundry/paas-templates/assets/18172904/1466be2c-1bad-40a9-94fd-161028ec7b6e)

Git Repo: https://github.com/headlamp-k8s/headlamp

Number of contributors: 40

Last commit: yesterday

Business model: /

Devtron: Continuous delivery platform for Kubernetes applications.

info ![devtron](https://github.com/orange-cloudfoundry/paas-templates/assets/18172904/3036f6e8-6a6b-4ac1-9f44-8cbad1f80cd2)

Git Repo: https://github.com/devtron-labs/devtron

Number of contributors: 104

Last commit: yesterday

Business model: Sell Enterprise version

Backstage: Developer portal and infrastructure platform for large-scale software development.

info

Git Repo: https://github.com/backstage/backstage

Number of contributors: 1429

Last commit: Today

Business model: Offered to CNCF by Spotify

Selection criteria

Our selection criteria were the following :

Screenshots of ArtifactHub.io security scans have been made the 10/04/2024 and may have evolved since.

Feature evaluation

Rancher

**Features** - [x] Authentication - [x] Namespace selection - [ ] CRDs Discovery - [ ] Creation/Modification of CRs : - [x] From YAML - [x] With Completion - [ ] With templates - [ ] From Web Forms - [x] List existing CRs - [x] Deletion of CRs - [ ] Grouping of linked CRs - [x] CRs status visualization - [x] Secrets visualization - [x] Easily customizable https://ranchermanager.docs.rancher.com/how-to-guides/new-user-guides/authentication-permissions-and-global-configuration/custom-branding **Security** https://artifacthub.io/packages/helm/rancher-stable/rancher ![image](https://github.com/orange-cloudfoundry/paas-templates/assets/18172904/9373059e-3356-4664-a8ea-51cafd7b35de) **Strenghts - Weaknesses**

Headlamp

**Features** - [x] Authentication - [ ] Namespace selection - [x] CRDs Discovery - [ ] Creation/Modification of CRs : - [x] From YAML - [ ] With Completion - [ ] With templates - [ ] From Web Forms - [x] List existing CRs - [x] Deletion of CRs - [ ] Grouping of linked CRs - [x] CRs status visualization - [x] Secrets visualization - [x] Easily customizable **Security** https://artifacthub.io/packages/helm/headlamp/headlamp ![image](https://github.com/orange-cloudfoundry/paas-templates/assets/18172904/a023c219-1ba3-4cf0-b63b-e461c84ba1ed) **Strenghts - Weaknesses** The UI is fully customizable with add-ons, and the community is strongly invested

Openshift console

**Features** Informations are based on documentation, so there are some points that need to be clarified through testing. - [x] Authentication - [ ] Namespace selection - [x] CRDs Discovery - [ ] Creation/Modification of CRs : - [x] From YAML - [ ] With Completion - [ ] With templates - [ ] From Web Forms - [x] List existing CRs - [x] Deletion of CRs - [ ] Grouping of linked CRs - [ ] CRs status visualization - [ ] Secrets visualization - [x] Easily customizable **Security** No security scan on ArtifactHub.io **Strenghts - Weaknesses** The documentation is difficult to understand. For example, on the Git repository, we don't have any screenshots of the UI or a list of functionalities.

GetPort

The solution isn't open source, so we eliminated this option.

kubernetes/dashboard

It seems that there isn't any contribution to the project anymore.

Lens

The open-source web version is deprecated, so this solution was eliminated.

Vscode / Theia

**Features** - [ ] Authentication - [x] Namespace selection - [x] CRDs Discovery - [ ] Creation/Modification of CRs : - [x] From YAML - [x] With Completion - [ ] With templates - [ ] From Web Forms - [x] List existing CRs - [ ] Deletion of CRs - [ ] Grouping of linked CRs - [ ] CRs status visualization - [x] Secrets visualization - [ ] Easily customizable **Security** Theia Security scan : https://artifacthub.io/packages/helm/kubesphere-stable/theia?modal=security-report ![image](https://github.com/orange-cloudfoundry/paas-templates/assets/18172904/83ba6b8f-5e6c-4522-8f07-597a27f9391c) **Strenghts - Weaknesses** It comes with Visual Studio, so for modifying CRs, it's great, but the Kubernetes plugin isn't customizable, so we can't get rid of the other sections.

Kui

The project is dead, there have been no contributions since May 2023.

Portainer

The service doesn't seem to support CRs.

Devtron

**Features** - [x] Authentication - [x] Namespace selection - [ ] CRDs Discovery - [ ] Creation/Modification of CRs : - [x] From YAML - [x] With Completion - [ ] With templates - [ ] From Web Forms - [x] List existing CRs - [ ] Deletion of CRs - [ ] Grouping of linked CRs - [x] CRs status visualization - [ ] Secrets visualization - [ ] Easily customizable **Security** https://artifacthub.io/packages/helm/devtron/devtron-operator?modal=security-report ![image](https://github.com/orange-cloudfoundry/paas-templates/assets/18172904/00ce14f7-7cb0-4cd1-98d7-4036b18480b2) **Strenghts - Weaknesses** There is no possibility of customization of the UI.

Backstage

**Features** - [x] Authentication - [ ] Namespace selection - [ ] CRDs Discovery - [ ] Creation/Modification of CRs : - [x] From YAML - [ ] With Completion - [ ] With templates - [x] From Web Forms - [ ] List existing CRs - [ ] Deletion of CRs - [ ] Grouping of linked CRs - [ ] CRs status visualization - [ ] Secrets visualization - [x] Easily customizable **Security** https://artifacthub.io/packages/helm/backstage/backstage ![image](https://github.com/orange-cloudfoundry/paas-templates/assets/18172904/ebe7147e-d4aa-4800-81dc-b472189f0786) **Strenghts - Weaknesses** Very versatile service, easy to customize, and provides a lot of options. However, it is not centered on Kubernetes.

Conclusion

After evaluating the WebUI options, Headlamp emerged as the most suitable choice for us, particularly due to its extensive customization capabilities.

We encountered issues running Rancher on our minikube instance, and its broad functionality didn't align with our specific needs for CR and CRD management. We needed the ability to restrict certain functionalities for users, which was not feasible with Rancher.

Openshift console's poor documentation made it challenging to understand how to develop a plugin for our use case or contribute effectively.

In contrast, Headlamp offers an intuitive interface and streamlined functionality that align perfectly with our requirements. Therefore, we've decided to contribute to Headlamp to add missing features and utilize it as our WebUI for consuming Crossplane CRs.

Guilamb commented 3 months ago

Issues and PR to follow

Guilamb commented 3 months ago

Here a model of a json schema using an enum that give the wanted behaviour :

apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: examples.mygroup.io
spec:
  group: mygroup.io
  versions:
    - name: v1
      served: true
      storage: true
      schema:
        openAPIV3Schema:
          type: object
          properties:
            spec:
              type: object
              properties:
                plan:
                  type: string
                  description: "The plan for the example resource. Allowed values are small, medium, large."
                  enum:
                    - small
                    - medium
                    - large
              required:
                - plan
  scope: Namespaced
  names:
    plural: examples
    singular: example
    kind: Example
    shortNames:
      - ex

image