Skip to content

Backup service

Andrey Sobolev edited this page Dec 17, 2024 · 2 revisions

Backup service example configuration

apiVersion: apps/v1
kind: Deployment
metadata:
  name: backup
spec:
  replicas: 1
  selector:
    matchLabels:
      app: backup
  template:
    metadata:
      labels:
        app: backup
    spec:
      containers:
        - name: app
          image: hardcoreeng/backup:latest
          command: ["node", "--max-old-space-size=2048", "bundle.js"]
          resources:
            limits:
              memory: '2024M'
          imagePullPolicy: Always
          env:
            - name: ACCOUNTS_URL
              value: http://account
            - name: SECRET
              valueFrom:
                secretKeyRef:
                  name: anticrm-secret
                  key: serverSecret
            - name: STATS_URL
              value: http://stats-service
            - name: BUCKET_NAME
              value: backups
            - name: INTERVAL
              value: '43200'
            - name: MONGO_URL
              valueFrom:
                configMapKeyRef:
                  name: anticrm-config
                  key: mongoDbUrl
            - name: DB_URL
              valueFrom:
                configMapKeyRef:
                  name: anticrm-config
                  key: mongoDbUrl
            - name: MONGO_OPTIONS
              value: '{"maxPoolSize": 1, "appName": "backup"}'
            - name: STORAGE
              valueFrom:
                secretKeyRef:
                  name: anticrm-secret
                  key: backupConfig
            - name: WORKSPACE_STORAGE
              valueFrom:
                secretKeyRef:
                  name: anticrm-secret
                  key: storageConfig

And configuration variables:

  • STORAGE=s3|https://my.s3-storage.com?accessKey=mykey&secretKey=myValue
  • WORKSPACE_STORAGE=minio|minio?accessKey=minioadmin&secretKey=minioadmin

They need to be adjusted for every individual setup.

Clone this wiki locally