Code Monkey home page Code Monkey logo

helm-dashboard's Introduction

Helm Dashboard

A simplified way of working with Helm.

GitHub contributors GitHub issues GitHub stars GitHub closed issues GitHub pull requests GitHub release (latest by date) GitHub commit activity GitHub license codecov

Screenshot

Description

Helm Dashboard is an open-source project which offers a UI-driven way to view the installed Helm charts, see their revision history and corresponding k8s resources. It also allows users to perform simple actions such as rolling back to a revision or upgrading to a newer version. This project is part of Komodor's vision to help Kubernetes users to navigate and troubleshoot their clusters. It is important to note that Helm Dashboard is NOT an official project by the helm team.

Key capabilities of the tool:

  • See all installed charts and their revision history
  • See manifest diff of the past revisions
  • Browse k8s resources resulting from the chart
  • Easy rollback or upgrade version with a clear and easy manifest diff
  • Integration with popular problem scanners
  • Easy switch between multiple clusters
  • Can be used locally, or installed into Kubernetes cluster
  • Does not require Helm or Kubectl installed

All the features of the tool can be discovered via our features overview page.

Installation

Standalone Binary

Since version 1.0, the recommended install method is to just use standalone binary. It does not require Helm or kubectl to be installed.

Download the appropriate release package for your platform, unpack it and just run dashboard binary from it. See below section for some more CLI parameters to use.

Using Helm plugin manager

To install dashboard as Helm plugin, simply run Helm command:

helm plugin install https://github.com/komodorio/helm-dashboard.git

To update the plugin to the latest version, run:

helm plugin update dashboard

To uninstall, run:

helm plugin uninstall dashboard

To use the plugin, your machine needs to have working helm and also kubectl commands. Helm version 3.4.0+ is required.

After installing, start the UI by running:

helm dashboard

The command above will launch the local Web server and will open the UI in a new browser tab. The command will hang waiting for you to terminate it in command-line or web UI.

You can see the list of available command-line flags by running helm dashboard --help.

By default, the web server is only available locally. You can change that by specifying HD_BIND environment variable to the desired value. For example, 0.0.0.0 would bind to all IPv4 addresses or [::0] would be all IPv6 addresses. This can also be specified using flag --bind <host>, for example --bind=0.0.0.0 or --bind 0.0.0.0.

Precedence order: flag --bind=<host> > env HD_BIND=<host> > default value localhost

If your port 8080 is busy, you can specify a different port to use via --port <number> command-line flag.

If you need to limit the operations to a specific namespace, please use --namespace=... in your command-line. You can specify multiple namespaces, separated by commas.

If you don't want the browser tab to automatically open, add --no-browser flag in your command line.

If you want to increase the logging verbosity and see all the debug info, use the --verbose flag.

Disclaimer: For the sake of improving the project quality, there is user analytics collected by the tool. You can disable this collecting with --no-analytics option. The collection is done via DataDog RUM and Heap Analytics. Only the anonymous data is collected, no sensitive information is used.

Deploying Helm Dashboard on Kubernetes

The official helm chart is available here

Support Channels

We have two main channels for supporting the Helm Dashboard users: Slack community for general conversations and GitHub issues for real bugs.

Contributing

Kindly read our Contributing Guide to learn and understand about our development process, how to propose bug fixes and improvements, and how to build and test your changes to Helm Dashboard.

Contributors

Local Dev Testing

Prerequisites, binaries installed and operational:

There is a need to build frontend and then backend as a series of commands, run:

Linux

cd frontend && npm run build && cd ..
go build -o bin/dashboard .

Or just make build that will do everything inside.

Then, you can run npm run dev from frontend directory to work on frontend with Vite hot reload.

Windows

cd frontend && npm run build && cd ..
go build -o bin\dashboard.exe .

You can just run the dashboard or dashboard.exe binary directly.

To install, checkout the source code and run from source dir:

helm plugin install .

A local installation of the plugin just creates a symlink, so making the changes and rebuilding the binary would not require to reinstall a plugin.

To use the plugin, run in your terminal:

helm dashboard

Then, use the web UI.

Development Snapshots

In our GitHub actions, we attach the built binaries as build artifacts, you can download and test it fully assembled.

Also, we upload unstable tag for Docker image upon every build of main branch, you can make our Helm chart to use that image by providing values:

image:
  pullPolicy: Always
  tag: unstable

helm-dashboard's People

Contributors

alessandrodetta avatar bhargav-infracloud avatar dalekvim avatar denganliang2023 avatar dependabot[bot] avatar dhiemaz avatar elisareisenbach avatar geekvest avatar geet-h17 avatar harshit-mehtaa avatar iamvikaskumar avatar iiiceoo avatar iitidgex avatar itielshwartz avatar kamegoro avatar komodor-bot avatar kumardhananjaya avatar niravprajapati1 avatar omaximani0 avatar pushker001 avatar ronahk avatar sachi3050 avatar siddhikhapare avatar suchsoon avatar tamir198 avatar toddtee avatar udi-hofesh avatar undera avatar v-ngu avatar warjiang 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

helm-dashboard's Issues

Restructure API

Right now it is dirty with experiments and ugly things like obscure parameter names.
We need to make it more REST-like structure.
Designing an OpenAPI document looks like the right first step.

[Feature request] Deploying it as a pod on K8s

I miss the option to deploy it to K8s directly. I guess packing the helm binary and the plugin into a container and wrapping it into a deployment with a proper kubeconfig would work (?)

how to change default bind localhost to 0.0.0.0

By default, the web server is only available locally. You can change that by specifying HD_BIND environment variable to the desired value. For example, 0.0.0.0 would bind to all IPv4 addresses or [::0] would be all IPv6 addresses.

so,how i use this HD_BIND to change localhost:8080,i cant find any answer

Allow filtering repository charts

Inside repository charts list, it can be long. Filtering would be nice
Should be a quick UI filter without re-querying the backend.

Privacy concerns with Datadog RUM.

Hello, I noticed that Datadog RUM is being used for application telemetry.

I didn't see any disclosures about that (including what's being tracked, how it's being used, how that data is secured). Not in the console (during installation and runtime), webUI, or in the README.md.

Additionally; IMO, it would be good to make this telemetry require an explicit opt-in. Some people, if they're comfortable, might be glad to provide telemetry. Others might conclude that your plugin is spyware. Some orgs may have strong objections to the values of the name and namespace query parameters being exposed as they may contain sensitive data.

I assume that you have good intentions and just want to ship performant and reliable software. 👍

Even though I don't see any calls to startSessionReplayRecording(), It is good that you have defaultPrivacyLevel as mask. It still would be courteous to see an explicit set of sessionReplaySampleRate to 0 as a failback safety mechanism.

off-topic: I do like the plugin! It's extremely useful.

Thanks!

Introduce CLI flag for bind address

Right now it's only possible to configure it via env variable and less experienced people are confused (#69, #72).
Let's introduce a CLI flag for that. Long-only flag --bind would be fine.
Don't forget to mention it in the README.md

Fix getCleanClusterName to be more reliable

The function should be safe to run on any cluster name. Currently, there are errors like
clusterSplit.at is not a function. (In 'clusterSplit.at(-1)', 'clusterSplit.at' is undefined on some cluster names.

Use k8s API programmatically instead of kubectl

Use kubeconfig and appropriate env vars to figure out configuration, but don't require kubectl binary to be present, because Helm doesn't. Maybe even reuse API client that Helm has inside its codebase.

--help seems to be printing version instead

when I try to use helm dashboard --help on my system, it seems to print the version and exit.

$ helm dashboard --help
INFO[0000] Helm Dashboard by Komodor, version 0.2.3 (549cdd9bfbdf32009f8dbbc240c59c86c2e430d7 @ 2022-10-26T14:27:14Z)

I am on Ubuntu Jammy Jellyfish, using helm 3.10.1

Use supervisor to manage problems

I'm using supervisor to manage the startup process

The configuration file is as follows

[program:helm-dashboard]
command=helm dashboard -b -p 8888
priority=1                    
numprocs=1                    
autostart=true                
autorestart=true              
startretries=10               
exitcodes=0                   
stopsignal=KILL               
stopwaitsecs=10               
redirect_stderr=true          

stdout_logfile_maxbytes = 1024MB
stdout_logfile_backups  = 10
stdout_logfile          = /var/log/supervisor/helm-dashboard.log

The process is not started successfully

$ supervisorctl status
helm-dashboard                   FATAL     Exited too quickly (process log may have details)

However, the startup log reports the following error

tail /var/log/supervisor/helm-dashboard.log 
Error: unknown command "dashboard" for "helm"
Run 'helm --help' for usage.
Error: unknown command "dashboard" for "helm"
Run 'helm --help' for usage.
Error: unknown command "dashboard" for "helm"
Run 'helm --help' for usage.
Error: unknown command "dashboard" for "helm"
Run 'helm --help' for usage.
Error: unknown command "dashboard" for "helm"
Run 'helm --help' for usage.

The log error appears to be incorrectly identifying the helm dashboard command
How do I correctly identify the helm dashboard command as if it were executed from the command line

Listening address problem

By default, the web server is only available locally. You can change that by specifying HD_BIND environment variable to the desired value. For example, 0.0.0.0 would bind to all IPv4 addresses or [::0] would be all IPv6 addresses.

How does HD_BIND specify listener 0.0.0.0 when started with a command

Namespace support for helm-dashboard

I was trying to access a k8s cluster where I have access to only a single namespace, but when I tried to run helm dashboard command from CLI on that k8s cluster it gave me an error as it's trying to scan all the namespaces which i don't have access to

WARN[0018] helm ls --all --all-namespaces --output json --time-format 2006-01-02T15:04:05Z07:00 --kube-context xxxxx
WARN[0018] STDERR:
Error: list: failed to list: secrets is forbidden: User "zzzz" cannot list resource "secrets" in API group "" at the cluster scope

I would suggest having 2 features here which would be very useful

  1. A parameter to set the default namespace which can be used on startup and other operations
  2. Ability to switch namespace from the UI (if the user has access to multiple namespaces on the k8s cluster)

Running on non-default port

helm dashboard --port 9999 INFO[0000] Helm Dashboard by Komodor, version 0.2.3 (549cdd9bfbdf32009f8dbbc240c59c86c2e430d7 @ 2022-10-26T14:27:14Z)

When it’s running you get more output and it tells you something along the lines of, “Running on localhost:9999”, but I cannot access the dashboard itself, see below.

Screen Shot 2022-10-31 at 2 11 18 PM

Any help would be appreciated

Solve umbrella-chart case

Right now, the resources from dependent charts are not included into views, and generally no additional information is visible about it.

Error when installing : Illegal option -

Hello,
when I try to install or update the plugin I encounter the following error:

/bin/sh: 0: Illegal option -
Error: plugin install hook for "dashboard" exited with error

image

Using GNU bash, version 5.1.16(1)-release (x86_64-pc-linux-gnu) on WSL2 (Ubuntu 22.04.1 LTS)

If I try to use helm dashboard anyway I get

Error: fork/exec /home/vmariette/.local/share/helm/plugins/helm-dashboard.git/bin/helm-dashboard: no such file or directory

Make items on Installed charts page to be correct hyperlinks

To be able to open releases in a new browser tab, intuitively.

Installed charts in list should be correct links, and full row should be a link, not just header text.

Top menu items Installed/Repository should be correct links.

Revision links on the left should be correct links.

Document data class methods

Look at its structure critically.
Maybe split it into several data classes.
Add documentation to each method.

Display summary of involved container images

On the Resources tab, display all container images with their tags, to ease understanding of image versions.

Current idea is the button that would open a flyout with list of tags and their respective resources.

On the backend, we can gather that info while getting status information for resources. The image information is not supposed to change for particular revision, so it's safe to cache.

[Feature request] Repository tab support to display helm that only have pre-release versions

we have helm that version is pre-release and only have pre-release version, while dashboard default search stable version, so I can not find my helm chart in the Repository tab.

Can helm-dashboard`s Repository tab support to display helm that only have pre-release versions ?

just add --devel flag in helm search repo command can get the pre-release version.

ref: https://helm.sh/docs/helm/helm_search_repo/

# Search for release versions matching the keyword "nginx", including pre-release versions
$ helm search repo nginx --devel

edit

func (d *DataLayer) ChartRepoVersions(chartName string) (res []*RepoChartElement, err error) {

, like this

func (d *DataLayer) ChartRepoVersions(chartName string) (res []*RepoChartElement, err error) {
	search := "/" + chartName + "\v"
	if strings.Contains(chartName, "/") {
		search = "\v" + chartName + "\v"
	}

	cmd := []string{"search", "repo", "--devel", "--regexp", search, "--versions", "--output", "json"}
	out, err := d.runCommandHelm(cmd...)
	if err != nil {
		return nil, err
	}

	err = json.Unmarshal([]byte(out), &res)
	if err != nil {
		return nil, err
	}
	return res, nil
}

func (d *DataLayer) ChartRepoCharts(repoName string) (res []*RepoChartElement, err error) {
	cmd := []string{"search", "repo", "--devel", "--regexp", "\v" + repoName + "/", "--output", "json"}
	out, err := d.runCommandHelm(cmd...)
	if err != nil {
		return nil, err
	}

	err = json.Unmarshal([]byte(out), &res)
	if err != nil {
		return nil, err
	}

	ins, err := d.ListInstalled()
	if err != nil {
		return nil, err
	}

	enrichRepoChartsWithInstalled(res, ins)

	return res, nil
}

or give a args to control this feature.

Rework the install/upgrade UI flow

Current dialog is too noisy and slow.

Rework it into a wizard-like full-page experience. Experiment to see if this is a better approach. Rework value editing into smart diff calculator.

404

SERVLET: org.eclipse.jetty.servlet.ServletHandler$Default404Servlet-5f8edcc5

download or scroll button for scan reports

After doing a particular scan the report is incomplete and cant be scrolled. A download button to download the complete scan or maybe a scrollable button will be helpful.

Helm releases with different "storage" vs "install" namespace

When managing a helm chart via Flux a HelmRelease custom resource is created with a given storageNamespace (foo), but could have a different targetNamespace (bar) which determines where the chart is installed (ref the spec here). The net result is that helm secrets, etc will be stored in the foo namespace, but bar is the "release namespace" where the chart is installed.

The logic handling of helm "lookups" by the dashboard seems to be problematic in this scenario. See the below example:

> helm ls -n foo
NAME                         	NAMESPACE     	REVISION	UPDATED                                	STATUS  	CHART                     	APP VERSION
bizbang                      	bar       	1       	2022-10-24 14:16:07.803938 -0600 MDT   	deployed	bizbang-1.45.0

From this helm command you can see that the namespace scope of the helm ls command is foo (my Flux storageNamespace), but the namespace listed here is bar (my Flux targetNamespace).

When I try to click on this in the dashboard I receive the error "Failed to get chart details Error: release: not found". Looking at my terminal I can see it is using the wrong namespace in the lookup:

WARN[1087] Failed command: [helm history bizbang --namespace bar --output json --max 18 --kube-context <removed>] 
WARN[1087] STDERR:
Error: release: not found

Using the foo namespace the helm history command would make this work.

It would be great to see this scenario supported/handled, although I understand if its seen as an unsupported edge case.

Support local chart installing

We need to address a case when user has local Helm chart and wants to enjoy the preview of manifests.
Probably it should be analogous to chart repositories.

Enhance filtering of Installed charts

Maybe filter by name. Think of using release name + chart name + namespace as fields to search for.

Definitely a filter by namespace. Probably as radio buttons, with option "All"

If there is forced namespace, and that namespace is different from kubectl config default, pre-select it. Relates to #51

Query helm chart source for icon and description

In the list of installed charts, attempt to improve display by issuing additional call to query for icon and description.
This would require introducing a new API call, since we don't want to delay the display of the list. This needs to match release to repository, which we already able to do.
Then, helm show chart komodorio/k8s-watcher to get the icon URL and description.
Make sure the UI is not "jumping" because of variable description length.

support use when kubernetes context does not have cluster level RBAC

I experienced a complete roadblock to using this system. I work against a multi-tenant kubernetes managed by our cloud team, and the tokens that I used to authenticate kubectl contexts do not have RBAC policies allowing them to list anything at the cluster level. I am using:

  • helm v3.10.1
  • dashboard version 0.2.3
  • Ubunutu Jammy Jellyfish

When I launch helm dashboard with a --namespace=$mynamespace argument, it still wants to list all namespaces, and fails. Once it fails there is no way to choose a specific namespace. It just sits there, completely unusable.

helm dashboard --namespace=londo003
INFO[0000] Helm Dashboard by Komodor, version 0.2.3 (549cdd9bfbdf32009f8dbbc240c59c86c2e430d7 @ 2022-10-26T14:27:14Z) 
WARN[0000] Failed command: [checkov --version]          
WARN[0000] Failed command: [trivy --version]            
INFO[0000] Opening web UI: http://localhost:8080        
Gtk-Message: 09:57:07.641: Failed to load module "canberra-gtk-module"
Gtk-Message: 09:57:07.643: Failed to load module "canberra-gtk-module"
WARN[0000] Failed command: [helm ls --all --all-namespaces --output json --time-format 2006-01-02T15:04:05Z07:00 --kube-context londo003-ocp] 
WARN[0000] STDERR:
Error: list: failed to list: secrets is forbidden: User "system:serviceaccount:londo003:helm-deployer" cannot list secrets at the cluster scope: no RBAC policy matched 
WARN[0126] Failed command: [helm ls --all --all-namespaces --output json --time-format 2006-01-02T15:04:05Z07:00 --kube-context londo003-ocp] 
WARN[0126] STDERR:
Error: list: failed to list: secrets is forbidden: User "system:serviceaccount:londo003:helm-deployer" cannot list secrets at the cluster scope: no RBAC policy matched 
WARN[0131] Failed command: [helm ls --all --all-namespaces --output json --time-format 2006-01-02T15:04:05Z07:00 --kube-context londo003-ocp] 
WARN[0131] STDERR:
Error: list: failed to list: secrets is forbidden: User "system:serviceaccount:londo003:helm-deployer" cannot list secrets at the cluster scope: no RBAC policy matched 
WARN[0146] Failed command: [helm ls --all --all-namespaces --output json --time-format 2006-01-02T15:04:05Z07:00 --kube-context londo003-ocp] 
WARN[0146] STDERR:
Error: list: failed to list: secrets is forbidden: User "system:serviceaccount:londo003:helm-deployer" cannot list secrets at the cluster scope: no RBAC policy matched 
^C

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.