buildbarn / bb-deployments

Example deployments of Buildbarn on various platforms
Apache License 2.0
102 stars 70 forks source link

Kubernetes Jsonnet Libs #72

Closed midnightconman closed 9 months ago

midnightconman commented 2 years ago

Hello BuildBarn folks 😸

I am so happy to see you have jsonnet examples for bare and docker-compose! Is it possible to add jsonnet libs for the kubernetes deployments? We source most of our kubernetes manifests remotely (via bazel and rules_jsonnet), so this would make maintaining these manifests internally much simpler.

I wouldn't mind putting in a PR for this, if it will be reviewed and accepted?

Thank you!

moroten commented 2 years ago

I don't really understand how you mean. Please file a PR and I can have a look. Just building the jsonnet files is probably good to do in the CI anyway.

midnightconman commented 2 years ago

Here is a branch that shows the general idea: https://github.com/buildbarn/bb-deployments/compare/master...midnightconman:bb-deployments:midnight/jsonnet-libs-20220927?expand=1

Thoughts, comments?

moroten commented 2 years ago

I think it looks like a good idea. For the Kubernetes deployment, I created a diff tool agains the other configs as they are tested using a basic integration test whereas the Kubernetes deployment is not. Is it possible to add that as well for this version?

Please create the PR so we can continue the discussion there.

midnightconman commented 2 years ago

Sounds good to me, thank you! 😸 I'll add the other components and create a PR.

I think you are referring to this? https://github.com/buildbarn/bb-deployments/blob/master/tools/diff-docker-and-k8s-configs.sh

moroten commented 2 years ago

Yes, that's the script. It would be even better to also run Minikube or similar to test the deployment.

moroten commented 9 months ago

There is now Kubernetes tests running in CI. The use of configMapGenerator also allowed to have .jsonnet checked in under the Kubernetes folder.