From a2c72a1098a3070e59e914ece3f3306572fc34f8 Mon Sep 17 00:00:00 2001
From: Sheogorath <sheogorath@shivering-isles.com>
Date: Sat, 22 Jan 2022 14:52:44 +0100
Subject: [PATCH] chore(system-upgrades): Rearrange matchExpression statements

This patch should just improve the readablity for the matchExpressions a
bit.
---
 infrastructure/system-upgrades/fedora.yaml         | 10 ++++++++--
 infrastructure/system-upgrades/longhorn-lvm.yaml   |  4 ++--
 infrastructure/system-upgrades/longhorn-setup.yaml | 10 ++++++++--
 3 files changed, 18 insertions(+), 6 deletions(-)

diff --git a/infrastructure/system-upgrades/fedora.yaml b/infrastructure/system-upgrades/fedora.yaml
index 0dd065a08..1be5656ca 100644
--- a/infrastructure/system-upgrades/fedora.yaml
+++ b/infrastructure/system-upgrades/fedora.yaml
@@ -26,8 +26,14 @@ spec:
   concurrency: 1
   nodeSelector:
     matchExpressions:
-      - {key: feature.node.kubernetes.io/system-os_release.ID, operator: In, values: ["fedora"]}
-      - {key: feature.node.kubernetes.io/system-os_release.VERSION_ID.major, operator: In, values: ["35"]}
+      - key: feature.node.kubernetes.io/system-os_release.ID
+        operator: In
+        values:
+          - fedora
+      - key: feature.node.kubernetes.io/system-os_release.VERSION_ID.major
+        operator: In
+        values:
+          - "35"
   serviceAccountName: system-upgrade
   secrets:
     - name: fedora-dnf-upgrade
diff --git a/infrastructure/system-upgrades/longhorn-lvm.yaml b/infrastructure/system-upgrades/longhorn-lvm.yaml
index a1e9c6d30..1c0155178 100644
--- a/infrastructure/system-upgrades/longhorn-lvm.yaml
+++ b/infrastructure/system-upgrades/longhorn-lvm.yaml
@@ -14,7 +14,6 @@ stringData:
     secrets="$(dirname $0)"
     VG_NAME="$(vgs | tail -n +2 | awk '{print $1}')"
     LV_NAME=longhorn
-    
     # Validate Volume Group existence
     if ! echo "$VG_NAME" | grep "fedora"; then
       echo "Failed to find volume group" >&2
@@ -74,7 +73,8 @@ spec:
   concurrency: 1
   nodeSelector:
     matchExpressions:
-      - {key: plan.upgrade.cattle.io/longhorn-setup, operator: Exists}
+      - key: plan.upgrade.cattle.io/longhorn-setup
+        operator: Exists
   serviceAccountName: system-upgrade
   secrets:
     - name: longhorn-lvm
diff --git a/infrastructure/system-upgrades/longhorn-setup.yaml b/infrastructure/system-upgrades/longhorn-setup.yaml
index 75aa34fdb..6bea92212 100644
--- a/infrastructure/system-upgrades/longhorn-setup.yaml
+++ b/infrastructure/system-upgrades/longhorn-setup.yaml
@@ -25,8 +25,14 @@ spec:
   concurrency: 1
   nodeSelector:
     matchExpressions:
-      - {key: feature.node.kubernetes.io/system-os_release.ID, operator: In, values: ["fedora"]}
-      - {key: feature.node.kubernetes.io/system-os_release.VERSION_ID.major, operator: In, values: ["35"]}
+      - key: feature.node.kubernetes.io/system-os_release.ID
+        operator: In
+        values:
+          - "fedora"
+      - key: feature.node.kubernetes.io/system-os_release.VERSION_ID.major
+        operator: In
+        values:
+          - "35"
   serviceAccountName: system-upgrade
   secrets:
     - name: longhorn-setup
-- 
GitLab