uhthomas/automata

rules_k8s?

Closed this issue · 4 comments

Rather than using flux to automate deployments, it might be far better to use rules_k8s to hermetically build and deploy manifests.

Yep, pretty keen to proceed with this. I have some quandaries with helm, and I've taken a look at this repo but I don't really think it's what I'm looking for. Really I want it to spit out the manifests from the helm chart so it can let bazel/kubectl do the diffing.

Moving to rules_k8s should make everything a lot safer from a deployment, and security perspective.

It will also aid in the initial setup. Ideally, kubectl auth will need to be setup, and bazel can handle the rest.

Deployments should also be much quicker as bazel is much smarter at handling large diffs. Have run into some very silly issues with flux, especially when it comes to memory usage.

It doesn't look like rules_k8s automatically deletes objects either. Will take a look, but https://kubernetes.io/docs/concepts/workloads/controllers/garbage-collection/ seems like a good place to start.

This is partly done. Flux is gone, but it's using kubectl apply directly. Object are not automatically garbage collected as --prune is extremely deadly.

Done!