diff --git a/siyuan-note/deployment.yaml b/siyuan-note/deployment.yaml new file mode 100644 index 0000000..4969a78 --- /dev/null +++ b/siyuan-note/deployment.yaml @@ -0,0 +1,33 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: siyuan-note +spec: + selector: + matchLabels: + app: siyuan-note + template: + metadata: + labels: + app: siyuan-note + spec: + volumes: + - name: data + persistentVolumeClaim: + claimName: siyuan-note + containers: + - name: siyuan-note + image: siyuan-note + resources: + limits: + memory: "256Mi" + cpu: "200m" + ports: + - containerPort: 6806 + name: web + args: + - --workspace=/siyuan/workspace + - --lang=zh_CN + volumeMounts: + - mountPath: /siyuan/workspace + name: data diff --git a/siyuan-note/ingress.yaml b/siyuan-note/ingress.yaml new file mode 100644 index 0000000..b32ff54 --- /dev/null +++ b/siyuan-note/ingress.yaml @@ -0,0 +1,18 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: siyuan-note + labels: + name: siyuan-note +spec: + rules: + - host: note.sense-t.eu.org + http: + paths: + - pathType: Prefix + path: "/" + backend: + service: + name: siyuan-note + port: + number: 6806 diff --git a/siyuan-note/kustomization.yaml b/siyuan-note/kustomization.yaml new file mode 100644 index 0000000..8d0a234 --- /dev/null +++ b/siyuan-note/kustomization.yaml @@ -0,0 +1,13 @@ +# yaml-language-server: $schema=https://json.schemastore.org/kustomization.json + +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - deployment.yaml + - service.yaml + - ingress.yaml + - pvc.yaml +images: + - name: siyuan-note + newName: b3log/siyuan + newTag: v2.10.2 \ No newline at end of file diff --git a/siyuan-note/pvc.yaml b/siyuan-note/pvc.yaml new file mode 100644 index 0000000..4be63b8 --- /dev/null +++ b/siyuan-note/pvc.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: siyuan-note +spec: + storageClassName: nfs-client + resources: + requests: + storage: 10Gi + volumeMode: Filesystem + accessModes: + - ReadWriteOnce diff --git a/siyuan-note/service.yaml b/siyuan-note/service.yaml new file mode 100644 index 0000000..3c47098 --- /dev/null +++ b/siyuan-note/service.yaml @@ -0,0 +1,16 @@ +apiVersion: v1 +kind: Service +metadata: + name: siyuan-note +spec: + selector: + app: siyuan-note + ports: + - port: 6806 + targetPort: web + name: web + ipFamilyPolicy: PreferDualStack + ipFamilies: + - IPv4 + - IPv6 +