4 ms·
I built something like this in Go a few years ago but it reloads your infrastructure when it changes, recompiles your code when it needs to, and syncs static fi
by rckrd 5y ago
I built something like this in Go a few years ago but it reloads your infrastructure when it changes, recompiles your code when it needs to, and syncs static files or interpreted files to wherever your app is running (desktop or cloud). Think of it like docker-compose but with file watching + sync + smart rebuilds. https://skaffold.dev/ https://skaffold.dev/
- gavinray 5y agoYou're the author of Skaffold? Damn that's impressive
- __float 5y agoIs there a skaffold for borg that inspired this? Curious if there are any existing things you were inspired by, or particular pitfalls in alternatives you wanted to avoid!
- rckrd 5y agoNo but I heavily drew from three tools: (1) minikube, which I also maintained at Google. I saw how difficult getting started with Kubernetes could be even when you were able to create a local cluster. I also knew all the shortcuts that you could take to streamline local Kubernetes workflows (e.g., loading images directly into the minikube docker daemon). (2) docker compose, which remains a great tool but had no analogue for Kubernetes. It also didn't have a concept of syncing for hot-reloadable projects or built-in file watcher. (1), Draft by the Deis folks at Microsoft, which was a great tool but suffered from having a component that you needed to install on the cluster to work, where the skaffold architecture was purely client side (making it a lot easier to get started, and faster). I also wanted to make skaffold pluggable, so it supported helm, kubectl, docker, bazel, and other tools right from the start. It also had clear boundaries between build and deploy and ideas for CI and gitops workflows built in.
- rejectedandsad 5y agoHow does it handle watch mode for compiled or built code?
- rckrd 5y agoIt parses a Dockerfile (or queries dependencies in a tool like bazel) to get a list of file dependencies and then kicks off an optimized rebuild and redeploy. If you're using buildkit and caches this can be done really quickly (close to native compile without a Docker image) You can tell it to just sync certain changes (e.g. syncing a javascript file to a container running webpack).
- nklmilojevic 5y agoOne of my most used tools. Absolute joy to work with it and its Helm integration.
- cpgeier 5y agoSkaffold makes bringing up and down a complex stack on Kubernetes a breeze. Thank you for an awesome tool!