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,65 @@
apiVersion: mysql.presslabs.org/v1alpha1
kind: MysqlDatabase
metadata:
name: my-database-backup-server
namespace: db-mysql
spec:
database: backup_server
clusterRef:
name: mysql-cluster
namespace: db-mysql
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: backup-seafile-deployment
namespace: seafile
spec:
replicas: 1
selector:
matchLabels:
app: backup-seafile
template:
metadata:
labels:
app: backup-seafile
spec:
topologySpreadConstraints:
- maxSkew: 1
topologyKey: kubernetes.io/hostname
whenUnsatisfiable: ScheduleAnyway
labelSelector:
matchLabels:
app: backup-seafile
containers:
- name: backup-seafile
image: hub.yizhisec.com/hybridscope/hs_backup_seafile:latest
imagePullPolicy: IfNotPresent
ports:
- containerPort: 9027
volumeMounts:
- name: config-volume
mountPath: /etc/hs_backup_seafile/config.yml
subPath: config.yml
readOnly: true
volumes:
- name: config-volume
configMap:
name: config-backup-seafile
items:
- key: config.yml
path: config.yml
---
apiVersion: v1
kind: Service
metadata:
name: backup-seafile-service
namespace: seafile
spec:
selector:
app: backup-seafile
ports:
- protocol: TCP
port: 9027
targetPort: 9027
type: ClusterIP