refactor: 整理结构和 maker 构建方式

This commit is contained in:
zhaoyupeng
2025-11-27 11:06:38 +08:00
parent 11523e3e48
commit fdad0eb36c
63 changed files with 137 additions and 153 deletions

View File

@@ -0,0 +1,113 @@
apiVersion: v1
kind: Namespace
metadata:
name: seafile
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: memcached
namespace: seafile
spec:
replicas: 1
selector:
matchLabels:
app: memcached
template:
metadata:
labels:
app: memcached
spec:
containers:
- name: memcached
image: hub.yizhisec.com/product/hybridscope/memcached:latest
imagePullPolicy: IfNotPresent
args: ["-m", "256"]
ports:
- containerPort: 11211
---
apiVersion: v1
kind: Service
metadata:
name: memcached
namespace: seafile
spec:
selector:
app: memcached
ports:
- protocol: TCP
port: 11211
targetPort: 11211
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: seafile
namespace: seafile
spec:
replicas: 1
selector:
matchLabels:
app: seafile
template:
metadata:
labels:
app: seafile
spec:
containers:
- name: seafile
image: hub.yizhisec.com/product/hybridscope/seafile-mc:latest
imagePullPolicy: IfNotPresent
env:
- name: DB_HOST
value: "%s"
- name: DB_ROOT_PASSWD
value: "%s" #db's password
- name: TIME_ZONE
value: "Asia/Shanghai"
- name: SEAFILE_ADMIN_EMAIL
value: "%s" #admin email
- name: SEAFILE_ADMIN_PASSWORD
value: "%s" #admin password
- name: SEAFILE_SERVER_LETSENCRYPT
value: "false"
- name: SEAFILE_SERVER_HOSTNAME
value: "%s" #hostname
ports:
- containerPort: 80
volumeMounts:
- name: seafile-data
mountPath: /shared
volumes:
- name: seafile-data
persistentVolumeClaim:
claimName: seafile-data
restartPolicy: Always
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: seafile-data
namespace: seafile
spec:
accessModes:
- ReadWriteOnce
storageClassName: longhorn
resources:
requests:
storage: %s
---
apiVersion: v1
kind: Service
metadata:
name: seafile-service
namespace: seafile
spec:
selector:
app: seafile
type: ClusterIP
ports:
- protocol: TCP
port: 80
targetPort: 80