github.com/1aal/kubeblocks@v0.0.0-20231107070852-e1c03e598921/deploy/mongodb/templates/backuppolicytemplate.yaml (about)

     1  apiVersion: apps.kubeblocks.io/v1alpha1
     2  kind: BackupPolicyTemplate
     3  metadata:
     4    name: mongodb-backup-policy-template
     5    labels:
     6      clusterdefinition.kubeblocks.io/name: mongodb
     7      {{- include "mongodb.labels" . | nindent 4 }}
     8  spec:
     9    clusterDefinitionRef: mongodb
    10    backupPolicies:
    11    - componentDefRef: mongodb
    12      retentionPeriod: 7d
    13      target:
    14        role: primary
    15      backupMethods:
    16      - name: datafile
    17        snapshotVolumes: false
    18        actionSetName: mongodb-physical-backup
    19        targetVolumes:
    20          volumeMounts:
    21          - name: data
    22            mountPath: {{ .Values.dataMountPath }}
    23      - name: volume-snapshot
    24        snapshotVolumes: true
    25        actionSetName: mongodb-volumesnapshot
    26        targetVolumes:
    27          volumes:
    28          - data
    29          volumeMounts:
    30          - name: data
    31            mountPath: {{ .Values.dataMountPath }}
    32      - name: dump
    33        snapshotVolumes: false
    34        actionSetName: mongodb-dump
    35        envMapping:
    36        - key: IMAGE_TAG
    37          valueFrom:
    38            clusterVersionRef:
    39            - names: [mongodb-4.0, mongodb-4.2, mongodb-4.4]
    40              mappingValue: "4.4"
    41            - names: [mongodb-5.0, mongodb-5.0.20]
    42              mappingValue: "5.0.20"
    43            - names: [mongodb-6.0]
    44              mappingValue: "6.0"
    45      schedules:
    46      - backupMethod: datafile
    47        enabled: false
    48        cronExpression: "0 18 * * *"
    49      - backupMethod: volume-snapshot
    50        enabled: false
    51        cronExpression: "0 18 * * *"
    52      - backupMethod: dump
    53        enabled: false
    54        cronExpression: "0 18 * * *"