Files
Olares/frameworks/backup-server/config/cluster/deploy/backup_server.yaml

111 lines
2.6 KiB
YAML

{{ $backupVersion := "0.3.13" }}
{{ $backup_server_rootpath := printf "%s%s" .Values.rootPath "/rootfs/backup-server" }}
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: backup-server
namespace: {{ .Release.Namespace }}
labels:
component: velero
deploy: backup
applications.app.bytetrade.io/author: bytetrade.io
spec:
replicas: 1
strategy:
type: Recreate
selector:
matchLabels:
tier: backup-server
template:
metadata:
labels:
tier: backup-server
spec:
hostNetwork: true
dnsPolicy: ClusterFirstWithHostNet
volumes:
- name: dbdata
hostPath:
type: DirectoryOrCreate
path: {{ $backup_server_rootpath }}/data
- name: rootfs
hostPath:
path: {{ .Values.rootPath }}/rootfs
serviceAccountName: os-internal
containers:
- name: api
image: beclab/backup-server:v{{ $backupVersion }}
imagePullPolicy: IfNotPresent
command:
- /backup-server
- apiserver
resources:
requests:
cpu: 20m
memory: 50Mi
limits:
cpu: 500m
memory: 512Mi
env:
{{- range $key, $val := .Values.terminusGlobalEnvs }}
- name: {{ $key }}
value: {{ $val | quote }}
{{- end }}
- name: TERMINUS_IS_CLOUD_VERSION
value: {{ default "false" .Values.backup.is_cloud_version | quote }}
- name: ENABLE_MIDDLEWARE_BACKUP
value: "true"
ports:
- containerPort: 8082
protocol: TCP
volumeMounts:
- mountPath: /rootfs
name: rootfs
- name: controller
image: beclab/backup-server:v{{ $backupVersion }}
imagePullPolicy: IfNotPresent
securityContext:
runAsUser: 0
command:
- /backup-server
- controller
resources:
requests:
cpu: 20m
memory: 50Mi
limits:
cpu: 2
memory: 1500Mi
env:
- name: APP_RANDOM_KEY
valueFrom:
secretKeyRef:
name: app-key
key: random-key
ports:
- containerPort: 8080
protocol: TCP
- containerPort: 8081
protocol: TCP
volumeMounts:
- mountPath: /rootfs
name: rootfs
---
apiVersion: v1
kind: Service
metadata:
name: backup-server
namespace: {{ .Release.Namespace }}
spec:
ports:
- port: 8082
targetPort: 8082
protocol: TCP
selector:
tier: backup-server