komodorio / helm-dashboard

The missing UI for Helm - visualize your releases
Apache License 2.0
4.97k stars 301 forks source link

Ability to deploy new charts with predefined values.yaml #134

Open slamer59 opened 1 year ago

slamer59 commented 1 year ago

Hello, I have some applications that don't require to run all day long. A UI that will help to store and deploy,uninstall some charts. would be really nice feature.

A kind of launcher in fact.

Happy to discuss further if needed.

undera commented 1 year ago

This sounds interesting, but I did not understand it fully. Do you mean that you want to remember values.yaml for the chart when you uninstall it, and then offer it once you install it again?

slamer59 commented 1 year ago

Yes. Exactly. See it as an application launcher. In Lens for exemple you :

Benefits:

appdirect-kasidit commented 1 year ago

I'm not sure if it's the same with this use case, but it'd be nice if we can have predefined non-default values files that we can select via UI and will automatically load into the user defined panel.

My example use case would be if we have a chart that has multiple database engine that we can choose

Default values.yaml

mysql:
    enabled: false
    # configurations

postgres:
    enabled: false
    # configurations

Then in my predefined values.mysql.yaml

mysql:
    enabled: true
    # configurations

and my predefined values.postgres.yaml

postgres:
    enabled: true
    # configurations
undera commented 1 year ago

@appdirect-kasidit This schema of "values.mysql.yaml" - is it some sort of de-facto standard? Or is it your custom thing?

appdirect-kasidit commented 1 year ago

@undera it's custom thing for me, just a way to identify which file we need to add during helm install like for example

helm install . -f ./values/values.mysql.yaml 

if selecting from a list is not possible, ability to browse and select file would be a great alternative as well

undera commented 1 year ago

I think this is valuable feature idea. Just one more question: how would these files map to different charts? Don't you worry to show irrelevant values files for other charts?

appdirect-kasidit commented 1 year ago

If we store multiple values files into the same chart directory, I think it should be sufficient enough, or perhaps offer some sorts of directory that we could store this in, for example, it could be something like

helm-charts
├── chart-1
│   ├── charts
│   │   └── ...
│   ├── templates
│   │   └── ...
│   ├── .helmignore
│   ├── Chart.yaml
│   ├── values.yaml
│   ├── values.mysql.yaml
│   └── values.postgres.yaml
├── chart-2
│   ├── charts
│   │   └── ...
│   ├── templates
│   │   └── ...
│   ├── .helmignore
│   ├── Chart.yaml
│   ├── values.custom.yaml
│   └── values.yaml
...

or

helm-charts
├── chart-1
│   ├── charts
│   │   └── ...
│   ├── templates
│   │   └── ...
│   ├── values
│   │   ├── values.mysql.yaml
│   │   └── values.postgres.yaml
│   ├── .helmignore
│   ├── Chart.yaml
│   └── values.yaml
├── chart-2
│   ├── charts
│   │   └── ...
│   ├── templates
│   │   └── ...
│   ├── values
│   │   └── values.custom.yaml
│   ├── .helmignore
│   ├── Chart.yaml
│   └── values.yaml
...
undera commented 1 year ago

Do you work like this with --local-chart option?

appdirect-kasidit commented 1 year ago

yes

appdirect-kasidit commented 1 year ago

im not exactly sure how this would translate into remote cluster though

undera commented 1 year ago

I would implement it the following way:

  1. Create an LRU cache, backed by file in our cache dir
  2. Limit number of entries in cache to 5-10 per-chart
  3. Store per-chart the values snapshots
  4. Offer a drop-down with cached snapshots.
  5. Maybe use explicit button of "remember as" instead of implicit