You can have both, depending on how you want to structure your deployments.
You should keep in mind the following
Considerations
Single chart benefits
- Easier to deploy: only deploy once, single diffing
- Single version, so rollback/upgrades happen on a single element
- You can uninstall parts by using feature flags
- Installing a new component without touching the rest of the elements may prove tricky
Single chart caveats
- Harder to deploy uncoupled services, e.g., a mock service for data access while upgrading the database
- Harder to decouple and test each instance
- Harder to name and make sense of each component (in different releases your
{{.Release.Name}}
would already change for each "app").
- Harder to provide/keep track of different release cycles for different components
- Versions stored in a single ConfigMap, which may lead to size limit problems if you have charts which contain, for example, testing data embedded
Note on version control
You can have a master chart that you use for testing with all subcharts, and package the subcharts independently but still have everything on the same repo.
For example, I usually keep things like either:
. / helm / charts / whatever / charts / subchart1
. / helm / charts / whatever / charts / subchart2
. / helm / charts / whatever / values.yaml
or
. / helm / charts / whatever-master / values.yaml
. / helm / charts / whatever-master / requirements.yaml
. / helm / charts / whatever-subchart1 / values.yaml
. / helm / charts / whatever-subchart2 / values.yaml
And use the requirements.yaml on the master chart to pull from file://../whatever-subchartx
.
This way I can have whatever-stress-test
and whatever-subcomponent-unit-test
while still being flexible to deploy separately components that have different release cycles if so wanted.
This will in the end also depend on your upgrade strategy. Canary upgrades will probably require you to handle stateful microservices in a more specific way than you can have with a single chart, so plan accordingly.