更新部分镜像版本;新增chatgpt-next-web、geminiprochat、xbrowsersync、trilium相关文件

This commit is contained in:
huty 2024-08-06 16:53:00 +00:00 committed by cloud-init created default user
parent cbc7744416
commit 4911225f59
15 changed files with 821 additions and 133 deletions

View File

@ -0,0 +1,96 @@
---
# 创建 Namespace
apiVersion: v1
kind: Namespace
metadata:
name: hty1024-app
---
# 创建 Service
apiVersion: v1
kind: Service
metadata:
name: hty1024-app-chatgpt-next-web-service
namespace: hty1024-app
labels:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: app
app.k8s.hty1024.com/name: chatgpt-next-web
app.k8s.hty1024.com/version: v2.14.0
app.k8s.hty1024.com/resources: service
spec:
type: NodePort
ports:
- port: 3000
targetPort: 3000
nodePort: 30000
selector:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: app
app.k8s.hty1024.com/name: chatgpt-next-web
app.k8s.hty1024.com/version: v2.14.0
app.k8s.hty1024.com/resources: pod
---
# 创建 Deployment
apiVersion: apps/v1
kind: Deployment
metadata:
name: hty1024-app-chatgpt-next-web-deployment
namespace: hty1024-app
labels:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: app
app.k8s.hty1024.com/name: chatgpt-next-web
app.k8s.hty1024.com/version: v2.14.0
app.k8s.hty1024.com/resources: deployment
spec:
replicas: 1
minReadySeconds: 30
selector:
matchLabels:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: app
app.k8s.hty1024.com/name: chatgpt-next-web
app.k8s.hty1024.com/version: v2.14.0
app.k8s.hty1024.com/resources: pod
template:
metadata:
labels:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: app
app.k8s.hty1024.com/name: chatgpt-next-web
app.k8s.hty1024.com/version: v2.14.0
app.k8s.hty1024.com/resources: pod
spec:
terminationGracePeriodSeconds: 60
volumes:
- name: localtime
hostPath:
path: /etc/localtime
- name: shanghai
hostPath:
path: /usr/share/zoneinfo/Asia/Shanghai
containers:
- name: chatgpt-next-web
image: yidadaa/chatgpt-next-web:v2.14.0
ports:
- name: tcp
containerPort: 3000
volumeMounts:
- name: shanghai
mountPath: /etc/localtime
readOnly: true
env:
- name: OPENAI_API_KEY
value: "123456"
- name: GOOGLE_API_KEY
value: "123456"
- name: CODE
value: "123456"
nodeSelector:
node.k8s.hty1024.com/type: app

View File

@ -17,7 +17,7 @@ metadata:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: app
app.k8s.hty1024.com/name: drawio
app.k8s.hty1024.com/version: 24.3.1
app.k8s.hty1024.com/version: 24.7.5
app.k8s.hty1024.com/resources: storageClass
provisioner: kubernetes.io/no-provisioner
reclaimPolicy: Retain
@ -34,7 +34,7 @@ metadata:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: app
app.k8s.hty1024.com/name: drawio
app.k8s.hty1024.com/version: 24.3.1
app.k8s.hty1024.com/version: 24.7.5
app.k8s.hty1024.com/resources: persistentVolume
spec:
capacity:
@ -67,7 +67,7 @@ metadata:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: app
app.k8s.hty1024.com/name: drawio
app.k8s.hty1024.com/version: 24.3.1
app.k8s.hty1024.com/version: 24.7.5
app.k8s.hty1024.com/resources: persistentVolumeClaim
spec:
resources:
@ -90,7 +90,7 @@ metadata:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: app
app.k8s.hty1024.com/name: drawio
app.k8s.hty1024.com/version: 24.3.1
app.k8s.hty1024.com/version: 24.7.5
app.k8s.hty1024.com/resources: service
spec:
type: NodePort
@ -102,7 +102,7 @@ spec:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: app
app.k8s.hty1024.com/name: drawio
app.k8s.hty1024.com/version: 24.3.1
app.k8s.hty1024.com/version: 24.7.5
app.k8s.hty1024.com/resources: pod
---
@ -117,7 +117,7 @@ metadata:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: app
app.k8s.hty1024.com/name: drawio
app.k8s.hty1024.com/version: 24.3.1
app.k8s.hty1024.com/version: 24.7.5
app.k8s.hty1024.com/resources: deployment
spec:
replicas: 1
@ -127,7 +127,7 @@ spec:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: app
app.k8s.hty1024.com/name: drawio
app.k8s.hty1024.com/version: 24.3.1
app.k8s.hty1024.com/version: 24.7.5
app.k8s.hty1024.com/resources: pod
template:
metadata:
@ -135,7 +135,7 @@ spec:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: app
app.k8s.hty1024.com/name: drawio
app.k8s.hty1024.com/version: 24.3.1
app.k8s.hty1024.com/version: 24.7.5
app.k8s.hty1024.com/resources: pod
spec:
terminationGracePeriodSeconds: 60
@ -170,7 +170,7 @@ spec:
- name: DRAWIO_SERVER_URL
value: "http://localhost:8080"
- name: drawio
image: jgraph/drawio:24.3.1
image: jgraph/drawio:24.7.5
volumeMounts:
- name: localtime
mountPath: /etc/localtime

View File

@ -0,0 +1,94 @@
---
# 创建 Namespace
apiVersion: v1
kind: Namespace
metadata:
name: hty1024-app
---
# 创建 Service
apiVersion: v1
kind: Service
metadata:
name: hty1024-app-geminiprochat-service
namespace: hty1024-app
labels:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: app
app.k8s.hty1024.com/name: geminiprochat
app.k8s.hty1024.com/version: "20240709"
app.k8s.hty1024.com/resources: service
spec:
type: NodePort
ports:
- port: 3000
targetPort: 3000
nodePort: 30000
selector:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: app
app.k8s.hty1024.com/name: geminiprochat
app.k8s.hty1024.com/version: "20240709"
app.k8s.hty1024.com/resources: pod
---
# 创建 Deployment
apiVersion: apps/v1
kind: Deployment
metadata:
name: hty1024-app-geminiprochat-deployment
namespace: hty1024-app
labels:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: app
app.k8s.hty1024.com/name: geminiprochat
app.k8s.hty1024.com/version: "20240709"
app.k8s.hty1024.com/resources: deployment
spec:
replicas: 1
minReadySeconds: 30
selector:
matchLabels:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: app
app.k8s.hty1024.com/name: geminiprochat
app.k8s.hty1024.com/version: "20240709"
app.k8s.hty1024.com/resources: pod
template:
metadata:
labels:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: app
app.k8s.hty1024.com/name: geminiprochat
app.k8s.hty1024.com/version: "20240709"
app.k8s.hty1024.com/resources: pod
spec:
terminationGracePeriodSeconds: 60
volumes:
- name: localtime
hostPath:
path: /etc/localtime
- name: shanghai
hostPath:
path: /usr/share/zoneinfo/Asia/Shanghai
containers:
- name: geminiprochat
image: hub.hty1024.com/official/babaohuang/geminiprochat:20240709
ports:
- name: tcp
containerPort: 3000
volumeMounts:
- name: shanghai
mountPath: /etc/localtime
readOnly: true
env:
- name: GEMINI_API_KEY
value: "123456"
- name: SITE_PASSWORD
value: "123456"
nodeSelector:
node.k8s.hty1024.com/type: app

View File

@ -17,7 +17,7 @@ metadata:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: app
app.k8s.hty1024.com/name: gitea
app.k8s.hty1024.com/version: 1.21.11
app.k8s.hty1024.com/version: 1.22.1
app.k8s.hty1024.com/resources: storageClass
provisioner: kubernetes.io/no-provisioner
reclaimPolicy: Retain
@ -34,7 +34,7 @@ metadata:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: app
app.k8s.hty1024.com/name: gitea
app.k8s.hty1024.com/version: 1.21.11
app.k8s.hty1024.com/version: 1.22.1
app.k8s.hty1024.com/resources: persistentVolume
spec:
capacity:
@ -67,7 +67,7 @@ metadata:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: app
app.k8s.hty1024.com/name: gitea
app.k8s.hty1024.com/version: 1.21.11
app.k8s.hty1024.com/version: 1.22.1
app.k8s.hty1024.com/resources: persistentVolumeClaim
spec:
resources:
@ -90,7 +90,7 @@ metadata:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: app
app.k8s.hty1024.com/name: gitea
app.k8s.hty1024.com/version: 1.21.11
app.k8s.hty1024.com/version: 1.22.1
app.k8s.hty1024.com/resources: service
spec:
type: NodePort
@ -102,7 +102,7 @@ spec:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: app
app.k8s.hty1024.com/name: gitea
app.k8s.hty1024.com/version: 1.21.11
app.k8s.hty1024.com/version: 1.22.1
app.k8s.hty1024.com/resources: pod
---
@ -117,7 +117,7 @@ metadata:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: app
app.k8s.hty1024.com/name: gitea
app.k8s.hty1024.com/version: 1.21.11
app.k8s.hty1024.com/version: 1.22.1
app.k8s.hty1024.com/resources: statefulSet
spec:
replicas: 1
@ -127,7 +127,7 @@ spec:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: app
app.k8s.hty1024.com/name: gitea
app.k8s.hty1024.com/version: 1.21.11
app.k8s.hty1024.com/version: 1.22.1
app.k8s.hty1024.com/resources: pod
template:
metadata:
@ -135,7 +135,7 @@ spec:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: app
app.k8s.hty1024.com/name: gitea
app.k8s.hty1024.com/version: 1.21.11
app.k8s.hty1024.com/version: 1.22.1
app.k8s.hty1024.com/resources: pod
spec:
terminationGracePeriodSeconds: 60
@ -148,7 +148,7 @@ spec:
claimName: hty1024-app-gitea-pvc
containers:
- name: gitea
image: gitea/gitea:1.21.11
image: gitea/gitea:1.22.1
ports:
- name: tcp
containerPort: 3000

View File

@ -17,7 +17,7 @@ metadata:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: db
app.k8s.hty1024.com/name: mariadb
app.k8s.hty1024.com/version: 10.11.7
app.k8s.hty1024.com/version: 11.4.2
app.k8s.hty1024.com/resources: storageClass
provisioner: kubernetes.io/no-provisioner
reclaimPolicy: Retain
@ -35,7 +35,7 @@ metadata:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: db
app.k8s.hty1024.com/name: mariadb
app.k8s.hty1024.com/version: 10.11.7
app.k8s.hty1024.com/version: 11.4.2
app.k8s.hty1024.com/resources: persistentVolume
app.k8s.hty1024.com/role: master
spec:
@ -68,7 +68,7 @@ metadata:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: db
app.k8s.hty1024.com/name: mariadb
app.k8s.hty1024.com/version: 10.11.7
app.k8s.hty1024.com/version: 11.4.2
app.k8s.hty1024.com/resources: persistentVolume
app.k8s.hty1024.com/role: slave
spec:
@ -103,7 +103,7 @@ metadata:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: db
app.k8s.hty1024.com/name: mariadb
app.k8s.hty1024.com/version: 10.11.7
app.k8s.hty1024.com/version: 11.4.2
app.k8s.hty1024.com/resources: persistentVolumeClaim
app.k8s.hty1024.com/role: master
spec:
@ -127,7 +127,7 @@ metadata:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: db
app.k8s.hty1024.com/name: mariadb
app.k8s.hty1024.com/version: 10.11.7
app.k8s.hty1024.com/version: 11.4.2
app.k8s.hty1024.com/resources: persistentVolumeClaim
app.k8s.hty1024.com/role: slave
spec:
@ -153,7 +153,7 @@ metadata:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: db
app.k8s.hty1024.com/name: mariadb
app.k8s.hty1024.com/version: 10.11.7
app.k8s.hty1024.com/version: 11.4.2
app.k8s.hty1024.com/resources: configMap
app.k8s.hty1024.com/role: master
data:
@ -189,7 +189,7 @@ metadata:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: db
app.k8s.hty1024.com/name: mariadb
app.k8s.hty1024.com/version: 10.11.7
app.k8s.hty1024.com/version: 11.4.2
app.k8s.hty1024.com/resources: configMap
app.k8s.hty1024.com/role: master
data:
@ -212,7 +212,7 @@ metadata:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: db
app.k8s.hty1024.com/name: mariadb
app.k8s.hty1024.com/version: 10.11.7
app.k8s.hty1024.com/version: 11.4.2
app.k8s.hty1024.com/resources: configMap
app.k8s.hty1024.com/role: slave
data:
@ -242,7 +242,7 @@ metadata:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: db
app.k8s.hty1024.com/name: mariadb
app.k8s.hty1024.com/version: 10.11.7
app.k8s.hty1024.com/version: 11.4.2
app.k8s.hty1024.com/resources: configMap
app.k8s.hty1024.com/role: slave
data:
@ -263,7 +263,7 @@ metadata:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: db
app.k8s.hty1024.com/name: mariadb
app.k8s.hty1024.com/version: 10.11.7
app.k8s.hty1024.com/version: 11.4.2
app.k8s.hty1024.com/resources: secret
type: Opaque
stringData:
@ -286,7 +286,7 @@ metadata:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: db
app.k8s.hty1024.com/name: mariadb
app.k8s.hty1024.com/version: 10.11.7
app.k8s.hty1024.com/version: 11.4.2
app.k8s.hty1024.com/resources: service
app.k8s.hty1024.com/role: master
spec:
@ -298,7 +298,7 @@ spec:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: db
app.k8s.hty1024.com/name: mariadb
app.k8s.hty1024.com/version: 10.11.7
app.k8s.hty1024.com/version: 11.4.2
app.k8s.hty1024.com/resources: pod
app.k8s.hty1024.com/role: master
@ -314,7 +314,7 @@ metadata:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: db
app.k8s.hty1024.com/name: mariadb
app.k8s.hty1024.com/version: 10.11.7
app.k8s.hty1024.com/version: 11.4.2
app.k8s.hty1024.com/resources: service
app.k8s.hty1024.com/role: slave
spec:
@ -326,7 +326,7 @@ spec:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: db
app.k8s.hty1024.com/name: mariadb
app.k8s.hty1024.com/version: 10.11.7
app.k8s.hty1024.com/version: 11.4.2
app.k8s.hty1024.com/resources: pod
app.k8s.hty1024.com/role: slave
@ -343,7 +343,7 @@ metadata:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: db
app.k8s.hty1024.com/name: mariadb
app.k8s.hty1024.com/version: 10.11.7
app.k8s.hty1024.com/version: 11.4.2
app.k8s.hty1024.com/resources: statefulSet
app.k8s.hty1024.com/role: master
spec:
@ -354,7 +354,7 @@ spec:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: db
app.k8s.hty1024.com/name: mariadb
app.k8s.hty1024.com/version: 10.11.7
app.k8s.hty1024.com/version: 11.4.2
app.k8s.hty1024.com/resources: pod
app.k8s.hty1024.com/role: master
template:
@ -363,7 +363,7 @@ spec:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: db
app.k8s.hty1024.com/name: mariadb
app.k8s.hty1024.com/version: 10.11.7
app.k8s.hty1024.com/version: 11.4.2
app.k8s.hty1024.com/resources: pod
app.k8s.hty1024.com/role: master
spec:
@ -392,7 +392,7 @@ spec:
secretName: hty1024-db-mariadb-secret
containers:
- name: mariadb
image: mariadb:10.11.7
image: mariadb:11.4.2
ports:
- name: tcp
containerPort: 3306
@ -433,7 +433,7 @@ metadata:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: db
app.k8s.hty1024.com/name: mariadb
app.k8s.hty1024.com/version: 10.11.7
app.k8s.hty1024.com/version: 11.4.2
app.k8s.hty1024.com/resources: statefulSet
app.k8s.hty1024.com/role: slave
spec:
@ -444,7 +444,7 @@ spec:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: db
app.k8s.hty1024.com/name: mariadb
app.k8s.hty1024.com/version: 10.11.7
app.k8s.hty1024.com/version: 11.4.2
app.k8s.hty1024.com/resources: pod
app.k8s.hty1024.com/role: slave
template:
@ -453,7 +453,7 @@ spec:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: db
app.k8s.hty1024.com/name: mariadb
app.k8s.hty1024.com/version: 10.11.7
app.k8s.hty1024.com/version: 11.4.2
app.k8s.hty1024.com/resources: pod
app.k8s.hty1024.com/role: slave
spec:
@ -482,7 +482,7 @@ spec:
secretName: hty1024-db-mariadb-secret
containers:
- name: mariadb
image: mariadb:10.11.7
image: mariadb:11.4.2
ports:
- name: tcp
containerPort: 3306

View File

@ -17,7 +17,7 @@ metadata:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: db
app.k8s.hty1024.com/name: mariadb
app.k8s.hty1024.com/version: 10.11.7
app.k8s.hty1024.com/version: 11.4.2
app.k8s.hty1024.com/resources: storageClass
provisioner: kubernetes.io/no-provisioner
reclaimPolicy: Retain
@ -34,7 +34,7 @@ metadata:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: db
app.k8s.hty1024.com/name: mariadb
app.k8s.hty1024.com/version: 10.11.7
app.k8s.hty1024.com/version: 11.4.2
app.k8s.hty1024.com/resources: persistentVolume
spec:
capacity:
@ -67,7 +67,7 @@ metadata:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: db
app.k8s.hty1024.com/name: mariadb
app.k8s.hty1024.com/version: 10.11.7
app.k8s.hty1024.com/version: 11.4.2
app.k8s.hty1024.com/resources: persistentVolumeClaim
spec:
resources:
@ -90,7 +90,7 @@ metadata:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: db
app.k8s.hty1024.com/name: mariadb
app.k8s.hty1024.com/version: 10.11.7
app.k8s.hty1024.com/version: 11.4.2
app.k8s.hty1024.com/resources: configMap
data:
my.cnf: |
@ -111,7 +111,7 @@ metadata:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: db
app.k8s.hty1024.com/name: mariadb
app.k8s.hty1024.com/version: 10.11.7
app.k8s.hty1024.com/version: 11.4.2
app.k8s.hty1024.com/resources: secret
type: Opaque
stringData:
@ -131,7 +131,7 @@ metadata:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: db
app.k8s.hty1024.com/name: mariadb
app.k8s.hty1024.com/version: 10.11.7
app.k8s.hty1024.com/version: 11.4.2
app.k8s.hty1024.com/resources: service
spec:
type: ClusterIP
@ -142,7 +142,7 @@ spec:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: db
app.k8s.hty1024.com/name: mariadb
app.k8s.hty1024.com/version: 10.11.7
app.k8s.hty1024.com/version: 11.4.2
app.k8s.hty1024.com/resources: pod
---
@ -157,7 +157,7 @@ metadata:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: db
app.k8s.hty1024.com/name: mariadb
app.k8s.hty1024.com/version: 10.11.7
app.k8s.hty1024.com/version: 11.4.2
app.k8s.hty1024.com/resources: statefulSet
spec:
replicas: 1
@ -167,7 +167,7 @@ spec:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: db
app.k8s.hty1024.com/name: mariadb
app.k8s.hty1024.com/version: 10.11.7
app.k8s.hty1024.com/version: 11.4.2
app.k8s.hty1024.com/resources: pod
template:
metadata:
@ -175,7 +175,7 @@ spec:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: db
app.k8s.hty1024.com/name: mariadb
app.k8s.hty1024.com/version: 10.11.7
app.k8s.hty1024.com/version: 11.4.2
app.k8s.hty1024.com/resources: pod
spec:
terminationGracePeriodSeconds: 60
@ -197,7 +197,7 @@ spec:
secretName: hty1024-db-mariadb-secret
containers:
- name: mariadb
image: mariadb:10.11.7
image: mariadb:11.4.2
ports:
- name: tcp
containerPort: 3306

View File

@ -17,7 +17,7 @@ metadata:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: db
app.k8s.hty1024.com/name: mysql
app.k8s.hty1024.com/version: 8.0.37
app.k8s.hty1024.com/version: 8.0.39
app.k8s.hty1024.com/resources: storageClass
provisioner: kubernetes.io/no-provisioner
reclaimPolicy: Retain
@ -35,7 +35,7 @@ metadata:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: db
app.k8s.hty1024.com/name: mysql
app.k8s.hty1024.com/version: 8.0.37
app.k8s.hty1024.com/version: 8.0.39
app.k8s.hty1024.com/resources: persistentVolume
app.k8s.hty1024.com/role: master
spec:
@ -68,7 +68,7 @@ metadata:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: db
app.k8s.hty1024.com/name: mysql
app.k8s.hty1024.com/version: 8.0.37
app.k8s.hty1024.com/version: 8.0.39
app.k8s.hty1024.com/resources: persistentVolume
app.k8s.hty1024.com/role: slave
spec:
@ -103,7 +103,7 @@ metadata:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: db
app.k8s.hty1024.com/name: mysql
app.k8s.hty1024.com/version: 8.0.37
app.k8s.hty1024.com/version: 8.0.39
app.k8s.hty1024.com/resources: persistentVolumeClaim
app.k8s.hty1024.com/role: master
spec:
@ -127,7 +127,7 @@ metadata:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: db
app.k8s.hty1024.com/name: mysql
app.k8s.hty1024.com/version: 8.0.37
app.k8s.hty1024.com/version: 8.0.39
app.k8s.hty1024.com/resources: persistentVolumeClaim
app.k8s.hty1024.com/role: slave
spec:
@ -153,7 +153,7 @@ metadata:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: db
app.k8s.hty1024.com/name: mysql
app.k8s.hty1024.com/version: 8.0.37
app.k8s.hty1024.com/version: 8.0.39
app.k8s.hty1024.com/resources: configMap
app.k8s.hty1024.com/role: master
data:
@ -189,7 +189,7 @@ metadata:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: db
app.k8s.hty1024.com/name: mysql
app.k8s.hty1024.com/version: 8.0.37
app.k8s.hty1024.com/version: 8.0.39
app.k8s.hty1024.com/resources: configMap
app.k8s.hty1024.com/role: master
data:
@ -212,7 +212,7 @@ metadata:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: db
app.k8s.hty1024.com/name: mysql
app.k8s.hty1024.com/version: 8.0.37
app.k8s.hty1024.com/version: 8.0.39
app.k8s.hty1024.com/resources: configMap
app.k8s.hty1024.com/role: slave
data:
@ -242,7 +242,7 @@ metadata:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: db
app.k8s.hty1024.com/name: mysql
app.k8s.hty1024.com/version: 8.0.37
app.k8s.hty1024.com/version: 8.0.39
app.k8s.hty1024.com/resources: configMap
app.k8s.hty1024.com/role: slave
data:
@ -263,7 +263,7 @@ metadata:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: db
app.k8s.hty1024.com/name: mysql
app.k8s.hty1024.com/version: 8.0.37
app.k8s.hty1024.com/version: 8.0.39
app.k8s.hty1024.com/resources: secret
type: Opaque
stringData:
@ -286,7 +286,7 @@ metadata:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: db
app.k8s.hty1024.com/name: mysql
app.k8s.hty1024.com/version: 8.0.37
app.k8s.hty1024.com/version: 8.0.39
app.k8s.hty1024.com/resources: service
app.k8s.hty1024.com/role: master
spec:
@ -298,7 +298,7 @@ spec:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: db
app.k8s.hty1024.com/name: mysql
app.k8s.hty1024.com/version: 8.0.37
app.k8s.hty1024.com/version: 8.0.39
app.k8s.hty1024.com/resources: pod
app.k8s.hty1024.com/role: master
@ -314,7 +314,7 @@ metadata:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: db
app.k8s.hty1024.com/name: mysql
app.k8s.hty1024.com/version: 8.0.37
app.k8s.hty1024.com/version: 8.0.39
app.k8s.hty1024.com/resources: service
app.k8s.hty1024.com/role: slave
spec:
@ -326,7 +326,7 @@ spec:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: db
app.k8s.hty1024.com/name: mysql
app.k8s.hty1024.com/version: 8.0.37
app.k8s.hty1024.com/version: 8.0.39
app.k8s.hty1024.com/resources: pod
app.k8s.hty1024.com/role: slave
@ -343,7 +343,7 @@ metadata:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: db
app.k8s.hty1024.com/name: mysql
app.k8s.hty1024.com/version: 8.0.37
app.k8s.hty1024.com/version: 8.0.39
app.k8s.hty1024.com/resources: statefulSet
app.k8s.hty1024.com/role: master
spec:
@ -354,7 +354,7 @@ spec:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: db
app.k8s.hty1024.com/name: mysql
app.k8s.hty1024.com/version: 8.0.37
app.k8s.hty1024.com/version: 8.0.39
app.k8s.hty1024.com/resources: pod
app.k8s.hty1024.com/role: master
template:
@ -363,7 +363,7 @@ spec:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: db
app.k8s.hty1024.com/name: mysql
app.k8s.hty1024.com/version: 8.0.37
app.k8s.hty1024.com/version: 8.0.39
app.k8s.hty1024.com/resources: pod
app.k8s.hty1024.com/role: master
spec:
@ -392,7 +392,7 @@ spec:
secretName: hty1024-db-mysql-secret
containers:
- name: mysql
image: mysql:8.0.37
image: mysql:8.0.39
ports:
- name: tcp
containerPort: 3306
@ -433,7 +433,7 @@ metadata:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: db
app.k8s.hty1024.com/name: mysql
app.k8s.hty1024.com/version: 8.0.37
app.k8s.hty1024.com/version: 8.0.39
app.k8s.hty1024.com/resources: statefulSet
app.k8s.hty1024.com/role: slave
spec:
@ -444,7 +444,7 @@ spec:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: db
app.k8s.hty1024.com/name: mysql
app.k8s.hty1024.com/version: 8.0.37
app.k8s.hty1024.com/version: 8.0.39
app.k8s.hty1024.com/resources: pod
app.k8s.hty1024.com/role: slave
template:
@ -453,7 +453,7 @@ spec:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: db
app.k8s.hty1024.com/name: mysql
app.k8s.hty1024.com/version: 8.0.37
app.k8s.hty1024.com/version: 8.0.39
app.k8s.hty1024.com/resources: pod
app.k8s.hty1024.com/role: slave
spec:
@ -482,7 +482,7 @@ spec:
secretName: hty1024-db-mysql-secret
containers:
- name: mysql
image: mysql:8.0.37
image: mysql:8.0.39
ports:
- name: tcp
containerPort: 3306

View File

@ -17,7 +17,7 @@ metadata:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: db
app.k8s.hty1024.com/name: mysql
app.k8s.hty1024.com/version: 8.0.37
app.k8s.hty1024.com/version: 8.0.39
app.k8s.hty1024.com/resources: storageClass
provisioner: kubernetes.io/no-provisioner
reclaimPolicy: Retain
@ -34,7 +34,7 @@ metadata:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: db
app.k8s.hty1024.com/name: mysql
app.k8s.hty1024.com/version: 8.0.37
app.k8s.hty1024.com/version: 8.0.39
app.k8s.hty1024.com/resources: persistentVolume
spec:
capacity:
@ -67,7 +67,7 @@ metadata:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: db
app.k8s.hty1024.com/name: mysql
app.k8s.hty1024.com/version: 8.0.37
app.k8s.hty1024.com/version: 8.0.39
app.k8s.hty1024.com/resources: persistentVolumeClaim
spec:
resources:
@ -90,7 +90,7 @@ metadata:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: db
app.k8s.hty1024.com/name: mysql
app.k8s.hty1024.com/version: 8.0.37
app.k8s.hty1024.com/version: 8.0.39
app.k8s.hty1024.com/resources: configMap
data:
my.cnf: |
@ -111,7 +111,7 @@ metadata:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: db
app.k8s.hty1024.com/name: mysql
app.k8s.hty1024.com/version: 8.0.37
app.k8s.hty1024.com/version: 8.0.39
app.k8s.hty1024.com/resources: secret
type: Opaque
stringData:
@ -131,7 +131,7 @@ metadata:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: db
app.k8s.hty1024.com/name: mysql
app.k8s.hty1024.com/version: 8.0.37
app.k8s.hty1024.com/version: 8.0.39
app.k8s.hty1024.com/resources: service
spec:
type: ClusterIP
@ -142,7 +142,7 @@ spec:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: db
app.k8s.hty1024.com/name: mysql
app.k8s.hty1024.com/version: 8.0.37
app.k8s.hty1024.com/version: 8.0.39
app.k8s.hty1024.com/resources: pod
---
@ -157,7 +157,7 @@ metadata:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: db
app.k8s.hty1024.com/name: mysql
app.k8s.hty1024.com/version: 8.0.37
app.k8s.hty1024.com/version: 8.0.39
app.k8s.hty1024.com/resources: statefulSet
spec:
replicas: 1
@ -167,7 +167,7 @@ spec:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: db
app.k8s.hty1024.com/name: mysql
app.k8s.hty1024.com/version: 8.0.37
app.k8s.hty1024.com/version: 8.0.39
app.k8s.hty1024.com/resources: pod
template:
metadata:
@ -175,7 +175,7 @@ spec:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: db
app.k8s.hty1024.com/name: mysql
app.k8s.hty1024.com/version: 8.0.37
app.k8s.hty1024.com/version: 8.0.39
app.k8s.hty1024.com/resources: pod
spec:
terminationGracePeriodSeconds: 60
@ -197,7 +197,7 @@ spec:
secretName: hty1024-db-mysql-secret
containers:
- name: mysql
image: mysql:8.0.37
image: mysql:8.0.39
ports:
- name: tcp
containerPort: 3306

View File

@ -18,7 +18,7 @@ metadata:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: db
app.k8s.hty1024.com/name: pgadmin4
app.k8s.hty1024.com/version: 8.6.0
app.k8s.hty1024.com/version: 8.10.0
app.k8s.hty1024.com/resources: service
spec:
type: NodePort
@ -31,7 +31,7 @@ spec:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: db
app.k8s.hty1024.com/name: pgadmin4
app.k8s.hty1024.com/version: 8.6.0
app.k8s.hty1024.com/version: 8.10.0
app.k8s.hty1024.com/resources: pod
---
@ -46,7 +46,7 @@ metadata:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: db
app.k8s.hty1024.com/name: pgadmin4
app.k8s.hty1024.com/version: 8.6.0
app.k8s.hty1024.com/version: 8.10.0
app.k8s.hty1024.com/resources: deployment
spec:
replicas: 1
@ -56,7 +56,7 @@ spec:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: db
app.k8s.hty1024.com/name: pgadmin4
app.k8s.hty1024.com/version: 8.6.0
app.k8s.hty1024.com/version: 8.10.0
app.k8s.hty1024.com/resources: pod
template:
metadata:
@ -64,7 +64,7 @@ spec:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: db
app.k8s.hty1024.com/name: pgadmin4
app.k8s.hty1024.com/version: 8.6.0
app.k8s.hty1024.com/version: 8.10.0
app.k8s.hty1024.com/resources: pod
spec:
terminationGracePeriodSeconds: 60
@ -74,7 +74,7 @@ spec:
path: /etc/localtime
containers:
- name: pgadmin4
image: dpage/pgadmin4:8.6
image: dpage/pgadmin4:8.10
ports:
- name: http
containerPort: 80

View File

@ -17,7 +17,7 @@ metadata:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: db
app.k8s.hty1024.com/name: postgres
app.k8s.hty1024.com/version: 16.2-alpine3.19
app.k8s.hty1024.com/version: 16.3-alpine3.20
app.k8s.hty1024.com/resources: storageClass
provisioner: kubernetes.io/no-provisioner
reclaimPolicy: Retain
@ -34,7 +34,7 @@ metadata:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: db
app.k8s.hty1024.com/name: postgres
app.k8s.hty1024.com/version: 16.2-alpine3.19
app.k8s.hty1024.com/version: 16.3-alpine3.20
app.k8s.hty1024.com/resources: persistentVolume
spec:
capacity:
@ -67,7 +67,7 @@ metadata:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: db
app.k8s.hty1024.com/name: postgres
app.k8s.hty1024.com/version: 16.2-alpine3.19
app.k8s.hty1024.com/version: 16.3-alpine3.20
app.k8s.hty1024.com/resources: persistentVolumeClaim
spec:
resources:
@ -90,7 +90,7 @@ metadata:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: db
app.k8s.hty1024.com/name: postgres
app.k8s.hty1024.com/version: 16.2-alpine3.19
app.k8s.hty1024.com/version: 16.3-alpine3.20
app.k8s.hty1024.com/resources: secret
type: Opaque
stringData:
@ -110,7 +110,7 @@ metadata:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: db
app.k8s.hty1024.com/name: postgres
app.k8s.hty1024.com/version: 16.2-alpine3.19
app.k8s.hty1024.com/version: 16.3-alpine3.20
app.k8s.hty1024.com/resources: service
spec:
type: ClusterIP
@ -121,7 +121,7 @@ spec:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: db
app.k8s.hty1024.com/name: postgres
app.k8s.hty1024.com/version: 16.2-alpine3.19
app.k8s.hty1024.com/version: 16.3-alpine3.20
app.k8s.hty1024.com/resources: pod
---
@ -136,7 +136,7 @@ metadata:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: db
app.k8s.hty1024.com/name: postgres
app.k8s.hty1024.com/version: 16.2-alpine3.19
app.k8s.hty1024.com/version: 16.3-alpine3.20
app.k8s.hty1024.com/resources: statefulSet
spec:
replicas: 1
@ -146,7 +146,7 @@ spec:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: db
app.k8s.hty1024.com/name: postgres
app.k8s.hty1024.com/version: 16.2-alpine3.19
app.k8s.hty1024.com/version: 16.3-alpine3.20
app.k8s.hty1024.com/resources: pod
template:
metadata:
@ -154,7 +154,7 @@ spec:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: db
app.k8s.hty1024.com/name: postgres
app.k8s.hty1024.com/version: 16.2-alpine3.19
app.k8s.hty1024.com/version: 16.3-alpine3.20
app.k8s.hty1024.com/resources: pod
spec:
terminationGracePeriodSeconds: 60
@ -170,7 +170,7 @@ spec:
secretName: hty1024-db-postgres-secret
containers:
- name: postgres
image: postgres:16.2-alpine3.19
image: postgres:16.3-alpine3.20
ports:
- name: tcp
containerPort: 5432

View File

@ -17,7 +17,7 @@ metadata:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: app
app.k8s.hty1024.com/name: seafile
app.k8s.hty1024.com/version: 11.0.8
app.k8s.hty1024.com/version: 11.0.9
app.k8s.hty1024.com/resources: storageClass
provisioner: kubernetes.io/no-provisioner
reclaimPolicy: Retain
@ -35,7 +35,7 @@ metadata:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: app
app.k8s.hty1024.com/name: seafile
app.k8s.hty1024.com/version: 11.0.8
app.k8s.hty1024.com/version: 11.0.9
app.k8s.hty1024.com/resources: persistentVolume
spec:
capacity:
@ -67,7 +67,7 @@ metadata:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: app
app.k8s.hty1024.com/name: seafile
app.k8s.hty1024.com/version: 11.0.8
app.k8s.hty1024.com/version: 11.0.9
app.k8s.hty1024.com/resources: persistentVolume
spec:
capacity:
@ -101,7 +101,7 @@ metadata:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: app
app.k8s.hty1024.com/name: seafile
app.k8s.hty1024.com/version: 11.0.8
app.k8s.hty1024.com/version: 11.0.9
app.k8s.hty1024.com/resources: persistentVolumeClaim
spec:
resources:
@ -124,7 +124,7 @@ metadata:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: app
app.k8s.hty1024.com/name: seafile
app.k8s.hty1024.com/version: 11.0.8
app.k8s.hty1024.com/version: 11.0.9
app.k8s.hty1024.com/resources: persistentVolumeClaim
spec:
resources:
@ -147,7 +147,7 @@ metadata:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: app
app.k8s.hty1024.com/name: seafile
app.k8s.hty1024.com/version: 11.0.8
app.k8s.hty1024.com/version: 11.0.9
app.k8s.hty1024.com/resources: configMap
data:
my.cnf: |
@ -168,7 +168,7 @@ metadata:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: app
app.k8s.hty1024.com/name: seafile
app.k8s.hty1024.com/version: 11.0.8
app.k8s.hty1024.com/version: 11.0.9
app.k8s.hty1024.com/resources: secret
type: Opaque
stringData:
@ -188,7 +188,7 @@ metadata:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: app
app.k8s.hty1024.com/name: seafile
app.k8s.hty1024.com/version: 11.0.8
app.k8s.hty1024.com/version: 11.0.9
app.k8s.hty1024.com/resources: service
spec:
type: NodePort
@ -200,7 +200,7 @@ spec:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: app
app.k8s.hty1024.com/name: seafile
app.k8s.hty1024.com/version: 11.0.8
app.k8s.hty1024.com/version: 11.0.9
app.k8s.hty1024.com/resources: pod
---
@ -215,7 +215,7 @@ metadata:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: app
app.k8s.hty1024.com/name: seafile
app.k8s.hty1024.com/version: 11.0.8
app.k8s.hty1024.com/version: 11.0.9
app.k8s.hty1024.com/resources: statefulSet
spec:
replicas: 1
@ -225,7 +225,7 @@ spec:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: app
app.k8s.hty1024.com/name: seafile
app.k8s.hty1024.com/version: 11.0.8
app.k8s.hty1024.com/version: 11.0.9
app.k8s.hty1024.com/resources: pod
template:
metadata:
@ -233,7 +233,7 @@ spec:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: app
app.k8s.hty1024.com/name: seafile
app.k8s.hty1024.com/version: 11.0.8
app.k8s.hty1024.com/version: 11.0.9
app.k8s.hty1024.com/resources: pod
spec:
terminationGracePeriodSeconds: 60
@ -258,7 +258,7 @@ spec:
claimName: hty1024-app-seafile-pvc-data
containers:
- name: mariadb
image: mariadb:10.11.7
image: mariadb:10.11.8
ports:
- name: tcp
containerPort: 3306
@ -277,7 +277,7 @@ spec:
- name: MYSQL_ROOT_PASSWORD_FILE
value: "/tmp/secret-volume/root.key"
- name: memcached
image: memcached:1.6.26-alpine3.19
image: memcached:1.6.29-alpine3.20
ports:
- name: tcp
containerPort: 11211
@ -286,7 +286,7 @@ spec:
mountPath: /etc/localtime
readOnly: true
- name: seafile
image: seafileltd/seafile-mc:11.0.8
image: seafileltd/seafile-mc:11.0.9
ports:
- name: tcp
containerPort: 80

View File

@ -0,0 +1,166 @@
---
# 创建 Namespace
apiVersion: v1
kind: Namespace
metadata:
name: hty1024-app
---
# 创建 StorageClass
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: storage-local-trilium
labels:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: app
app.k8s.hty1024.com/name: trilium
app.k8s.hty1024.com/version: 0.63.7
app.k8s.hty1024.com/resources: storageClass
provisioner: kubernetes.io/no-provisioner
reclaimPolicy: Retain
volumeBindingMode: WaitForFirstConsumer
---
# 创建 PersistentVolume
apiVersion: v1
kind: PersistentVolume
metadata:
name: hty1024-app-trilium-pv
labels:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: app
app.k8s.hty1024.com/name: trilium
app.k8s.hty1024.com/version: 0.63.7
app.k8s.hty1024.com/resources: persistentVolume
spec:
capacity:
storage: 10Gi
volumeMode: Filesystem
accessModes:
- ReadWriteOnce
persistentVolumeReclaimPolicy: Retain
storageClassName: storage-local-trilium
local:
path: /app/trilium/data
nodeAffinity:
required:
nodeSelectorTerms:
- matchExpressions:
- key: node.k8s.hty1024.com/type
operator: In
values:
- app
---
# 创建 PersistentVolumeClaim
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: hty1024-app-trilium-pvc
namespace: hty1024-app
labels:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: app
app.k8s.hty1024.com/name: trilium
app.k8s.hty1024.com/version: 0.63.7
app.k8s.hty1024.com/resources: persistentVolumeClaim
spec:
resources:
requests:
storage: 10Gi
volumeMode: Filesystem
accessModes:
- ReadWriteOnce
storageClassName: storage-local-trilium
---
# 创建 Service
apiVersion: v1
kind: Service
metadata:
name: hty1024-app-trilium-service
namespace: hty1024-app
labels:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: app
app.k8s.hty1024.com/name: trilium
app.k8s.hty1024.com/version: 0.63.7
app.k8s.hty1024.com/resources: service
spec:
type: NodePort
ports:
- port: 8080
targetPort: 8080
nodePort: 30000
selector:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: app
app.k8s.hty1024.com/name: trilium
app.k8s.hty1024.com/version: 0.63.7
app.k8s.hty1024.com/resources: pod
---
# 创建 StatefulSet
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: hty1024-app-trilium-statefulset
namespace: hty1024-app
labels:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: app
app.k8s.hty1024.com/name: trilium
app.k8s.hty1024.com/version: 0.63.7
app.k8s.hty1024.com/resources: statefulSet
spec:
replicas: 1
minReadySeconds: 30
selector:
matchLabels:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: app
app.k8s.hty1024.com/name: trilium
app.k8s.hty1024.com/version: 0.63.7
app.k8s.hty1024.com/resources: pod
template:
metadata:
labels:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: app
app.k8s.hty1024.com/name: trilium
app.k8s.hty1024.com/version: 0.63.7
app.k8s.hty1024.com/resources: pod
spec:
terminationGracePeriodSeconds: 60
volumes:
- name: localtime
hostPath:
path: /etc/localtime
- name: shanghai
hostPath:
path: /usr/share/zoneinfo/Asia/Shanghai
- name: hty1024-app-trilium-data
persistentVolumeClaim:
claimName: hty1024-app-trilium-pvc
containers:
- name: trilium
image: zadam/trilium:0.63.7
ports:
- name: tcp
containerPort: 8080
volumeMounts:
- name: shanghai
mountPath: /etc/localtime
readOnly: true
- name: hty1024-app-trilium-data
mountPath: /home/node/trilium-data
nodeSelector:
node.k8s.hty1024.com/type: app

View File

@ -17,7 +17,7 @@ metadata:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: app
app.k8s.hty1024.com/name: vaultwarden
app.k8s.hty1024.com/version: 1.30.5-alpine
app.k8s.hty1024.com/version: 1.31.0-alpine
app.k8s.hty1024.com/resources: storageClass
provisioner: kubernetes.io/no-provisioner
reclaimPolicy: Retain
@ -34,7 +34,7 @@ metadata:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: app
app.k8s.hty1024.com/name: vaultwarden
app.k8s.hty1024.com/version: 1.30.5-alpine
app.k8s.hty1024.com/version: 1.31.0-alpine
app.k8s.hty1024.com/resources: persistentVolume
spec:
capacity:
@ -67,7 +67,7 @@ metadata:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: app
app.k8s.hty1024.com/name: vaultwarden
app.k8s.hty1024.com/version: 1.30.5-alpine
app.k8s.hty1024.com/version: 1.31.0-alpine
app.k8s.hty1024.com/resources: persistentVolumeClaim
spec:
resources:
@ -90,7 +90,7 @@ metadata:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: app
app.k8s.hty1024.com/name: vaultwarden
app.k8s.hty1024.com/version: 1.30.5-alpine
app.k8s.hty1024.com/version: 1.31.0-alpine
app.k8s.hty1024.com/resources: service
spec:
type: NodePort
@ -102,7 +102,7 @@ spec:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: app
app.k8s.hty1024.com/name: vaultwarden
app.k8s.hty1024.com/version: 1.30.5-alpine
app.k8s.hty1024.com/version: 1.31.0-alpine
app.k8s.hty1024.com/resources: pod
---
@ -117,7 +117,7 @@ metadata:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: app
app.k8s.hty1024.com/name: vaultwarden
app.k8s.hty1024.com/version: 1.30.5-alpine
app.k8s.hty1024.com/version: 1.31.0-alpine
app.k8s.hty1024.com/resources: statefulSet
spec:
replicas: 1
@ -127,7 +127,7 @@ spec:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: app
app.k8s.hty1024.com/name: vaultwarden
app.k8s.hty1024.com/version: 1.30.5-alpine
app.k8s.hty1024.com/version: 1.31.0-alpine
app.k8s.hty1024.com/resources: pod
template:
metadata:
@ -135,7 +135,7 @@ spec:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: app
app.k8s.hty1024.com/name: vaultwarden
app.k8s.hty1024.com/version: 1.30.5-alpine
app.k8s.hty1024.com/version: 1.31.0-alpine
app.k8s.hty1024.com/resources: pod
spec:
terminationGracePeriodSeconds: 60
@ -148,7 +148,7 @@ spec:
claimName: hty1024-app-vaultwarden-pvc
containers:
- name: vaultwarden
image: vaultwarden/server:1.30.5-alpine
image: vaultwarden/server:1.31.0-alpine
ports:
- name: tcp
containerPort: 80

View File

@ -17,7 +17,7 @@ metadata:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: app
app.k8s.hty1024.com/name: wikijs
app.k8s.hty1024.com/version: 2.5.302
app.k8s.hty1024.com/version: 2.5.303
app.k8s.hty1024.com/resources: storageClass
provisioner: kubernetes.io/no-provisioner
reclaimPolicy: Retain
@ -34,7 +34,7 @@ metadata:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: app
app.k8s.hty1024.com/name: wikijs
app.k8s.hty1024.com/version: 2.5.302
app.k8s.hty1024.com/version: 2.5.303
app.k8s.hty1024.com/resources: persistentVolume
spec:
capacity:
@ -67,7 +67,7 @@ metadata:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: app
app.k8s.hty1024.com/name: wikijs
app.k8s.hty1024.com/version: 2.5.302
app.k8s.hty1024.com/version: 2.5.303
app.k8s.hty1024.com/resources: persistentVolumeClaim
spec:
resources:
@ -90,7 +90,7 @@ metadata:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: app
app.k8s.hty1024.com/name: wikijs
app.k8s.hty1024.com/version: 2.5.302
app.k8s.hty1024.com/version: 2.5.303
app.k8s.hty1024.com/resources: service
spec:
type: NodePort
@ -102,7 +102,7 @@ spec:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: app
app.k8s.hty1024.com/name: wikijs
app.k8s.hty1024.com/version: 2.5.302
app.k8s.hty1024.com/version: 2.5.303
app.k8s.hty1024.com/resources: pod
---
@ -117,7 +117,7 @@ metadata:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: app
app.k8s.hty1024.com/name: wikijs
app.k8s.hty1024.com/version: 2.5.302
app.k8s.hty1024.com/version: 2.5.303
app.k8s.hty1024.com/resources: statefulSet
spec:
replicas: 1
@ -127,7 +127,7 @@ spec:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: app
app.k8s.hty1024.com/name: wikijs
app.k8s.hty1024.com/version: 2.5.302
app.k8s.hty1024.com/version: 2.5.303
app.k8s.hty1024.com/resources: pod
template:
metadata:
@ -135,7 +135,7 @@ spec:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: app
app.k8s.hty1024.com/name: wikijs
app.k8s.hty1024.com/version: 2.5.302
app.k8s.hty1024.com/version: 2.5.303
app.k8s.hty1024.com/resources: pod
spec:
terminationGracePeriodSeconds: 60
@ -148,7 +148,7 @@ spec:
claimName: hty1024-app-wikijs-pvc
containers:
- name: wikijs
image: requarks/wiki:2.5.302
image: requarks/wiki:2.5.303
ports:
- name: tcp
containerPort: 3000

View File

@ -0,0 +1,332 @@
---
# 创建 Namespace
apiVersion: v1
kind: Namespace
metadata:
name: hty1024-app
---
# 创建 StorageClass
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: storage-local-xbrowsersync
labels:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: app
app.k8s.hty1024.com/name: xbrowsersync
app.k8s.hty1024.com/version: 1.1.13
app.k8s.hty1024.com/resources: storageClass
provisioner: kubernetes.io/no-provisioner
reclaimPolicy: Retain
volumeBindingMode: WaitForFirstConsumer
---
# 创建 PersistentVolume
apiVersion: v1
kind: PersistentVolume
metadata:
name: hty1024-app-xbrowsersync-pv
labels:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: app
app.k8s.hty1024.com/name: xbrowsersync
app.k8s.hty1024.com/version: 1.1.13
app.k8s.hty1024.com/resources: persistentVolume
spec:
capacity:
storage: 20Gi
volumeMode: Filesystem
accessModes:
- ReadWriteOnce
persistentVolumeReclaimPolicy: Retain
storageClassName: storage-local-xbrowsersync
local:
path: /app/xbrowsersync/data/
nodeAffinity:
required:
nodeSelectorTerms:
- matchExpressions:
- key: node.k8s.hty1024.com/type
operator: In
values:
- app
---
# 创建 PersistentVolumeClaim
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: hty1024-app-xbrowsersync-pvc
namespace: hty1024-app
labels:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: app
app.k8s.hty1024.com/name: xbrowsersync
app.k8s.hty1024.com/version: 1.1.13
app.k8s.hty1024.com/resources: persistentVolumeClaim
spec:
resources:
requests:
storage: 20Gi
volumeMode: Filesystem
accessModes:
- ReadWriteOnce
storageClassName: storage-local-xbrowsersync
---
# 创建 ConfigMap自定义 mongoconfig.js 文件)
apiVersion: v1
kind: ConfigMap
metadata:
name: hty1024-app-xbrowsersync-mongoconfig
namespace: hty1024-app
labels:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: app
app.k8s.hty1024.com/name: xbrowsersync
app.k8s.hty1024.com/version: 1.1.13
app.k8s.hty1024.com/resources: configMap
data:
mongoconfig.js: |
db.newsynclogs.createIndex( { "expiresAt": 1 }, { expireAfterSeconds: 0 } );
db.newsynclogs.createIndex( { "ipAddress": 1 } );
db.bookmarks.createIndex( { "lastAccessed": 1 }, { expireAfterSeconds: 21*86400 } );
---
# 创建 ConfigMap自定义 settings.json 文件)
apiVersion: v1
kind: ConfigMap
metadata:
name: hty1024-app-xbrowsersync-settings
namespace: hty1024-app
labels:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: app
app.k8s.hty1024.com/name: xbrowsersync
app.k8s.hty1024.com/version: 1.1.13
app.k8s.hty1024.com/resources: configMap
data:
settings.json: |
{
"location": "CN",
"maxSyncs": "10000",
"maxSyncSize": "10485760",
"db": {
"host": "127.0.0.1",
"port": "27017",
"name": "xbrowsersync",
"username": "xbrowsersync",
"password": "123456"
},
"status": {
"allowNewSyncs": "true",
"online": "true",
"message": "Welcome to the HTY1024 xBrowserSync service! We run the latest version of the xBrowserSync API and take database backups daily."
}
}
---
# 创建 ConfigMap自定义 healthcheck.js 文件)
apiVersion: v1
kind: ConfigMap
metadata:
name: hty1024-app-xbrowsersync-healthcheck
namespace: hty1024-app
labels:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: app
app.k8s.hty1024.com/name: xbrowsersync
app.k8s.hty1024.com/version: 1.1.13
app.k8s.hty1024.com/resources: configMap
data:
healthcheck.js: |
const http = require('http');
const response = http.request(
{
host: '0.0.0.0',
method: 'GET',
path: '/info',
port: 8080,
timeout: 2000,
},
(res) => {
let body = '';
res.setEncoding('utf8');
res.on('data', (chunk) => {
body += chunk;
});
res.on('end', () => {
if (res.statusCode === 200) {
const payload = JSON.parse(body);
switch (payload.status) {
case 1:
case 3:
console.log('HEALTHCHECK: online');
process.exit(0);
case 2:
default:
console.log('HEALTHCHECK: offline');
}
} else {
console.log('HEALTHCHECK: offline');
}
process.exit(1);
});
}
);
response.on('error', function (err) {
console.log('HEALTHCHECK: offline');
process.exit(1);
});
response.end();
---
# 创建 Service
apiVersion: v1
kind: Service
metadata:
name: hty1024-app-xbrowsersync-service
namespace: hty1024-app
labels:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: app
app.k8s.hty1024.com/name: xbrowsersync
app.k8s.hty1024.com/version: 1.1.13
app.k8s.hty1024.com/resources: service
spec:
type: NodePort
ports:
- port: 8080
targetPort: 8080
nodePort: 30000
selector:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: app
app.k8s.hty1024.com/name: xbrowsersync
app.k8s.hty1024.com/version: 1.1.13
app.k8s.hty1024.com/resources: pod
---
# 创建 StatefulSet
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: hty1024-app-xbrowsersync-statefulset
namespace: hty1024-app
labels:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: app
app.k8s.hty1024.com/name: xbrowsersync
app.k8s.hty1024.com/version: 1.1.13
app.k8s.hty1024.com/resources: statefulSet
spec:
replicas: 1
minReadySeconds: 30
selector:
matchLabels:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: app
app.k8s.hty1024.com/name: xbrowsersync
app.k8s.hty1024.com/version: 1.1.13
app.k8s.hty1024.com/resources: pod
template:
metadata:
labels:
app.k8s.hty1024.com/env: prod
app.k8s.hty1024.com/type: app
app.k8s.hty1024.com/name: xbrowsersync
app.k8s.hty1024.com/version: 1.1.13
app.k8s.hty1024.com/resources: pod
spec:
terminationGracePeriodSeconds: 60
volumes:
- name: localtime
hostPath:
path: /etc/localtime
- name: shanghai
hostPath:
path: /usr/share/zoneinfo/Asia/Shanghai
- name: data
persistentVolumeClaim:
claimName: hty1024-app-xbrowsersync-pvc
- name: mongoconfig
configMap:
name: hty1024-app-xbrowsersync-mongoconfig
items:
- key: mongoconfig.js
path: mongoconfig.js
- name: settings
configMap:
name: hty1024-app-xbrowsersync-settings
items:
- key: settings.json
path: settings.json
- name: healthcheck
configMap:
name: hty1024-app-xbrowsersync-healthcheck
items:
- key: healthcheck.js
path: healthcheck.js
containers:
- name: mongo
image: mongo:7.0.12
ports:
- name: tcp
containerPort: 27017
volumeMounts:
- name: shanghai
mountPath: /etc/localtime
readOnly: true
- name: data
mountPath: /data/db
- name: mongoconfig
mountPath: /docker-entrypoint-initdb.d/mongoconfig.js
env:
- name: MONGO_INITDB_DATABASE
value: "xbrowsersync"
- name: MONGO_INITDB_ROOT_USERNAME
value: "xbrowsersync"
- name: MONGO_INITDB_ROOT_PASSWORD
value: "123456"
- name: XBS_DB_NAME
value: "xbrowsersync"
- name: XBS_DB_USERNAME
value: "xbrowsersync"
- name: XBS_DB_PASSWORD
value: "123456"
- name: xbrowsersync
image: xbrowsersync/api:1.1.13
ports:
- name: tcp
containerPort: 8080
# volumeMounts:
# - name: shanghai
# mountPath: /etc/localtime
# readOnly: true
# - name: settings
# mountPath: /usr/src/api/config/settings.json
# - name: healthcheck
# mountPath: /usr/src/api/healthcheck.js
env:
- name: XBROWSERSYNC_DB_USER
value: "xbrowsersync"
- name: XBROWSERSYNC_DB_PWD
value: "123456"
nodeSelector:
node.k8s.hty1024.com/type: app