From 087f88e589752166e1cdb8544427a9b23b1af0fd Mon Sep 17 00:00:00 2001 From: Sheogorath <sheogorath@shivering-isles.com> Date: Mon, 30 May 2022 00:00:43 +0200 Subject: [PATCH] fix(longhorn): Add safety net for deletion This patch should prevent flux from deleting the longhorn namespace, which contains all the data of the cluster by accident. While this takes the namespace out of the flux management when it comes to cleaning up, after this weekend's endevor of recovering from an accidentally deleted namespace, this seems to worth the hassle. It's a simple solution to a complicated problem. Since the deletion of the helm chart, will break application, but should not delete all data, just the runtime that manages it, this should be fine to recover in worst case. Without having to resort the backups. --- infrastructure/longhorn/namespace.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/infrastructure/longhorn/namespace.yaml b/infrastructure/longhorn/namespace.yaml index d50510a4f..6b1119d69 100644 --- a/infrastructure/longhorn/namespace.yaml +++ b/infrastructure/longhorn/namespace.yaml @@ -4,4 +4,5 @@ metadata: name: longhorn-system labels: name: longhorn-system - kyverno.shivering-isles.com/class: "system" + kyverno.shivering-isles.com/class: "system" + kustomize.toolkit.fluxcd.io/prune: disabled -- GitLab