bjw-s / helm-charts

A collection of Helm charts
https://bernd-schorgers.github.io/helm-charts/
Apache License 2.0
566 stars 106 forks source link

Multiple Images #159

Closed TheDarkula closed 12 months ago

TheDarkula commented 1 year ago

First off, thank you for the template, it works brilliantly.

I have written a number of values files successfully for services that are a single microservice (no external database).

In the examples, I did not see anything that uses more than one image, nor did I see a way to use multiple in the provided values file.

How would I create something like a web service with a postgresql database?

bjw-s commented 1 year ago

In the current version of app-template it's not possible to run multiple Pods. It is however possible to run multiple containers in the same Pod, so depending on what your end goal is, you should look in to the sidecars key: https://github.com/bjw-s/helm-charts/blob/main/charts/library/common/values.yaml#L213. Just as an FYI, this behavior will change in an upcoming version.

TheDarkula commented 1 year ago

I am thinking of something simple like translating a docker-compose file that has two services, say, one web frontend, and one database. Would the sidecars implementation be the best/correct way to accomplish this with the current template? If so, is there an example of it being used somewhere?

Also, what will the behaviour be in the new version?

onedr0p commented 1 year ago

I'm not sure if that was just an example but if not you should never put an app container and it's database container in the same pod.

TheDarkula commented 1 year ago

I think I see the mechanic to use with the template. As opposed to an all-in-one values file, I need to create multiple, one for each service.

bjw-s commented 12 months ago

The changes in the upcoming beta of common lib 2 should cover this.