diff --git a/cryptpad/crypt-deploy.yaml b/cryptpad/crypt-deploy.yaml new file mode 100644 index 0000000..cb643c6 --- /dev/null +++ b/cryptpad/crypt-deploy.yaml @@ -0,0 +1,50 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + run: cryptpad + name: cryptpad +spec: + replicas: 1 + selector: + matchLabels: + run: cryptpad + template: + metadata: + labels: + run: cryptpad + spec: + containers: + - image: promasu/cryptpad:latest + name: cryptpad + ports: + - containerPort: 3000 + resources: {} + volumeMounts: + - mountPath: /cryptpad/blob + name: cryptpad-blob + - mountPath: /cryptpad/block + name: cryptpad-block + - mountPath: /cryptpad/data + name: cryptpad-data + - mountPath: /cryptpad/datastore + name: cryptpad-datastore + - mountPath: /cryptpad/config + name: cryptpad-config + restartPolicy: Always + volumes: + - name: cryptpad-blob + persistentVolumeClaim: + claimName: cryptpad-blob + - name: cryptpad-block + persistentVolumeClaim: + claimName: cryptpad-block + - name: cryptpad-data + persistentVolumeClaim: + claimName: cryptpad-data + - name: cryptpad-datastore + persistentVolumeClaim: + claimName: cryptpad-datastore + - name: cryptpad-config + persistentVolumeClaim: + claimName: cryptpad-config diff --git a/cryptpad/crypt-ingress.yml b/cryptpad/crypt-ingress.yml new file mode 100644 index 0000000..04be7bd --- /dev/null +++ b/cryptpad/crypt-ingress.yml @@ -0,0 +1,26 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: cryptpad-ingr + annotations: + kubernetes.io/tls-acme: "true" + cert-manager.io/cluster-issuer: letsencrypt-prod + nginx.ingress.kubernetes.io/proxy-body-size: 50m +spec: + tls: + - secretName: crypt-tls + hosts: + - pad.squi.fr + ingressClassName: nginx + rules: + - host: pad.squi.fr + http: + paths: + - pathType: Prefix + backend: + service: + name: cryptpad + port: + number: 3000 + path: / + diff --git a/cryptpad/crypt-pvc.yml b/cryptpad/crypt-pvc.yml new file mode 100644 index 0000000..47866c2 --- /dev/null +++ b/cryptpad/crypt-pvc.yml @@ -0,0 +1,68 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: cryptpad-blob +spec: + accessModes: + - ReadWriteMany + storageClassName: "" + resources: + requests: + storage: 100Gi + volumeName: cryptpad-blob + +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: cryptpad-block +spec: + accessModes: + - ReadWriteMany + storageClassName: "" + resources: + requests: + storage: 60Gi + volumeName: cryptpad-block + +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: cryptpad-data +spec: + accessModes: + - ReadWriteMany + storageClassName: "" + resources: + requests: + storage: 100Gi + volumeName: cryptpad-data + +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: cryptpad-datastore +spec: + accessModes: + - ReadWriteMany + storageClassName: "" + resources: + requests: + storage: 10Gi + volumeName: cryptpad-datastore + +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: cryptpad-config +spec: + accessModes: + - ReadWriteMany + storageClassName: "" + resources: + requests: + storage: 3Gi + volumeName: cryptpad-config diff --git a/cryptpad/crypt-service.yaml b/cryptpad/crypt-service.yaml new file mode 100644 index 0000000..de3716a --- /dev/null +++ b/cryptpad/crypt-service.yaml @@ -0,0 +1,13 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + run: cryptpad + name: cryptpad +spec: + ports: + - name: "http" + port: 3000 + targetPort: 3000 + selector: + run: cryptpad diff --git a/cryptpad/crypt-volumeclaims.yaml b/cryptpad/crypt-volumeclaims.yaml new file mode 100644 index 0000000..eab12b2 --- /dev/null +++ b/cryptpad/crypt-volumeclaims.yaml @@ -0,0 +1,81 @@ +apiVersion: v1 +kind: PersistentVolume +metadata: + name: cryptpad-blob +spec: + capacity: + storage: 100Gi + accessModes: + - ReadWriteMany + nfs: + server: nas.sq.lan + path: "/swarmdata/cryptpad/blob" + mountOptions: + - nfsvers=4.2 + +--- +apiVersion: v1 +kind: PersistentVolume +metadata: + name: cryptpad-block +spec: + capacity: + storage: 60Gi + accessModes: + - ReadWriteMany + nfs: + server: nas.sq.lan + path: "/swarmdata/cryptpad/block" + mountOptions: + - nfsvers=4.2 + +--- +apiVersion: v1 +kind: PersistentVolume +metadata: + name: cryptpad-data +spec: + capacity: + storage: 100Gi + accessModes: + - ReadWriteMany + nfs: + server: nas.sq.lan + path: "/swarmdata/cryptpad/data" + mountOptions: + - nfsvers=4.2 + +--- +apiVersion: v1 +kind: PersistentVolume +metadata: + name: cryptpad-datastore +spec: + capacity: + storage: 10Gi + accessModes: + - ReadWriteMany + nfs: + server: nas.sq.lan + path: "/swarmdata/cryptpad/datastore" + mountOptions: + - nfsvers=4.2 + +--- +apiVersion: v1 +kind: PersistentVolume +metadata: + name: cryptpad-config +spec: + capacity: + storage: 3Gi + accessModes: + - ReadWriteMany + nfs: + server: nas.sq.lan + path: "/swarmdata/cryptpad/config" + mountOptions: + - nfsvers=4.2 + + +