diff --git a/apps/sharkey/app.yaml b/apps/sharkey/app.yaml index 73c196f..a544876 100644 --- a/apps/sharkey/app.yaml +++ b/apps/sharkey/app.yaml @@ -1,8 +1,8 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization -namespace: discordbot-2b +namespace: sharkey metadata: - name: discordbot-2b + name: sharkey resources: - app/namespace.yaml - app/sealedsecret.yaml diff --git a/apps/sharkey/app/config.yaml b/apps/sharkey/app/config.yaml index 187945f..2727af5 100644 --- a/apps/sharkey/app/config.yaml +++ b/apps/sharkey/app/config.yaml @@ -4,7 +4,7 @@ metadata: name: sharkey-config namespace: sharkey data: - default.yaml: | + default.yml: | #━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ # Misskey configuration #━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ diff --git a/apps/sharkey/app/deploy.yaml b/apps/sharkey/app/deploy.yaml index 5622163..11f2f2f 100644 --- a/apps/sharkey/app/deploy.yaml +++ b/apps/sharkey/app/deploy.yaml @@ -13,6 +13,20 @@ spec: labels: app: sharkey spec: + initContainers: + - name: init-config + image: busybox + volumeMounts: + - name: sharkey-config + mountPath: "/sharkey/.config" + readOnly: false + - name: config-secret + mountPath: "/config-secret" + readOnly: true + - name: config + mountPath: "/config" + readOnly: true + command: ['sh', '-c', 'mkdir -p /sharkey/.config; cp /config-secret/*.yml /sharkey/.config/; cp /configt/*.yml /sharkey/.config/;'] containers: - name: redis image: redis @@ -23,14 +37,11 @@ spec: - image: ghcr.io/transfem-org/sharkey:stable name: sharkey volumeMounts: - - name: config-secret - mountPath: "/sharkey/.config" - readOnly: true - - name: config - mountPath: "/sharkey/.config" - readOnly: true - name: sharkey-files mountPath: "/sharkey/files" + - name: sharkey-config + mountPath: "/sharkey/.config" + readOnly: true env: - name: example valueFrom: @@ -50,4 +61,7 @@ spec: path: "default.yml" - name: sharkey-files persistentVolumeClaim: - claimName: sharkey-files + claimName: sharkey-files-pvc + - name: sharkey-config + persistentVolumeClaim: + claimName: sharkey-config-pvc diff --git a/apps/sharkey/app/volume.yaml b/apps/sharkey/app/volume.yaml index a8ec0d9..1a1d473 100644 --- a/apps/sharkey/app/volume.yaml +++ b/apps/sharkey/app/volume.yaml @@ -1,23 +1,25 @@ apiVersion: v1 -kind: PersistentVolume +kind: PersistentVolumeClaim metadata: - name: sharkey-files + name: sharkey-files-pvc namespace: sharkey spec: - capacity: - storage: 10Gi - storageClassName: "ebs-hdd" accessModes: - ReadWriteOnce - claimRef: - name: sharkey-files-pvc - namespace: sharkey + storageClassName: "ebs-hdd" + resources: + requests: + storage: 10Gi --- apiVersion: v1 kind: PersistentVolumeClaim metadata: - name: sharkey-files-pvc + name: sharkey-config-pvc namespace: sharkey spec: - storageClassName: "ebs-hdd" - volumeName: sharkey-files + accessModes: + - ReadWriteOnce + storageClassName: "ebs-ssd" + resources: + requests: + storage: 100Mi