From d151e2cb9d8d7b4099cfdcd63780db5461db5be8 Mon Sep 17 00:00:00 2001
From: Sheogorath <sheogorath@shivering-isles.com>
Date: Thu, 5 Oct 2023 22:01:35 +0200
Subject: [PATCH] fix(mastodon): Use proper `emptyDir` vs `emptydir`

---
 charts/mastodon/Chart.yaml                           |  2 +-
 charts/mastodon/README.md                            |  4 ++--
 charts/mastodon/tests/50_sidekiq_test.yaml           |  2 +-
 charts/mastodon/tests/50_web_test.yaml               | 12 ++++++------
 .../tests/__snapshot__/50_sidekiq_test.yaml.snap     |  6 +++---
 .../tests/__snapshot__/50_web_test.yaml.snap         |  5 ++++-
 .../__snapshot__/80_subchart_redis_test.yaml.snap    |  2 +-
 .../tests/__snapshot__/98_snapshot_test.yaml.snap    |  4 ++--
 charts/mastodon/values.yaml                          |  2 +-
 9 files changed, 21 insertions(+), 18 deletions(-)

diff --git a/charts/mastodon/Chart.yaml b/charts/mastodon/Chart.yaml
index 26c8149a7..06d7945f5 100644
--- a/charts/mastodon/Chart.yaml
+++ b/charts/mastodon/Chart.yaml
@@ -17,7 +17,7 @@ annotations:
     - name: support
       url: https://matrix.to/#/#mastodon-on-kubernetes:shivering-isles.com
 type: application
-version: 7.2.1
+version: 7.2.2
 kubeVersion: ">= 1.23"
 # renovate: image=ghcr.io/mastodon/mastodon
 appVersion: "v4.1.9"
diff --git a/charts/mastodon/README.md b/charts/mastodon/README.md
index e0fa65141..8494e21d6 100644
--- a/charts/mastodon/README.md
+++ b/charts/mastodon/README.md
@@ -1,6 +1,6 @@
 # mastodon
 
-![Version: 7.2.1](https://img.shields.io/badge/Version-7.2.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v4.1.9](https://img.shields.io/badge/AppVersion-v4.1.9-informational?style=flat-square)
+![Version: 7.2.2](https://img.shields.io/badge/Version-7.2.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v4.1.9](https://img.shields.io/badge/AppVersion-v4.1.9-informational?style=flat-square)
 
 Mastodon is a free, open-source social network server based on ActivityPub.
 
@@ -76,7 +76,7 @@ Kubernetes: `>= 1.23`
 | mastodon.sidekiq.podSecurityContext | object | `{}` | Pod security context for all Sidekiq Pods, overwrites .Values.podSecurityContext |
 | mastodon.sidekiq.resources | object | `{}` | Resources for all Sidekiq Deployments unless overwritten |
 | mastodon.sidekiq.securityContext | Sidekiq Container | `{"readOnlyRootFilesystem":true}` | Security Context for all Pods, overwrites .Values.securityContext |
-| mastodon.sidekiq.temporaryVolumeTemplate | object | `{"emptydir":{"medium":"Memory"}}` | temporary volume template required for read-only root filesystem |
+| mastodon.sidekiq.temporaryVolumeTemplate | object | `{"emptyDir":{"medium":"Memory"}}` | temporary volume template required for read-only root filesystem |
 | mastodon.sidekiq.workers[0].affinity | object | `{}` | Affinity for this specific deployment, overwrites .Values.affinity and .Values.mastodon.sidekiq.affinity |
 | mastodon.sidekiq.workers[0].concurrency | int | `25` | Number of threads / parallel sidekiq jobs that are executed per Pod |
 | mastodon.sidekiq.workers[0].name | string | `"all-queues"` |  |
diff --git a/charts/mastodon/tests/50_sidekiq_test.yaml b/charts/mastodon/tests/50_sidekiq_test.yaml
index 919fe7336..d111efe17 100644
--- a/charts/mastodon/tests/50_sidekiq_test.yaml
+++ b/charts/mastodon/tests/50_sidekiq_test.yaml
@@ -100,7 +100,7 @@ tests:
       mastodon:
         sidekiq:
           temporaryVolumeTemplate:
-            emptydir: null
+            emptyDir: null
             ephemeral:
               volumeClaimTemplate:
                 spec:
diff --git a/charts/mastodon/tests/50_web_test.yaml b/charts/mastodon/tests/50_web_test.yaml
index 8b6ff3d69..8e98ee2c3 100644
--- a/charts/mastodon/tests/50_web_test.yaml
+++ b/charts/mastodon/tests/50_web_test.yaml
@@ -62,14 +62,14 @@ tests:
       - mocks/dev.yaml
     set:
       mastodon:
-        # sidekiq:
-        #   temporaryVolumeTemplate:
-        #     emptydir: null
-        #     some:
-        #       nonsense: true
-        web:
+        sidekiq:
           temporaryVolumeTemplate:
             emptydir: null
+            some:
+              nonsense: true
+        web:
+          temporaryVolumeTemplate:
+            emptyDir: null
             ephemeral:
               volumeClaimTemplate:
                 spec:
diff --git a/charts/mastodon/tests/__snapshot__/50_sidekiq_test.yaml.snap b/charts/mastodon/tests/__snapshot__/50_sidekiq_test.yaml.snap
index 7391e342c..20d95c7d9 100644
--- a/charts/mastodon/tests/__snapshot__/50_sidekiq_test.yaml.snap
+++ b/charts/mastodon/tests/__snapshot__/50_sidekiq_test.yaml.snap
@@ -417,7 +417,7 @@ renders temporaryVolumeTemplate correctly:
               type: RuntimeDefault
           serviceAccountName: RELEASE-NAME-mastodon
           volumes:
-            - emptydir:
+            - emptyDir:
                 medium: Memory
               name: tmp
   3: |
@@ -499,7 +499,7 @@ renders temporaryVolumeTemplate correctly:
               type: RuntimeDefault
           serviceAccountName: RELEASE-NAME-mastodon
           volumes:
-            - emptydir:
+            - emptyDir:
                 medium: Memory
               name: tmp
   4: |
@@ -702,7 +702,7 @@ should match basic snapshot:
             - name: system
               persistentVolumeClaim:
                 claimName: RELEASE-NAME-mastodon-system
-            - emptydir:
+            - emptyDir:
                 medium: Memory
               name: tmp
   3: |
diff --git a/charts/mastodon/tests/__snapshot__/50_web_test.yaml.snap b/charts/mastodon/tests/__snapshot__/50_web_test.yaml.snap
index a756aed63..e7bf6bd2f 100644
--- a/charts/mastodon/tests/__snapshot__/50_web_test.yaml.snap
+++ b/charts/mastodon/tests/__snapshot__/50_web_test.yaml.snap
@@ -139,7 +139,10 @@ should allow manipulating the temporaryVolumeTemplate:
             - name: system
               persistentVolumeClaim:
                 claimName: RELEASE-NAME-mastodon-system
-            - ephemeral:
+            - emptyDir: null
+              emptydir:
+                medium: Memory
+              ephemeral:
                 volumeClaimTemplate:
                   spec:
                     accessModes:
diff --git a/charts/mastodon/tests/__snapshot__/80_subchart_redis_test.yaml.snap b/charts/mastodon/tests/__snapshot__/80_subchart_redis_test.yaml.snap
index dbe8f20cc..207cee42f 100644
--- a/charts/mastodon/tests/__snapshot__/80_subchart_redis_test.yaml.snap
+++ b/charts/mastodon/tests/__snapshot__/80_subchart_redis_test.yaml.snap
@@ -95,7 +95,7 @@ should allow disabling redis auth:
             - name: system
               persistentVolumeClaim:
                 claimName: RELEASE-NAME-mastodon-system
-            - emptydir:
+            - emptyDir:
                 medium: Memory
               name: tmp
   2: |
diff --git a/charts/mastodon/tests/__snapshot__/98_snapshot_test.yaml.snap b/charts/mastodon/tests/__snapshot__/98_snapshot_test.yaml.snap
index e2228b3ce..af762e200 100644
--- a/charts/mastodon/tests/__snapshot__/98_snapshot_test.yaml.snap
+++ b/charts/mastodon/tests/__snapshot__/98_snapshot_test.yaml.snap
@@ -217,7 +217,7 @@ should match basic snapshot:
             - name: system
               persistentVolumeClaim:
                 claimName: RELEASE-NAME-mastodon-system
-            - emptydir:
+            - emptyDir:
                 medium: Memory
               name: tmp
   4: |
@@ -1191,7 +1191,7 @@ should match basic snapshot without dependencies:
             - name: system
               persistentVolumeClaim:
                 claimName: RELEASE-NAME-mastodon-system
-            - emptydir:
+            - emptyDir:
                 medium: Memory
               name: tmp
   4: |
diff --git a/charts/mastodon/values.yaml b/charts/mastodon/values.yaml
index d21c54233..24904d7c9 100644
--- a/charts/mastodon/values.yaml
+++ b/charts/mastodon/values.yaml
@@ -87,7 +87,7 @@ mastodon:
     # -- temporary volume template required for read-only root filesystem
     temporaryVolumeTemplate:
       # emptydir is currently limited to medium Memory due to a Ruby special handling of temporary directories, alternatively use a generic ephemeral volume: https://shivering-isles.com/about-read-only-containers-ruby-and-emptydir
-      emptydir:
+      emptyDir:
         medium: Memory
       # ephemeral:
       #   volumeClaimTemplate:
-- 
GitLab