Skip to content

Adding a Helm chart for deployment to Kubernetes#193

Merged
djmitche merged 16 commits into
GothenburgBitFactory:mainfrom
jansenfuller:main
May 12, 2026
Merged

Adding a Helm chart for deployment to Kubernetes#193
djmitche merged 16 commits into
GothenburgBitFactory:mainfrom
jansenfuller:main

Conversation

@jansenfuller
Copy link
Copy Markdown
Contributor

@jansenfuller jansenfuller commented May 1, 2026

I throw everything into Kubernetes and wanted a way to deploy TaskChampion to my cluster. I have tested this on my own cluster using TaskChamp as the client with great results
The chart has the following features:

  • Support for SQLite and Postgres storage options
  • Multiple replicas (only with Postgres as multiple replicas with SQLite would end with corrupting the database
  • Custom PV location for SQLite database (defaults to a temp directory if not specified)
  • Ingress and HTTPRoute configuration built in
  • Client IDs stored in a Secret to prevent clients from being leaked
  • Adjust envars to your liking

@KingOfSpades
Copy link
Copy Markdown

I was just about to build this. Will deploy tomorrow to my internal Talos cluster for testing.

@jansenfuller
Copy link
Copy Markdown
Contributor Author

jansenfuller commented May 1, 2026

There is a weird issue where in the logs it shows the "starting entrypoint script..." multiple times. I'm unsure if that means it's unhealthy or its just how the application runs.
ScreenShot 2026-05-01 at 12 00 53 PM

@KingOfSpades
Copy link
Copy Markdown

Im currently running sync server as a single container in Portainer and I don't see that behavior there. I'm going to test your chart tomorrow and report back

@KingOfSpades
Copy link
Copy Markdown

KingOfSpades commented May 2, 2026

Looks good on my end, single deployment (sqlite) version

screenshot-vymcjTWb@2x

Side note, the secret ref name is my-generic-secret or taskchampion-client-ids?

@jansenfuller
Copy link
Copy Markdown
Contributor Author

jansenfuller commented May 3, 2026

@KingOfSpades, Sorry I've been trying to get the Postgres implementation working correctly, it should be good to test if you like.

I'm unsure of what you're asking. The secret name can be whatever you want it to be. What is important is the key for client ids should be client-ids, and that should be a list of UUIDs.

If you would like to test out the Postgres implementation, you will need to manually put in your UUIDs into the database. I'm almost done updating the init container so that UUIDS are automatically added to the Postgres database after the migration has been ran.

@jansenfuller
Copy link
Copy Markdown
Contributor Author

Auto add to Postgres on start is working now.

@jansenfuller
Copy link
Copy Markdown
Contributor Author

Any input from @djmitche, @vagos?

@vagos
Copy link
Copy Markdown
Contributor

vagos commented May 10, 2026

Hey @jansenfuller thank you for sending this! Excuse my ignorance, but why does this need to live alongside the server source code? Could this be placed in a separate repository?

It might not be long-term viable to have configurations for all different kind of deployment frameworks (Ansible, Puppet, etc...).

Let me know if I am missing something, though.

@jansenfuller
Copy link
Copy Markdown
Contributor Author

jansenfuller commented May 11, 2026

No that's a valid point. Since this is smaller project I felt it could go along side but if someone would like to put this into another repository, say helm-charts (so that other helm charts could be added in the future), that would work great. If I remember correctly, Helm best practices suggest putting charts in another repository. The "one repository = one artifact" pattern. Who would be in charge of that?

Copy link
Copy Markdown
Collaborator

@djmitche djmitche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is fine to have in this repo.

Ideally it'd be somehow tested to make sure it doesn't get out of date, but I can imagine that's difficult to do in a way that would realistically catch a likely error. For exmaple, we might add a new env var configuration and forget to update the helm charts.

@djmitche djmitche merged commit d7d9de3 into GothenburgBitFactory:main May 12, 2026
7 checks passed
@jansenfuller
Copy link
Copy Markdown
Contributor Author

Luckily there are options for users to add their own envars if we're missing one. There should be a env value where those can be added. I think the only real risk would be for things like multiple replicas, if metrics were to be exposed, etc. at that point there would be bigger things to worry about than the helm chart

@djmitche
Copy link
Copy Markdown
Collaborator

Sounds good. This is a great addition!

@jansenfuller
Copy link
Copy Markdown
Contributor Author

@djmitche, when you have a moment, please publish the helm chart, it would probably be best to host it wherever the container is hosted

@djmitche
Copy link
Copy Markdown
Collaborator

I'm not familiar with Helm. Last I used it, there was some kind of helm publish. Do the charts go to image registries instead, now?

@jansenfuller
Copy link
Copy Markdown
Contributor Author

Looks like there's a way to do it with a github action. It involves deploying it using GitHub Pages, which I unfortunately have no experience (I used Forgejo to test the chart). Here's a article that seems pretty straight forward to get it deployed. You can set the action

@jansenfuller
Copy link
Copy Markdown
Contributor Author

I created a couple PRs that should get us started. One to publish the first version of the helm chart, and another to add a github action for every push after that.
#198
#199

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants