You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# test: manifests generate fmt vet setup-envtest ## Run tests.
181
+
# KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) --bin-dir $(LOCALBIN) -p path)" go test $$(go list ./... | grep -v /e2e) -coverprofile cover.out
182
+
183
+
.PHONY: controller-gen
184
+
controller-gen: $(CONTROLLER_GEN)
185
+
$(CONTROLLER_GEN): $(LOCALBIN)
186
+
test -s $(LOCALBIN)/controller-gen &&$(LOCALBIN)/controller-gen --version | grep -q $(CONTROLLER_TOOLS_VERSION)||\
187
+
GOOS= GOARCH= GOARM= GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-tools/cmd/controller-gen@$(CONTROLLER_TOOLS_VERSION)
188
+
189
+
.PHONY: setup-envtest
190
+
setup-envtest: $(ENVTEST)
191
+
$(ENVTEST): $(LOCALBIN)
192
+
test -s $(LOCALBIN)/setup-envtest || GOOS= GOARCH= GOARM= GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest
Copy file name to clipboardExpand all lines: README.md
+12Lines changed: 12 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,17 @@ This CSI driver is derived from [csi-driver-host-path](https://github.com/kubern
12
12
13
13
For the special case of block volumes, the filesystem-expansion has to be performed by the app using the block device
14
14
15
+
## Automatic PVC Deletion on Pod Eviction
16
+
17
+
The persistent volumes created by this CSI driver are strictly node-affine to the node on which the pod was scheduled. This is intentional and prevents pods from starting without the LV data, which resides only on the specific node in the Kubernetes cluster.
18
+
19
+
Consequently, if a pod is evicted (potentially due to cluster autoscaling or updates to the worker node), the pod may become stuck. In certain scenarios, it's acceptable for the pod to start on another node, despite the potential for data loss. The csi-driver-lvm-controller can capture these events and automatically delete the PVC without requiring manual intervention by an operator.
20
+
21
+
To use this functionality, the following is needed:
22
+
23
+
- This only works on `StatefulSet`s with volumeClaimTemplates and volume references to the `csi-driver-lvm` storage class
24
+
- In addition to that, the `Pod` or `PersistentVolumeClaim` managed by the `StatefulSet` needs the annotation: `metal-stack.io/csi-driver-lvm.is-eviction-allowed: true`
25
+
15
26
## Installation ##
16
27
17
28
**Helm charts for installation are located in a separate repository called [helm-charts](https://github.com/metal-stack/helm-charts). If you would like to contribute to the helm chart, please raise an issue or pull request there.**
@@ -65,6 +76,7 @@ You can create these loop devices like this:
0 commit comments