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
Feature: Add support for Kubernetes deployment through Kustomize #187
Conversation
Thanks for adding this! Can you please add |
configMapKeyRef: | ||
name: faros-config | ||
key: FAROS_CONFIG_DB_USER | ||
- name: MB_DB_PASS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not able to access any databases from Metabase UI. Is it configured correctly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah it is, I got all the applications working - Do you have more information?
This might indicate that the initialization (faros-init) didn't run properly and didn't set up metabase's configuration.... 🤔
Do you have more logs context of the deployment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did the initialization using faros-ce-init
work for you?
I was able to port forward Hasura for example, but I can see it wasn't initialized.
It works for me more often than not in Mac, but it will depend a bit on the performance of the cluster to make sure things boot up properly. Running K8s in a Mac is often slower due to the virtualization compared to Linux. I've booted up on both, but the MacOS takes a bit longer and depending on how much retries are configured it can exhaust the retries. Linux is pretty snappy and haven't had an issue with it. I'm thinking that's likely tied to the local resources from the Mac perspective Have you checked to see the logs on the |
Thanks! I gave my minikube cluster more resources and was able to bring it up. I'll do some local testing and get back to you soon! 👍 |
@ypc-faros Sounds good, let me know how it goes. There's more on what we can improve upon both on resource constraints as well as dependency management but this feel like a good starting point from what I've tested so far, and unblocks people to get going with this deployment |
kube/README.md
Outdated
- https://github.com/faros-ai/faros-community-edition/kube/base | ||
``` | ||
|
||
> This allow you to customize the Kubernetes resources objects in any way you want to meet whatever desired cluster requirements you might have |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
allow => allows
kube/base/hasura/deployment.yaml
Outdated
containers: | ||
- name: hasura | ||
# This is being sourced from HASURA_VERSION env value from faros-config | ||
# and replace by Kustomization using the "replacements" feature |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
replace => replaced
kube/base/metabase/deployment.yaml
Outdated
containers: | ||
- name: metabase | ||
# This is being sourced from METABASE_VERSION env value from faros-config | ||
# and replace by Kustomization using the "replacements" feature |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
replace => replaced
kube/base/n8n/deployment.yaml
Outdated
containers: | ||
- name: n8n | ||
# This is being sourced from N8N_VERSION env value from faros-config | ||
# and replace by Kustomization using the "replacements" feature |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
replace => replaced
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @saviogl 🥳 !!!
Description
This PR adds initial support for Kubernetes deployments through Kustomize. This allows for a more K8s flexible deployment K8s model that can cater to users particular requirements.
It uses Airbyte's provided Kustomize distribution, and include the additional dependent resources (metabase, n8n, hasura).
There are still improvements that can be made for a true production deployment, but I think it's a good starting point to get feedback and have it integrated.
Currently it contains a
base
setup with no overlays, that mimics much like the local development setup provided through docker-compose. As we move forward we can start creating overlays to cater to general use cases.Noticeable features:
farosai/faros-ce-init:latest
).env
for auto setupkustomize
without the flag--load-restrictor LoadRestrictionsNone
. This flag prevents files from being loaded outside of thekustomization.yaml
folder.Deployment
For deploying this stack provided that you have access to a cluster you can just run:
Type of change
Checklist
(Delete what does not apply)