Azure / draft-classic

A tool for developers to create cloud-native applications on Kubernetes.
https://draft.sh
MIT License
3.93k stars 397 forks source link

use remote chart in draft pack #732

Open michelleN opened 6 years ago

michelleN commented 6 years ago

One may want to maintain a helm chart separately from an application but have developers use that chart which is production-like in their dev workflow.

Currently, draft create copies over a chart from a draft pack for the developer to use. Instead of having the chart actually live in the draft pack, what if we could just specify where the chart lives (like the git repo url). That way, draft create could just pull down the chart from the specified git repo in the correct place.

This would help make it possible to manage the helm chart separately from the application but also allow the developer to use a chart close to production.

inspired by @intheclouddan who currently has a workaround which involves: 1. cloning the git repo with a chart in it 2. symlinking it the charts/ dir in the app directory so that draft will use it

michelleN commented 6 years ago

Some things to consider:

radu-matei commented 6 years ago

Another thing to keep in mind here is the chart needs to have some specific labels and annotations in order to be picked up by Draft.

I'm not sure we want to impose people maintaining production charts to add those labels and annotations. The question is whether we can inject those key + value pairs from the Helm client.

If not, the remote chart will need to include them.

radu-matei commented 6 years ago

@michelleN, @InTheCloudDan - once #771 gets merged, you will be able to specify the directory of your charts, eliminating the need to symlink.

Getting back to remote charts, I think the restriction to include a label and annotation in your deployment template will stay - are we ok with having the label and annotation in the remote chart?

If so, then I might get started to implement passing the URL of a remote chart in draft.toml.