GithubHelp home page GithubHelp logo

cyclops-ui / cyclops Goto Github PK

View Code? Open in Web Editor NEW
472.0 8.0 31.0 86.21 MB

customizable UI for Kubernetes workloads ๐Ÿ‘๏ธ

Home Page: https://cyclops-ui.com

License: Apache License 2.0

Dockerfile 0.25% Makefile 1.78% Go 37.26% HTML 0.43% CSS 4.76% TypeScript 41.35% JavaScript 14.10% Shell 0.07%
helm kubernetes kubernetes-operator aks cloud crd-controller devops eks gke kubernetes-cluster

cyclops's People

Contributors

dariia avatar dependabot[bot] avatar github-actions[bot] avatar hanshal101 avatar juricake avatar karadzajuraj avatar petar-cvit avatar pmig avatar sheikh-abubaker avatar vedrankolka avatar yuvarajrece avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cyclops's Issues

Support deploying non namespaced resources

Describe the bug
It is not possible to deploy non-namespaced resources (e.g., PersistentVolumes) because Cyclops uses a dynamic client for K8s and sets the namespace, which gets rejected by the Kubernetes API.

To Reproduce
Try to deploy any non namespaced resource through Cyclops

Support for adding longer text fields (files)

Is your feature request related to a problem? Please describe.
Cyclops should support adding bigger chunks of config such as files. The existing text field need to be expanded with such capability. No functionality would be changed, it would just be easier for users to use.

Describe the solution you'd like
Add another field into the schema, parse it on controller side and render it as "file editor", not just a simple text field.

Rollback feature

Is your feature request related to a problem? Please describe.
Once a new configuration of a module is rolled out, in case of a faulty deployment, it would be beneficial to have a history of previous states and be able to rollback to some previous (healthy) version.

Describe the solution you'd like
Possibly add storage to Cyclops to store history. To store history, each time a module is edited, it needs to be saved so all K8s manifests can be generated from it and compared to the current state of the module

Add regex validators for the dynamic forms

The issue
JSON Schema supports more validations that we currently have implemented, namely regex. This will be used for the dynamic forms.

Describe the solution you'd like
Add validators in src/utils/validators/string.tsx that support matching by pattern in JSON Schema.

Template cache does not resolve default branch reference

Describe the bug
When storing/fetching templates from the in-memory cache, all versions of templates need to be resolved. For instance, when handling a template from a git repo, you should resolve version main to a commit SHA to be able to store it in the cache. This needs to be done to revalidate the cache entry when a new template version is implemented on the same branch. If you were not to do it, when there is a new commit on the same branch you already have in your cache, you won't be able to get the template from the latest commit on that branch because your cache already has your branch cached.

Currently, when a git branch is not set, this reference is not resolved correctly, and it needs to be fixed to migrate to newer templates. This bug won't let the cache store another entry of the template, and all changes you make on the default branch won't be available since the template is already "cached"

Page not found on failed api call

Describe the bug
When the controller that is handling the backend requests is not running, the UI reports page not found. It probably does that because UI is proxying requests from /api to the backend.

To Reproduce
Steps to reproduce the behavior:

  1. Scale controller to 0
  2. Open the UI and you should see not found

Expected behavior
Report an error

Dropdown menu to accept other then just enum fields

Is your feature request related to a problem? Please describe.
In some cases, a dropdown is useful just as a suggestion, not as only options for the field

Describe the solution you'd like
Add a new field suggestions that behaves the same way as enum, but the UI will allow you to add any text you decide on

Implement RBAC

Is your feature request related to a problem? Please describe.
A tool that manages deployments and cluster resources needs permission management

Describe the solution you'd like
With the solution, you should be able to easily define rules for permissions. It would be nice to use some out of the box solutions so Cyclops users can easily use it

Describe alternatives you've considered
Dex and Cerbos are solutions we might look into

Initialize Cyclops CLI

Initialize Cyclops CLI in the https://github.com/cyclops-ui/cyclops repo as separate folder.

I would love to call it cyctl, but would love to hear other ideas

Definiton of done:

  • initialized /cyctl folder as a Go project
  • cyctl can be compiled
  • there is a cyctl help that will print out what cyctl and gives a short overview of the CLI

Add metrics to the controller

Is your feature request related to a problem? Please describe.
We should add metrics to track the number of deployed modules, and changes the controller does on the cluster.

Decide which additional metrics should we expose.

Describe the solution you'd like
Expose metrics to prometheus

Remove Alert Upon Successful Load of Charts

Is your feature request related to a problem? Please describe.
When creating a new Module, after successfully loading the chart, an alert pops up on the top of the screen indicating success. This alert is unnecessary and should be removed.

Describe the solution you'd like
Remove the success alert when loading templates.

Hide `managedFields` from resource manifests

Is your feature request related to a problem? Please describe.
When checking resources deployed by a module, for each of them, you can check the manifest of the resource fetched from the cluster. Having managed fields displayed, it is a bit harder to see the rest of the configuration, which is usually more important. The scope of the issue is to add a toggle that could hide managedFields from the manifest modal.

Reference template version

Is your feature request related to a problem? Please describe.
When selecting which template to use, you should also select which version of the template to use. Cyclops needs to support fetching templates by commits/branches/tags.

Describe the solution you'd like

  • add a field representing the version to the module CRD
  • add a field to be populated on the UI and pass it to the backend
  • support fetching templates by version in controllers git client

Root level fields cant be defined as required

Describe the bug
When creating/editing a module, root level fields (the ones not nested inside other structures) can be validated as required, and they should be validated the same as all other

Add confirm modal when deleting a Kubernetes resource from a Module

Is your feature request related to a problem? Please describe.
When a Kubernetes resource is not needed for a Module anymore (it was created before, and when some values are changed, the resource is not needed anymore) Cyclops will render a button for deletion.

Describe the solution you'd like
We should add a confirm modal when deleting stuff.

Get logs for Deployments and Statefulsets

Is your feature request related to a problem? Please describe.
Currently, you can check logs only for specific pods, but you should be able to see it on logs higher level resources like Deployments, Statefulsets...

Describe the solution you'd like
Add a button on the Deployment/Statfulset/... view

Default app template

Is your feature request related to a problem? Please describe.
In some cases an instance of Cyclops will use only one template for applications (or at least in the majority of cases). There needs to be a way to set a default template for an instance of Cyclops that is loaded when a user tries to create a new module.

Describe the solution you'd like
Add an environment variable with a default template and load it automatically from the UI. Then, the user of Cyclops would set the environment variable in the configuration of the deployment and would have the template loaded automatically

Handle two Modules owning the same resource

Is your feature request related to a problem? Please describe.
Each Module will create its own set of resources. When two Modules create the same resource, one of the Modules will report that it has all the resources it should have, while the other one will just say it's empty and that it misses the resource.

Describe the solution you'd like
If a new Module is created and it wants to create a resource that is already owned by another Module, it should report on the UI that there is a clash in resources. I wouldn't go with overriding other Modules resource ownership

Additional context
Resource ownership is defined on each resource with the label cyclops.module. For example, Module demo created a Deployment app, and the app Deployment will have the label cyclops.module: demo

Implement Cyclops CLI get methods

Implement get and list methods for modules

list - cyctl get modules
list output should look similarly to kubectl get

cyctl get modules

NAME     AGE
first    61s
second   46s

get - cyctl get modules my-module
get should return the requested module as YAML fetched from the cluster

You will also need to connect to the cluster and call the K8s API directly using .kubeconfig env variable

Add managed-by label

Is your feature request related to a problem? Please describe.
Some labels are recommended to add on a Kubernetes resource. One of those is app.kubernetes.io/managed-by. It would be useful if each time the Cyclops controller deploys a resource that doesn't have this label defined (not to override some custom stuff) to add it.

Describe the solution you'd like
I believe the best place would be here since there are already some labels being set.

Describe alternatives you've considered
You can think of different places where to add that label. Also, if you think some labels need to be added, feel free to add them.

Additional context
If you need additional context, feel free to comment on the issue.

ReplicaSet should be shown in Deployments

The issue

Currently, Cyclops shows your Pods inside your Deployments. However, there is another K8s resource between those two called ReplicaSet. Inside Deployments, there are ReplicaSets, and within those ReplicaSets, the Pods are located.

Solution

  • Cyclops should show ReplicaSets inside Deployments.
  • The Pods should be moved inside ReplicaSets

Support changing module template versions

Is your feature request related to a problem? Please describe.
Once you create a Module, you will likely want to upgrade that template over time. Add support for changing template versions on existing Modules

On the View Manifest Modal on Rollback page, OK button lacks functionality

Describe the bug

When viewing the manifest, the modal displays two buttons: Cancel and OK. The Cancel button closes the modal, but the OK button lacks functionality. The Cancel button should be removed, and its functionality needs to be moved to the OK button.

To Reproduce

  1. Deploy a module through Cyclops
  2. Open up the detailed overview of the module
  3. Edit the configuration; change something (like the number of replicas) just so this module has a history
  4. Click on the Rollback button
  5. Click on the Manifest button

Related issue

We had a similar issue with the View Manifest Modal.

Use `minimum` and `maximum` to validate numeric fields

Is your feature request related to a problem? Please describe.
Cyclops is not parsing minimum and maximum from the values.schema.json file. It would be useful if you could see an error in the UI when you enter a number out of the allowed range.

Describe the solution you'd like
Parse minimum, maximum, exclusiveMinimum and exclusiveMaximum when fetching the chart from git. After that map those fields when sending them from backend to frontend, and finally set those properties on the antd component for number input.

Describe alternatives you've considered
N/A

Additional context
These are applicable only for number-type fields.

For any additional context, feel free to ask a question on the issue or reach out directly

Make fields immutable on edit

Some fields shouldn't be editable, for example, the name field in the demo template.

We should add an option like editable to the schema.json file that tells us if the field will be editable through the module edit screen or present only when creating modules.

Cyclops needs to be able to parse this afterward.

Node overview

Is your feature request related to a problem? Please describe.
Create node overview page to quickly get insights about node resources

Describe the solution you'd like
A new view that contains important information about node status

On the View Logs Modal, OK button Lacks Functionality

Describe the bug

When viewing logs, the modal displays two buttons: Cancel and OK. The Cancel button closes the modal, but the OK button lacks functionality. The Cancel button should be removed, and its functionality needs to be moved to the OK button.

To Reproduce

  1. Deploy a module through Cyclops
  2. Open up the detailed overview of the module
  3. Open up a resource that contains images (like the pods of a deployment)
  4. Click on the View Logs button

Related issue

We had a similar issue with the View Manifest Modal.

Remove Redis connection

Describe the bug
Previously, Cyclops depended on a Redis storage layer, but it was deprecated. There is still code for connecting to Redis, and it produces a log saying it can't connect to the instance.

That code must be removed to keep the codebase cleaner and not produce misleading logs. This log would pop up on each Cyclops start.

Here is the line that calls the initialization of the Redis client.

It is used for templatesStorage, which can also be deprecated and deleted

Support OCI based Helm

Is your feature request related to a problem? Please describe.
OCI based registries are not supported when pulling Helm chart dependencies

Additional context
Connected to #75

Load values from remote (YAML) files

Is your feature request related to a problem? Please describe.
Possibility to load values from a file by providing a file reference. File content would be parsed (as YAML) and its values injected into the form.

Describe the solution you'd like
Load directly from FE without going through the backend. Simply because there is no need for that.

k8s controller start up error

Describe the bug
cyclops-ctrl 2023-12-14T19:41:07Z ERROR controller-runtime.source.EventHandler failed to get informer from cache {"error": "failed to get API group resources: unable to retrieve the complete list of server APIs: cyclops-ui.com/v1alpha1: Get "https://172.20.0.1:443/apis/cyclops-ui.com/v1alpha1\": dial tcp 172.20.0.1:443: connect: connection refused"}

To Reproduce
Steps to reproduce the behavior:

  1. Deploy to k8s without the loadbalancer service
  2. Update the REACT_APP_CYCLOPS_CTRL_HOST for cyclops-ctrl

Expected behavior
No error messages in the log when starting up

Additional context

  • port-forwarding to the container is working
  • istio-ingress is failing with a 503

Support private templates

Is your feature request related to a problem? Please describe.
Support fetching templates from a private repository. Allow for adding multiple private sources at the same time.

Describe the solution you'd like

  • Create rules for accessing private repos. This way we can access repos from two different github organizations at the same time without having a token that can access them both.
    • add another CRD for those rules (not to introduce a database for such a thing)
  • make sure to invalidate the cache accordingly when a repo changes its visibility settings

Support Helm chart dependecies

Is your feature request related to a problem? Please describe.
Helm chart dependencies are often used and need to be supported when creating modules.

Describe the solution you'd like
Fetch each dependency and render a UI based on dependency schema from values.schema.json. Rendered UI of a dependency will be part of the parent chart UI, but under the name of dependency.

For instance, for dependency:

dependencies:
  - name: mysql
    version: "9.3.4"
    repository: "https://charts.bitnami.com/bitnami"

UI of the parent chart will have a rendered object that fits the schema fetched from https://charts.bitnami.com/bitnami

Frontend refactor

Is your feature request related to a problem? Please describe.
Frontend code is really repetitive and needs a refactor to be more readable

Describe the solution you'd like
Extract common functions and components. For example error handling and form rendering (new_module.tsx and edit_module.tsx)

Additional context
If you need additional context, feel free to comment on the issue.

Add status description for pods

Is your feature request related to a problem? Please describe.
If a pod is not started successfully, there should be a more detailed description in the UI about why it didn't start

Enable deploying Modules in Different Namespaces

Modules is a CRD created by Cyclops. It represents your applications and services in the Kubernetes cluster. Currently, all modules are deployed in the cyclops namespace. This is displayed under the module name when opening the module details page

We want Cyclops to be able to deploy modules in any namespace.

On the View Manifest Modal, OK button Lacks Functionality

Describe the bug
When viewing manifests, the modal displays 2 buttons, Cancel and OK. The Cancel button closes the modal, but the OK button lacks functionality. The Cancel button should be removed and its functionality needs to be moved to the OK button.

To Reproduce

  1. Deploy a module through Cyclops
  2. Open up the detailed overview of the module
  3. Click on the View Manifest button

Display Cyclops version in UI

Is your feature request related to a problem? Please describe.
It's always nice to display the installed version in the UI.

Describe the solution you'd like
Display the installed version below the "Report a bug button"

Argo does the following:
image

Additional context
Glasskube already supports the the v0.0.1 release, but for the user it's hard to validate that the latest version is installed.

Trigger initial values validation when loading templates

Is your feature request related to a problem? Please describe.
Currently, when loading templates and their initial values, those values are not validated against the values schema but only when values are changed. Validation should be triggered at the beginning, and feedback should be given to the user upon load.

Wrong filenames in template dependencies

Describe the bug
Each template can have dependencies via Helm chart dependencies. Each template has files - either for templates or plain configuration.

When loading dependencies, those files are not named properly and are missing the first letter of the filename. In the example below one of the dependencies is mysql and the file is called ysql/.gitignore which is obviously missing a letter.
Screenshot 2024-03-14 at 19 26 06

To Reproduce
Steps to reproduce the behavior:

  1. Run Cyclops in your Kubernetes cluster and expose it
  2. Send a get request to Cyclops at /templates referencing a template that has dependencies
    - you can use the one we already have. This one has its source on git
    - curl "http://localhost:3000/api/templates?repo=https://github.com/cyclops-ui/templates&path=demo&commit=filename-dependencies" | jq '.dependencies.[0].files'
  3. You should see that the filename starts with the dependency name, but missing the first letter. The command above is just jq syntax to extract the first dependency from the JSON response and get its files.

Additional context
Handler method for the /templates

Create a Helm chart for installing into a cluster

Is your feature request related to a problem? Please describe.
Create a Helm chart that can be installed into a Kubernetes cluster, and that will have all the necessary configurations for Cyclops to work

Additional context
Implement it as an OCI chart and host it on cyclopsui dockerhub

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.