From 0ae54f7e7b5ce491d3fcf8feb263f87c9f2fdf27 Mon Sep 17 00:00:00 2001
From: Sheogorath <sheogorath@shivering-isles.com>
Date: Mon, 27 Nov 2023 05:01:46 +0100
Subject: [PATCH] fix(mok): Use the config files defined in the chart

---
 charts/mok/Chart.yaml                         |  2 +-
 charts/mok/README.md                          |  2 +-
 charts/mok/templates/postfix-config.yaml      |  4 +--
 charts/mok/templates/postfix.yaml             | 24 +++++++--------
 .../tests/__snapshot__/postfix_test.yaml.snap | 30 +++++++++----------
 5 files changed, 31 insertions(+), 31 deletions(-)

diff --git a/charts/mok/Chart.yaml b/charts/mok/Chart.yaml
index c2515f759..19ae59000 100644
--- a/charts/mok/Chart.yaml
+++ b/charts/mok/Chart.yaml
@@ -3,7 +3,7 @@ name: mok
 description: |
   Mail on Kubernetes (MoK) is a project to deploy a functional mailserver that runs without a database server on Kubernetes, taking advantage of configmaps and secret.
 type: application
-version: 0.10.4
+version: 0.10.5
 sources:
   - https://de.postfix.org/ftpmirror/index.html
   - https://github.com/dovecot/core
diff --git a/charts/mok/README.md b/charts/mok/README.md
index 9e5a8097f..982865223 100644
--- a/charts/mok/README.md
+++ b/charts/mok/README.md
@@ -1,6 +1,6 @@
 # mok
 
-![Version: 0.10.4](https://img.shields.io/badge/Version-0.10.4-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
+![Version: 0.10.5](https://img.shields.io/badge/Version-0.10.5-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
 
 Mail on Kubernetes (MoK) is a project to deploy a functional mailserver that runs without a database server on Kubernetes, taking advantage of configmaps and secret.
 
diff --git a/charts/mok/templates/postfix-config.yaml b/charts/mok/templates/postfix-config.yaml
index 564f73ac2..6684d1ef8 100644
--- a/charts/mok/templates/postfix-config.yaml
+++ b/charts/mok/templates/postfix-config.yaml
@@ -6,7 +6,7 @@ metadata:
     {{- include "mok.labels" . | nindent 4 }}
     app.kubernetes.io/component: postfix
 data:
-  master.conf: |
+  master.cf: |
     # ==========================================================================
     # service type  private unpriv  chroot  wakeup  maxproc command + args
     #               (yes)   (yes)   (yes)   (never) (100)
@@ -190,7 +190,7 @@ data:
     headers-cleanup unix n - - - 0 cleanup
     -o syslog_name=postfix/headers-cleanup
     -o header_checks=regexp:/etc/postfix/header_checks
-  main.conf: |
+  main.cf: |
     ############### Please enable soft_bounce during maintenance: #################
 
     # Fatal 5xx Errors will be downgraded to temporary 4xx Errors.
diff --git a/charts/mok/templates/postfix.yaml b/charts/mok/templates/postfix.yaml
index 5426c8161..fd2c14f90 100644
--- a/charts/mok/templates/postfix.yaml
+++ b/charts/mok/templates/postfix.yaml
@@ -89,12 +89,12 @@ spec:
             {{- toYaml .Values.postfix.securityContext | nindent 12 }}
           volumeMounts:
             - name: config
-              mountPath: /etc/postfix/master.conf
-              subPath: master.conf
+              mountPath: /etc/postfix/master.cf
+              subPath: master.cf
               readOnly: true
             - name: config
-              mountPath: /etc/postfix/main.conf
-              subPath: main.conf
+              mountPath: /etc/postfix/main.cf
+              subPath: main.cf
               readOnly: true
             - name: spool
               mountPath: /var/spool/postfix/
@@ -124,12 +124,12 @@ spec:
             {{- toYaml .Values.postfix.securityContext | nindent 12 }}
           volumeMounts:
             - name: config
-              mountPath: /etc/postfix/master.conf
-              subPath: master.conf
+              mountPath: /etc/postfix/master.cf
+              subPath: master.cf
               readOnly: true
             - name: config
-              mountPath: /etc/postfix/main.conf
-              subPath: main.conf
+              mountPath: /etc/postfix/main.cf
+              subPath: main.cf
               readOnly: true
             - name: spool
               mountPath: /var/spool/postfix/
@@ -213,12 +213,12 @@ spec:
             {{- toYaml .Values.postfix.securityContext | nindent 12 }}
           volumeMounts:
             - name: config
-              mountPath: /etc/postfix/master.conf
-              subPath: master.conf
+              mountPath: /etc/postfix/master.cf
+              subPath: master.cf
               readOnly: true
             - name: config
-              mountPath: /etc/postfix/main.conf
-              subPath: main.conf
+              mountPath: /etc/postfix/main.cf
+              subPath: main.cf
               readOnly: true
             - name: spool
               mountPath: /var/spool/postfix/
diff --git a/charts/mok/tests/__snapshot__/postfix_test.yaml.snap b/charts/mok/tests/__snapshot__/postfix_test.yaml.snap
index 51a2f7584..4e88dea1d 100644
--- a/charts/mok/tests/__snapshot__/postfix_test.yaml.snap
+++ b/charts/mok/tests/__snapshot__/postfix_test.yaml.snap
@@ -2,7 +2,7 @@ should match snapshot:
   1: |
     apiVersion: v1
     data:
-      main.conf: |
+      main.cf: |
         ############### Please enable soft_bounce during maintenance: #################
 
         # Fatal 5xx Errors will be downgraded to temporary 4xx Errors.
@@ -175,7 +175,7 @@ should match snapshot:
         bounce_queue_lifetime = 1d
         unverified_recipient_reject_code = 577
         compatibility_level = 2
-      master.conf: |
+      master.cf: |
         # ==========================================================================
         # service type  private unpriv  chroot  wakeup  maxproc command + args
         #               (yes)   (yes)   (yes)   (never) (100)
@@ -418,7 +418,7 @@ should match snapshot:
       template:
         metadata:
           annotations:
-            checksum/config: 4370771faafcf471bc3cd42d9b0d20cc5f973ed85506113938bd22efa0f49ce0
+            checksum/config: a6bd4491f5df073542c8ba9bec124f4d64d2ac35c281d0cc28a79f3b38a97bd9
             checksum/secret: 66ea930a9b7e50528ddc0aa54786d07f78c7f56d1daea45b21d9eb94f8e5c4f2
           labels:
             app.kubernetes.io/component: postfix
@@ -499,14 +499,14 @@ should match snapshot:
                 initialDelaySeconds: 2
                 periodSeconds: 5
               volumeMounts:
-                - mountPath: /etc/postfix/master.conf
+                - mountPath: /etc/postfix/master.cf
                   name: config
                   readOnly: true
-                  subPath: master.conf
-                - mountPath: /etc/postfix/main.conf
+                  subPath: master.cf
+                - mountPath: /etc/postfix/main.cf
                   name: config
                   readOnly: true
-                  subPath: main.conf
+                  subPath: main.cf
                 - mountPath: /var/spool/postfix/
                   name: spool
                 - mountPath: /srv/tmp
@@ -548,14 +548,14 @@ should match snapshot:
                     - ALL
                 runAsNonRoot: false
               volumeMounts:
-                - mountPath: /etc/postfix/master.conf
+                - mountPath: /etc/postfix/master.cf
                   name: config
                   readOnly: true
-                  subPath: master.conf
-                - mountPath: /etc/postfix/main.conf
+                  subPath: master.cf
+                - mountPath: /etc/postfix/main.cf
                   name: config
                   readOnly: true
-                  subPath: main.conf
+                  subPath: main.cf
                 - mountPath: /var/spool/postfix/
                   name: spool
                 - mountPath: /srv/tmp
@@ -595,14 +595,14 @@ should match snapshot:
                     - ALL
                 runAsNonRoot: false
               volumeMounts:
-                - mountPath: /etc/postfix/master.conf
+                - mountPath: /etc/postfix/master.cf
                   name: config
                   readOnly: true
-                  subPath: master.conf
-                - mountPath: /etc/postfix/main.conf
+                  subPath: master.cf
+                - mountPath: /etc/postfix/main.cf
                   name: config
                   readOnly: true
-                  subPath: main.conf
+                  subPath: main.cf
                 - mountPath: /var/spool/postfix/
                   name: spool
                 - mountPath: /srv/tmp
-- 
GitLab