From 3388fce0bd2691617924ccc4ce0fe163aaaee30c Mon Sep 17 00:00:00 2001 From: Junwei Zhao Date: Sun, 6 Jun 2021 14:20:55 +1000 Subject: [PATCH] get rid of longhorn --- media.yaml | 18 ++++++++---------- n8n.yaml | 6 +++--- nfs-n8n.yaml | 26 ++++++++++++++++++++++++++ nfs-redis.yaml | 26 ++++++++++++++++++++++++++ redis-values.yaml | 12 +++++++++++- 5 files changed, 74 insertions(+), 14 deletions(-) create mode 100644 nfs-n8n.yaml create mode 100644 nfs-redis.yaml diff --git a/media.yaml b/media.yaml index 5778656..41bbadb 100644 --- a/media.yaml +++ b/media.yaml @@ -15,7 +15,7 @@ spec: volumes: - name: config persistentVolumeClaim: - claimName: configs + claimName: configs-nfs - name: downloads persistentVolumeClaim: claimName: downloads-nfs @@ -190,7 +190,7 @@ spec: volumes: - name: config persistentVolumeClaim: - claimName: configs + claimName: configs-nfs - name: downloads persistentVolumeClaim: claimName: downloads-nfs @@ -404,7 +404,7 @@ spec: volumes: - name: nextcloud-config persistentVolumeClaim: - claimName: configs + claimName: configs-nfs - name: data persistentVolumeClaim: claimName: nextcloud-nfs @@ -423,10 +423,10 @@ spec: mountPath: /data containers: - name: nextcloud - image: wonderfall/nextcloud:21 + image: ghcr.io/wonderfall/nextcloud:21 securityContext: # nextcloud uses www-data which id is 33 - runAsUser: 0 + runAsUser: 1000 imagePullPolicy: Always ports: - containerPort: 8888 @@ -437,8 +437,6 @@ spec: value: "1000" - name: GID value: "1000" - - name: NEXTCLOUD_UPDATE - value: "1" - name: ADMIN_USER valueFrom: secretKeyRef: @@ -470,10 +468,10 @@ spec: volumeMounts: - name: nextcloud-config subPath: nextcloud/config - mountPath: /config + mountPath: /nextcloud/config - name: nextcloud-config subPath: nextcloud/apps - mountPath: /apps2 + mountPath: /nextcloud/apps2 - name: nextcloud-config subPath: nextcloud/apps mountPath: /var/www/html/apps @@ -550,7 +548,7 @@ spec: volumes: - name: config persistentVolumeClaim: - claimName: configs + claimName: configs-nfs - name: downloads persistentVolumeClaim: claimName: downloads-nfs diff --git a/n8n.yaml b/n8n.yaml index 308b35b..93e6d6a 100644 --- a/n8n.yaml +++ b/n8n.yaml @@ -36,12 +36,12 @@ spec: cpu: 100m memory: 200Mi limits: - cpu: 200m - memory: 500Mi + cpu: 300m + memory: 526Mi volumes: - name: data persistentVolumeClaim: - claimName: n8n + claimName: nfs-n8n --- diff --git a/nfs-n8n.yaml b/nfs-n8n.yaml new file mode 100644 index 0000000..012d05e --- /dev/null +++ b/nfs-n8n.yaml @@ -0,0 +1,26 @@ +apiVersion: v1 +kind: PersistentVolume +metadata: + name: nfs-n8n +spec: + capacity: + storage: 5Gi + accessModes: + - ReadWriteMany + nfs: + server: 192.168.1.4 + path: "/n8n" +--- + +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + namespace: "home-apps" + name: "nfs-n8n" +spec: + storageClassName: "" + accessModes: + - ReadWriteMany + resources: + requests: + storage: 5Gi diff --git a/nfs-redis.yaml b/nfs-redis.yaml new file mode 100644 index 0000000..1c3f25e --- /dev/null +++ b/nfs-redis.yaml @@ -0,0 +1,26 @@ +apiVersion: v1 +kind: PersistentVolume +metadata: + name: nfs-redis +spec: + capacity: + storage: 50Gi + accessModes: + - ReadWriteMany + nfs: + server: 192.168.1.4 + path: "/redis" +--- + +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + namespace: "db" + name: "nfs-redis" +spec: + storageClassName: "" + accessModes: + - ReadWriteMany + resources: + requests: + storage: 50Gi diff --git a/redis-values.yaml b/redis-values.yaml index 10bc7d1..b00f3cb 100644 --- a/redis-values.yaml +++ b/redis-values.yaml @@ -2,7 +2,7 @@ usePassword: false persistence: - existingClaim: redis + existingClaim: nfs-redis volumePermissions: enabled: true # securityContext: @@ -14,3 +14,13 @@ metrics: enabled: true additionalLabels: release: prometheus + +master: + persistence: + enabled: true + storageClass: nfs + existingClaim: nfs-redis + +replica: + persistence: + enabled: false