|
1 | | -apiVersion: apps/v1 |
2 | | -kind: StatefulSet |
3 | | -metadata: |
4 | | - name: private-mail |
5 | | - namespace: private-mail |
6 | | -spec: |
7 | | - template: |
8 | | - spec: |
9 | | - initContainers: |
10 | | - - name: configure |
11 | | - volumeMounts: |
12 | | - - name: serving-storage |
13 | | - mountPath: /etc/stalwart/config.json |
14 | | - subPath: config.json |
15 | | - readOnly: true |
16 | | - - name: v2-data |
17 | | - mountPath: /var/lib/stalwart-v2 |
18 | | - containers: |
19 | | - - name: private-mail |
20 | | - volumeMounts: |
21 | | - - name: serving-storage |
22 | | - mountPath: /etc/stalwart/config.json |
23 | | - subPath: config.json |
24 | | - readOnly: true |
25 | | - - name: v2-data |
26 | | - mountPath: /var/lib/stalwart-v2 |
27 | | - volumes: |
28 | | - - name: legacy-data |
29 | | - $patch: delete |
30 | | - - name: serving-storage |
31 | | - emptyDir: |
32 | | - medium: Memory |
33 | | - sizeLimit: 1Mi |
34 | | - - name: v2-data |
35 | | - persistentVolumeClaim: |
36 | | - claimName: email-data-encrypted-v2 |
| 1 | +# Keep the selected config mount, and both encrypted stores, on setup and serving. |
| 2 | +- op: test |
| 3 | + path: /spec/template/spec/initContainers/0/name |
| 4 | + value: configure |
| 5 | +- op: test |
| 6 | + path: /spec/template/spec/containers/1/name |
| 7 | + value: private-mail |
| 8 | +- op: move |
| 9 | + from: /spec/template/spec/containers/1 |
| 10 | + path: /spec/template/spec/containers/0 |
| 11 | +- op: test |
| 12 | + path: /spec/template/spec/initContainers/0/volumeMounts/0/name |
| 13 | + value: datastore |
| 14 | +- op: test |
| 15 | + path: /spec/template/spec/containers/0/volumeMounts/0/name |
| 16 | + value: datastore |
| 17 | +- op: replace |
| 18 | + path: /spec/template/spec/initContainers/0/volumeMounts/0/name |
| 19 | + value: serving-storage |
| 20 | +- op: replace |
| 21 | + path: /spec/template/spec/containers/0/volumeMounts/0/name |
| 22 | + value: serving-storage |
| 23 | +- op: add |
| 24 | + path: /spec/template/spec/initContainers/0/volumeMounts/1 |
| 25 | + value: |
| 26 | + name: v2-data |
| 27 | + mountPath: /var/lib/stalwart-v2 |
| 28 | +- op: add |
| 29 | + path: /spec/template/spec/containers/0/volumeMounts/1 |
| 30 | + value: |
| 31 | + name: v2-data |
| 32 | + mountPath: /var/lib/stalwart-v2 |
| 33 | +- op: test |
| 34 | + path: /spec/template/spec/volumes/1/name |
| 35 | + value: legacy-data |
| 36 | +- op: remove |
| 37 | + path: /spec/template/spec/volumes/1 |
| 38 | +- op: add |
| 39 | + path: /spec/template/spec/volumes/0 |
| 40 | + value: |
| 41 | + name: serving-storage |
| 42 | + emptyDir: |
| 43 | + medium: Memory |
| 44 | + sizeLimit: 1Mi |
| 45 | +- op: add |
| 46 | + path: /spec/template/spec/volumes/1 |
| 47 | + value: |
| 48 | + name: v2-data |
| 49 | + persistentVolumeClaim: |
| 50 | + claimName: email-data-encrypted-v2 |
0 commit comments