Wingysam / Christmas-Community

Christmas lists for families
GNU Affero General Public License v3.0
212 stars 39 forks source link

Create Helm Chart #43

Closed ndlanier closed 1 year ago

ndlanier commented 1 year ago

Implements #10

Note: I removed the default helm template horizontal auto-scaler as I find it highly unlikely anyone is going to scale this to a massive point of needing more than one pod. The DB being baked into the docker image will prevent horizontal scaling anyways.

ndlanier commented 1 year ago

I'll create a repo to house the packaged versions of the helm chart

ndlanier commented 1 year ago

Chart Release Repository: https://github.com/ndlanier/christmas-community-chart-release Helm repo url: https://ndlanier.github.io/christmas-community-chart-release/

Example deployment resource map: image

It's up and running for me locally: image

ndlanier commented 1 year ago

Need to add values for env variables before this is approved or merged

Wingysam commented 1 year ago

Thank you for making this! I'm concerned that the chart won't be updated when new versions of Christmas Community are released. Is it possible to somehow automate updating the chart with GH Actions? Ideally it would be in this repository to avoid trusting a community-managed project.

ndlanier commented 1 year ago

No problem! For patches and fixes, the only thing that will need updated is the default image tag which can be overridden so that won't be a big deal. We might be able to set up an action to do an automated commit that would sed the default image tag.

For any new features or big releases (new env variable, or migrating the db to use sql as examples) that will likely require manual intervention to account for the changes.

ndlanier commented 1 year ago

But when there is a new release of the chart we can automate the deployment to the helm repo via gh actions for sure.

ndlanier commented 1 year ago

Ideally it would be in this repository to avoid trusting a community-managed project.

If you want to host the helm repo using this github repo you'll need to follow this guide: https://medium.com/@mattiaperi/create-a-public-helm-chart-repository-with-github-pages-49b180dbb417

If you go that route you'll either be dropping a lot of tarballs in the root of the repo or you'll be using the docs directory.

I have update the chart to contain the environment variables There's an issue with the mapping of the variables, fixing now

ndlanier commented 1 year ago

Ok now it should be ready, I've tested locally and everything is working.

I have commented out the env variables on the default values file so the container defaults are not overridden.

@Wingysam for now you could merge this and let people run the chart raw or compile it themselves while the chart hosting situation is figured out.

To compile the chart run: helm package ./chart

ndlanier commented 1 year ago

Any other questions or concerns?

Wingysam commented 1 year ago

Okay that sounds ideal, thank you!