blendle / kubecrt

Convert Helm charts to Kubernetes resources.
ISC License
115 stars 11 forks source link

add top-level "repositories" object #4

Open JeanMertz opened 7 years ago

JeanMertz commented 7 years ago

Our current API looks like this:

apiVersion: v1
charts:
- blendle/web:
    repo: https://blendle-charts.storage.googleapis.com

While this works, it becomes tedious if you want to add multiple charts from the same (non-stable/default) repository:

apiVersion: v1
charts:
- blendle/web:
    repo: https://blendle-charts.storage.googleapis.com
- blendle/cron:
    repo: https://blendle-charts.storage.googleapis.com

The current solution to this is to launch kubecrt using the --repo flag:

kubecrt --repo="blendle=https://blendle-charts.storage.googleapis.com" charts.yml

After which you no longer need to define the repo in the charts/yml:

apiVersion: v1
charts:
- blendle/web: {}
- blendle/cron: {}

This works, but if we want charts.yml to be a self-sustainable config, that does not depend on CLI flags, we could introduce a new repositories object:

apiVersion: v1

repositories:
  blendle: https://blendle-charts.storage.googleapis.com

charts:
- blendle/web: {}
- blendle/cron: {}