This commit is contained in:
Sense T 2023-09-06 04:41:17 +00:00
parent 54b5e8d6f9
commit 81e8c9a74e
5 changed files with 92 additions and 0 deletions

View File

@ -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

18
siyuan-note/ingress.yaml Normal file
View File

@ -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

View File

@ -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

12
siyuan-note/pvc.yaml Normal file
View File

@ -0,0 +1,12 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: siyuan-note
spec:
storageClassName: nfs-client
resources:
requests:
storage: 10Gi
volumeMode: Filesystem
accessModes:
- ReadWriteOnce

16
siyuan-note/service.yaml Normal file
View File

@ -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