Add PV provisioner
This adds a new PV provisioner which works together with the
CSI Node driver to provide storage to workloads on Smalltown.
It talks to Kubernetes and listens for PVCs which need to be provisioned
and PVs which have been released and need to be deleted.
Is is implemented as a per-node agent where every node provisions the
volumes scheduled onto it by kube-scheduler.
Test Plan: Manually tested by running `bazel run //core/cmd/dbg -- kubectl create -f $PWD/pv-test.yml` and observing a provisioned PV that's attached to the pod. An example `test-pv.yml` is in P137.
X-Origin-Diff: phab/D482
GitOrigin-RevId: 75a871b039e71dd248f937719c471e0277887964
diff --git a/core/internal/kubernetes/csi.go b/core/internal/kubernetes/csi.go
index 53f5097..6db82bc 100644
--- a/core/internal/kubernetes/csi.go
+++ b/core/internal/kubernetes/csi.go
@@ -42,7 +42,7 @@
// Derived from K8s spec for acceptable names, but shortened to 130 characters to avoid issues with
// maximum path length. We don't provision longer names so this applies only if you manually create
// a volume with a name of more than 130 characters.
-var acceptableNames = regexp.MustCompile("^[a-z][a-z0-9-\\.]{,128}[a-z]$")
+var acceptableNames = regexp.MustCompile("^[a-z][a-bz0-9-.]{0,128}[a-z0-9]$")
const volumeDir = "volumes"