Local prototyping of ArgoCD manifests with minikube and Gitea

Alessandro Vozza
4 min readNov 14, 2022

Have you ever wished you could test your ArgoCD manifests before pushing them to your VCS? GitOps of course it’s great, and it’s de facto deployment paradigm for cloud native applications. However, most tools out there rely on git as the single source of truth (and rightly so), so it’s often necessary to interact with a remote repository to test our manifests, usually against a shared dev or acceptance environment. I found myself often in need of a solution to test locally against a local cluster like minikube or kind; often that leads to multiple git pushes to Github and consequent application of the remote commit.

I devised a way to have a local folder applied to ArgoCD running in minikube, when I remembered that Otomi, an open source, Kubernetes-based full PaaS solution, also includes the open source Gitea git server to serve local helm chart, so I came up with this Makefile (Makefiles are awesome! I had to figure out a few kinks in how to escape quotes, specially when you want to use --set at the Helm command line, instead of relying on values.yaml files. But lo and behold, here it is, we’ll go thru the steps:

#the below is mac-specific
#local=`pwd|cut -c7-`

#if run in Codespaces, uncomment the following
local=`pwd`

local_folder="/minikube-host${local}/.git"

all: start gitea repo argocd root portforward…

--

--

Alessandro Vozza

Full time Cloud Pirate, software engineer at Microsoft, public speaker, community organiser and mentor. Opinions are mine’s, facts are facts.