From acee1579eb0e6351b6fa0ef25c5778a03a70e0bc Mon Sep 17 00:00:00 2001 From: James Andariese Date: Tue, 17 Oct 2023 00:45:40 -0500 Subject: [PATCH] add readme info about needing a pvc provisioner and warning the warning is about deleting the cluster also deleting the repo. probably obvious to most but a little undue caution could help someone. --- README.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 77769e1..8bffe03 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,21 @@ be in your PATH to work. ln -sf $PWD/git-remote-k8s.sh $HOME/bin/git-remote-k8s ``` +## Prerequisites + +You must have access to a kubernetes cluster using kubectl where you can provision a +persistent volume somehow and bind it to a claim. If you can "create a new PVC for a pod", +you're probably good to go. If you instead get a pending claim forever, you will need +to setup a volume provider which can do dynamic provisioning. I've been using longhorn +lately since it has very simple backups. I have been very happy with it but YMMV. k3s +also comes with a local dynamic provisioner and that would also work. + +## WARNING + +If you use this with minikube or similar and then delete your cluster, you will lose the +git repo stored in the volume! Use with caution in non-prod environments. And use caution +in prod, too! Don't forget backups. + ## Usage The URL format for `git-remote-k8s` is `k8s://kubectl-context/namespace/pvc`. @@ -39,4 +54,3 @@ Adding a remote: ```bash git remote add origin k8s//context/namespace/pvc ``` -