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