Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kubernetes support via Helm chart #124

Open
wants to merge 113 commits into
base: master
Choose a base branch
from

Conversation

bartversluijs
Copy link
Contributor

I've spent quite some time in creating a Helm Chart for Kubernetes to deploy openBalena via Kubernetes.
I'm confident now that this Helm Chart is stable enough to be supported in the main openBalena repository and I'd like to get the opinion of the openBalena contributors as well as the community what could be improved and what's needed to get this PR merged.

The Helm Chart will create the following services, with the same versions as the current openBalena version:

  • openBalena API
    • Deployment
    • Service for port 80
    • Ingress to api.<hostname> with TLS rule
  • openBalena VPN
    • Deployment
    • Service for port 443 and 3128
    • Ingress to vpn.<hostname>
    • HAProxy snippet to get the VPN working over port 443
  • openBalena Registry
    • StatefulSet with PVC
    • Service for port 80
    • Ingress to registry.<hostname> with TLS rule
  • openBalena S3
    • StatefulSet with PVC
    • Service for port 80
    • Ingress to s3.<hostname> with TLS
    • Can be disabled if you're using an external S3, which can be configured in the values.yaml
  • openBalena DB
    • StatefulSet with PVC
    • Service for port 5432
  • Redis
    • StatefulSet with PVC
    • Service to port 6379
  • VPN Tunnel via TLS
    • HAProxy Ingress TCP service with TLS to VPN service port 3128
    • Ingress to tunnel.<hostname> with TLS

This will also resolve #6.


Please let me know what you think!

Bart Versluijs added 30 commits June 12, 2020 22:27
@fabienheureux
Copy link

Hi @bartversluijs I would be very interested in this PR.
Is there anything that can be done to help getting this through ?

@bartversluijs
Copy link
Contributor Author

Hi @fabienheureux,
I don't think this PR will be merged, but I can be wrong.
However, you can still use the Helm chart! Take a look here on how to use it.

I'm using it in production for a few years now and it works really well. And I'm not the only one using it!

When I have the time, I'll create a different repo with just the Helm chart and a script that can convert the current config to a Kubernetes Helm values file. This way, it doesn't need to keep up to date with the master branch here and versioning is somewhat simpler.

Hope it helps!

@fabienheureux
Copy link

Thanks a lot for your reply.
No worries it does not get merged, I was wondering how stable it was, but if you use it on prod then I will go ahead and start using it 🎉

An external repo would be great, I would be happy to help.

@nargetdev
Copy link

@bartversluijs very excited to deploy to my cluster, thanks for spearheading

@flowzone-app flowzone-app bot enabled auto-merge April 21, 2023 08:27
auto-merge was automatically disabled April 21, 2023 08:27

Head branch was pushed to by a user without write access

@flowzone-app flowzone-app bot enabled auto-merge April 21, 2023 08:28
auto-merge was automatically disabled May 12, 2023 09:03

Head branch was pushed to by a user without write access

@flowzone-app flowzone-app bot enabled auto-merge May 12, 2023 09:04
auto-merge was automatically disabled May 12, 2023 09:04

Head branch was pushed to by a user without write access

@flowzone-app flowzone-app bot enabled auto-merge May 12, 2023 09:04
@ab77
Copy link
Contributor

ab77 commented May 28, 2024

@bartversluijs you've probably see my comment in your dependency bump PR already, but in any case, thank you again! :)

If you are still interested making this contribution, would you consider refactoring to use https://kompose.io/ to generate Helm (and hopefully also vanilla Kubernetes manifests) programatically from the existing docker-compose.yml composition?

We could add that logic to the existing Flowzone CI workflow, and using "custom actions" workflow (e.g.):

.. run kompose to generate manifests (programatically edit/modify/cleanup them if required) and add to a GitHub release.

We could eventually even add them to the e2e test framework, by standing up a small kXs cluster programatically and making a test deployment.

@bartversluijs
Copy link
Contributor Author

@ab77 very interested in doing so, also learning about the CI/CD sides of things to get this automatically tested. Just need to find some time, but I'll definitely look into it!

@ab77
Copy link
Contributor

ab77 commented May 29, 2024

@ab77 very interested in doing so, also learning about the CI/CD sides of things to get this automatically tested. Just need to find some time, but I'll definitely look into it!

Awesome, and I am more than happy to help as well as answer any questions wrt to our CI, etc.

@ab77 ab77 mentioned this pull request Jun 14, 2024
@ab77 ab77 removed the request for review from pdcastro June 25, 2024 18:37
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.

kubernetes deployment support
5 participants