From 8d6a3a51c8c3cb3f20e0f39939837eb7b28343cb Mon Sep 17 00:00:00 2001
From: Benjamin Starks <benjamin.starks@omnifederal.com>
Date: Mon, 6 Jan 2025 11:32:10 -0600
Subject: [PATCH 1/4] Add ability to disable minio-operator dependency for MM

---
 chart/templates/mattermost/helmrelease.yaml | 8 +++-----
 chart/values.yaml                           | 4 ++++
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/chart/templates/mattermost/helmrelease.yaml b/chart/templates/mattermost/helmrelease.yaml
index 407db9c6b3..04137fe2f6 100644
--- a/chart/templates/mattermost/helmrelease.yaml
+++ b/chart/templates/mattermost/helmrelease.yaml
@@ -60,11 +60,9 @@ spec:
     - name: mattermost-operator
       namespace: {{ .Release.Namespace }}
 
-    {{- with .Values.addons.mattermost.objectStorage }}
-    {{- if not (and .endpoint .accessKey .accessSecret .bucket) }}
-    - name: minio-operator
-      namespace: {{ $.Release.Namespace }}
-    {{- end }}
+    {{- if and .Values.addons.mattermost.minioOperator.enabled (not (and .Values.addons.mattermost.objectStorage.endpoint .Values.addons.mattermost.objectStorage.accessKey .Values.addons.mattermost.objectStorage.accessSecret .Values.addons.mattermost.objectStorage.bucket)) }} 
+    - name: minio-operator 
+      namespace: {{ $.Release.Namespace }} 
     {{- end }}
 
     {{- if and .Values.addons.mattermost.elasticsearch.enabled .Values.elasticsearchKibana.enabled }}
diff --git a/chart/values.yaml b/chart/values.yaml
index d797e3b893..8f3f1bb4bb 100644
--- a/chart/values.yaml
+++ b/chart/values.yaml
@@ -1726,6 +1726,10 @@ addons:
       # -- Toggle interaction with Elastic for optimized search indexing
       enabled: false
 
+    minioOperator:
+      # -- Toggle dependency for minio-operator
+      enabled: true
+
     # -- Values to passthrough to the Mattermost chart: https://repo1.dso.mil/big-bang/product/packages/values.yaml
     values: {}
 
-- 
GitLab


From 6fa5a7b684ae298650b9b0f9a730497e47726122 Mon Sep 17 00:00:00 2001
From: Benjamin Starks <benjamin.starks@omnifederal.com>
Date: Tue, 7 Jan 2025 08:37:59 -0600
Subject: [PATCH 2/4] add minio-operator value to test-values

---
 tests/test-values.yaml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tests/test-values.yaml b/tests/test-values.yaml
index ae7dea7d17..86804dbcf0 100644
--- a/tests/test-values.yaml
+++ b/tests/test-values.yaml
@@ -1913,6 +1913,8 @@ addons:
       client_secret: "no-secret"
     elasticsearch:
       enabled: true
+    minioOperator:
+      enabled: true
     values:
       enterprise:
         enabled: true
-- 
GitLab


From ab731c066b75c3d626e19d27eb343770c475f3b5 Mon Sep 17 00:00:00 2001
From: Benjamin Starks <benjamin.starks@omnifederal.com>
Date: Tue, 14 Jan 2025 15:01:46 -0600
Subject: [PATCH 3/4] simplify helmrelease.yaml

---
 chart/templates/mattermost/helmrelease.yaml | 4 +++-
 tests/test-values.yaml                      | 2 --
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/chart/templates/mattermost/helmrelease.yaml b/chart/templates/mattermost/helmrelease.yaml
index 04137fe2f6..72acdf1953 100644
--- a/chart/templates/mattermost/helmrelease.yaml
+++ b/chart/templates/mattermost/helmrelease.yaml
@@ -60,10 +60,12 @@ spec:
     - name: mattermost-operator
       namespace: {{ .Release.Namespace }}
 
-    {{- if and .Values.addons.mattermost.minioOperator.enabled (not (and .Values.addons.mattermost.objectStorage.endpoint .Values.addons.mattermost.objectStorage.accessKey .Values.addons.mattermost.objectStorage.accessSecret .Values.addons.mattermost.objectStorage.bucket)) }} 
+    {{- with .Values.addons.mattermost }}
+    {{- if and .minioOperator.enabled (not (and .objectStorage.endpoint .objectStorage.accessKey .objectStorage.accessSecret .objectStorage.bucket)) }} 
     - name: minio-operator 
       namespace: {{ $.Release.Namespace }} 
     {{- end }}
+    {{- end }}
 
     {{- if and .Values.addons.mattermost.elasticsearch.enabled .Values.elasticsearchKibana.enabled }}
     - name: ek
diff --git a/tests/test-values.yaml b/tests/test-values.yaml
index 86804dbcf0..ae7dea7d17 100644
--- a/tests/test-values.yaml
+++ b/tests/test-values.yaml
@@ -1913,8 +1913,6 @@ addons:
       client_secret: "no-secret"
     elasticsearch:
       enabled: true
-    minioOperator:
-      enabled: true
     values:
       enterprise:
         enabled: true
-- 
GitLab


From 93b7f0f1833e131731016fc917b838eaea981e37 Mon Sep 17 00:00:00 2001
From: Benjamin Starks <benjamin.starks@omnifederal.com>
Date: Tue, 21 Jan 2025 15:27:53 -0600
Subject: [PATCH 4/4] clean up helm release dependency

---
 chart/templates/mattermost/helmrelease.yaml | 4 +---
 chart/values.yaml                           | 4 ----
 2 files changed, 1 insertion(+), 7 deletions(-)

diff --git a/chart/templates/mattermost/helmrelease.yaml b/chart/templates/mattermost/helmrelease.yaml
index 72acdf1953..9a5dadd728 100644
--- a/chart/templates/mattermost/helmrelease.yaml
+++ b/chart/templates/mattermost/helmrelease.yaml
@@ -60,12 +60,10 @@ spec:
     - name: mattermost-operator
       namespace: {{ .Release.Namespace }}
 
-    {{- with .Values.addons.mattermost }}
-    {{- if and .minioOperator.enabled (not (and .objectStorage.endpoint .objectStorage.accessKey .objectStorage.accessSecret .objectStorage.bucket)) }} 
+    {{- if .Values.addons.minioOperator.enabled }} 
     - name: minio-operator 
       namespace: {{ $.Release.Namespace }} 
     {{- end }}
-    {{- end }}
 
     {{- if and .Values.addons.mattermost.elasticsearch.enabled .Values.elasticsearchKibana.enabled }}
     - name: ek
diff --git a/chart/values.yaml b/chart/values.yaml
index 8f3f1bb4bb..d797e3b893 100644
--- a/chart/values.yaml
+++ b/chart/values.yaml
@@ -1726,10 +1726,6 @@ addons:
       # -- Toggle interaction with Elastic for optimized search indexing
       enabled: false
 
-    minioOperator:
-      # -- Toggle dependency for minio-operator
-      enabled: true
-
     # -- Values to passthrough to the Mattermost chart: https://repo1.dso.mil/big-bang/product/packages/values.yaml
     values: {}
 
-- 
GitLab