From ca87376a127af8563cc98cc4da623a95b20888f3 Mon Sep 17 00:00:00 2001
From: Sheogorath <sheogorath@shivering-isles.com>
Date: Sat, 15 Jan 2022 22:06:37 +0100
Subject: [PATCH] fix(longhorn): Fix post-render kustomization

This patch removes one of the adjustments, in order to fix an error
message complaining about not being able to find the resource that is
supposed to be fixed.

```
Helm install failed: error while running post render on files: no matches for Id apps_v1_Deployment|~X|longhorn-driver-deployer; failed to find unique target for patch apps_v1_Deployment|longhorn-driver-deployer
```

I'm not sure why it fails, but this is an attempt to fix it, by removing
the errorous patch. Hopefully the daemonset patching will work out.
---
 infrastructure/longhorn/release.yaml | 20 --------------------
 1 file changed, 20 deletions(-)

diff --git a/infrastructure/longhorn/release.yaml b/infrastructure/longhorn/release.yaml
index ce640d2df..dd1e83c0b 100644
--- a/infrastructure/longhorn/release.yaml
+++ b/infrastructure/longhorn/release.yaml
@@ -17,28 +17,8 @@ spec:
     persistence:
       defaultClassReplicaCount: 2
   postRenderers:
-    # Instruct helm-controller to use built-in "kustomize" post renderer.
     - kustomize:
-        # Array of inline strategic merge patch definitions as YAML object.
-        # Note, this is a YAML object and not a string, to avoid syntax
-        # indention errors.
         patchesStrategicMerge:
-          - kind: Deployment
-            apiVersion: apps/v1
-            metadata:
-              name: longhorn-driver-deployer
-            spec:
-              template:
-                spec:
-                  affinity:
-                    nodeAffinity:
-                      requiredDuringSchedulingIgnoredDuringExecution:
-                        nodeSelectorTerms:
-                        - matchExpressions:
-                          - key: plan.upgrade.cattle.io/longhorn-setup
-                            operator: Exists
-                          - key: plan.upgrade.cattle.io/longhorn-lvm
-                            operator: Exists
           - kind: DaemonSet
             apiVersion: apps/v1
             metadata:
-- 
GitLab