From ea89d2ea8814d6370c3c300daf9d5db6739bdddf Mon Sep 17 00:00:00 2001 From: ytshih Date: Thu, 5 Dec 2024 11:42:56 +0000 Subject: [PATCH] Fix(hedgedoc): use statefulset and iscsi --- hedgedoc/config.json | 13 +++---------- hedgedoc/kustomization.yaml | 2 +- hedgedoc/{deploy.yaml => statefulset.yaml} | 15 ++++++++++++++- 3 files changed, 18 insertions(+), 12 deletions(-) rename hedgedoc/{deploy.yaml => statefulset.yaml} (79%) diff --git a/hedgedoc/config.json b/hedgedoc/config.json index e3b46b7..5703e5c 100644 --- a/hedgedoc/config.json +++ b/hedgedoc/config.json @@ -10,7 +10,8 @@ "allowEmailRegister": false, "defaultPermission": "limited", "allowAnonymous": false, - "imageUploadType": "minio", + "uploadsPath": "/uploads", + "imageUploadType": "filesystem", "hsts": { "enable": true, "maxAgeSeconds": 31536000, @@ -38,14 +39,6 @@ "searchFilter": "(&(uid={{username}})(objectClass=person))", "useridField": "uid", "tlsca": "/etc/hedgedoc/rootca.pem" - }, - "minio": { - "accessKey": "********", - "secretKey": "********", - "endPoint": "minio.konchin.com", - "port": 9000, - "secure": false - }, - "s3bucket": "hedgedoc" + } } } diff --git a/hedgedoc/kustomization.yaml b/hedgedoc/kustomization.yaml index 4344a53..c90e6b8 100644 --- a/hedgedoc/kustomization.yaml +++ b/hedgedoc/kustomization.yaml @@ -11,7 +11,7 @@ generatorOptions: resources: - namespace.yaml - - deploy.yaml + - statefulset.yaml - service.yaml - ingress.yaml diff --git a/hedgedoc/deploy.yaml b/hedgedoc/statefulset.yaml similarity index 79% rename from hedgedoc/deploy.yaml rename to hedgedoc/statefulset.yaml index 33628f2..907e9fb 100644 --- a/hedgedoc/deploy.yaml +++ b/hedgedoc/statefulset.yaml @@ -1,6 +1,6 @@ --- apiVersion: apps/v1 -kind: Deployment +kind: StatefulSet metadata: name: hedgedoc spec: @@ -8,6 +8,17 @@ spec: selector: matchLabels: app: hedgedoc + serviceName: hedgedoc + volumeClaimTemplates: + - metadata: + name: uploads + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 32G + storageClassName: iscsi template: metadata: labels: @@ -26,6 +37,8 @@ spec: volumeMounts: - name: config mountPath: /etc/hedgedoc/ + - name: uploads + mountPath: /uploads/ env: - name: CMD_CONFIG_FILE value: /etc/hedgedoc/config.json