diff --git a/docs/developer-guide.md b/docs/developer-guide.md index fde003a1..5d510e02 100644 --- a/docs/developer-guide.md +++ b/docs/developer-guide.md @@ -68,75 +68,131 @@ This produces `dist/install.yaml` which can be applied with `kubectl apply -f`. ## Run the operator locally The kubebuilder scaffolding gives a build target `make run` which runs the operator process locally, but towards a K8s cluster. -Since neither Pod IPs are routable, nor Pod FQDNs are resolvable outside the cluster, any attempt by the operator to connect to a Valkey pod will fail. +Since Pod IPs are not routable outside the cluster, any attempt by the operator to connect to a Valkey pod will fail. -Here is a procedure to make it work, but you might need to adapt depending on your setup. +Below are procedures for Linux and macOS. -### Prerequisites +### Linux -* Linux and a distro using `systemd-resolved` for DNS (like Ubuntu >= 22.04, Fedora >= 36). -* K8s cluster via `minikube`, with the [Docker driver](https://minikube.sigs.k8s.io/docs/drivers/docker/) (default on Linux). -* The domain name for your cluster is `cluster.local`. +#### Prerequisites -### Steps +* [kind](https://kind.sigs.k8s.io/). -#### 1. Start the K8s cluster and install the operator CRD. +#### Steps + +##### 1. Create a kind cluster and install the operator CRD. ```bash -minikube start +kind create cluster --name valkey-dev --config - <...svc.cluster.local`, we also need to setup the DNS. +##### 1. Set up a rootful Podman machine and install podman-mac-net-connect. +A rootful machine is required to get a bridge network, giving containers routable IPs +that `podman-mac-net-connect` can route to from macOS. -#### 4. Setup DNS to be able to resolve `cluster.local` domain names. +```bash +podman machine init --rootful +podman machine start + +brew install jasonmadigan/tap/podman-mac-net-connect +sudo brew services start jasonmadigan/tap/podman-mac-net-connect +``` + +##### 2. Create a kind cluster and install the operator CRD. ```bash -# Add kube-dns to the list of DNS servers -sudo resolvectl dns $(ip route | grep $(minikube ip) | awk '{print $NF}' | uniq) $(kubectl -n kube-system get svc kube-dns -o jsonpath='{.spec.clusterIP}') +KIND_EXPERIMENTAL_PROVIDER=podman kind create cluster --name valkey-dev --config - <