Skip to content

Commit

Permalink
Add mongodb 5.0.2 backup tasks (#200)
Browse files Browse the repository at this point in the history
Signed-off-by: Mohammad Fahim Abrar <fahimabrar@appscode.com>
  • Loading branch information
faem authored Sep 9, 2021
1 parent 37eec67 commit 01ecae5
Show file tree
Hide file tree
Showing 9 changed files with 244 additions and 1 deletion.
3 changes: 2 additions & 1 deletion catalog/catalog.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@
"4.1.7-v11",
"4.1.13-v11",
"4.2.3-v11",
"4.4.6-v2"
"4.4.6-v2",
"5.0.2"
]
},
{
Expand Down
38 changes: 38 additions & 0 deletions catalog/raw/mongodb/5.0.2/mongodb-backup-function.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
apiVersion: stash.appscode.com/v1beta1
kind: Function
metadata:
name: mongodb-backup-5.0.2
spec:
args:
- backup-mongo
- --provider=${REPOSITORY_PROVIDER:=}
- --bucket=${REPOSITORY_BUCKET:=}
- --endpoint=${REPOSITORY_ENDPOINT:=}
- --region=${REPOSITORY_REGION:=}
- --path=${REPOSITORY_PREFIX:=}
- --secret-dir=/etc/repository/secret
- --scratch-dir=/tmp
- --enable-cache=${ENABLE_CACHE:=true}
- --max-connections=${MAX_CONNECTIONS:=0}
- --hostname=${HOSTNAME:=}
- --mongo-args=${args:=}
- --max-concurrency=${MAX_CONCURRENCY:=3}
- --wait-timeout=${waitTimeout:=300}
- --namespace=${NAMESPACE:=default}
- --appbinding=${TARGET_NAME:=}
- --backupsession=${BACKUP_SESSION:=}
- --retention-keep-last=${RETENTION_KEEP_LAST:=0}
- --retention-keep-hourly=${RETENTION_KEEP_HOURLY:=0}
- --retention-keep-daily=${RETENTION_KEEP_DAILY:=0}
- --retention-keep-weekly=${RETENTION_KEEP_WEEKLY:=0}
- --retention-keep-monthly=${RETENTION_KEEP_MONTHLY:=0}
- --retention-keep-yearly=${RETENTION_KEEP_YEARLY:=0}
- --retention-keep-tags=${RETENTION_KEEP_TAGS:=}
- --retention-prune=${RETENTION_PRUNE:=false}
- --retention-dry-run=${RETENTION_DRY_RUN:=false}
- --output-dir=${outputDir:=}
- --license-apiservice=${LICENSE_APISERVICE:=}
image: stashed/stash-mongodb:5.0.2
volumeMounts:
- mountPath: /etc/repository/secret
name: ${secretVolume}
22 changes: 22 additions & 0 deletions catalog/raw/mongodb/5.0.2/mongodb-backup-task.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
apiVersion: stash.appscode.com/v1beta1
kind: Task
metadata:
name: mongodb-backup-5.0.2
spec:
steps:
- name: mongodb-backup-5.0.2
params:
- name: outputDir
value: /tmp/output
- name: secretVolume
value: secret-volume
- name: update-status
params:
- name: outputDir
value: /tmp/output
- name: secretVolume
value: secret-volume
volumes:
- name: secret-volume
secret:
secretName: ${REPOSITORY_SECRET_NAME}
31 changes: 31 additions & 0 deletions catalog/raw/mongodb/5.0.2/mongodb-restore-function.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
apiVersion: stash.appscode.com/v1beta1
kind: Function
metadata:
name: mongodb-restore-5.0.2
spec:
args:
- restore-mongo
- --provider=${REPOSITORY_PROVIDER:=}
- --bucket=${REPOSITORY_BUCKET:=}
- --endpoint=${REPOSITORY_ENDPOINT:=}
- --region=${REPOSITORY_REGION:=}
- --path=${REPOSITORY_PREFIX:=}
- --secret-dir=/etc/repository/secret
- --scratch-dir=/tmp
- --enable-cache=false
- --max-connections=${MAX_CONNECTIONS:=0}
- --hostname=${HOSTNAME:=}
- --source-hostname=${SOURCE_HOSTNAME:=}
- --mongo-args=${args:=}
- --max-concurrency=${MAX_CONCURRENCY:=3}
- --wait-timeout=${waitTimeout:=300}
- --namespace=${NAMESPACE:=default}
- --appbinding=${TARGET_NAME:=}
- --restoresession=${RESTORE_SESSION:=}
- --snapshot=${RESTORE_SNAPSHOTS:=}
- --output-dir=${outputDir:=}
- --license-apiservice=${LICENSE_APISERVICE:=}
image: stashed/stash-mongodb:5.0.2
volumeMounts:
- mountPath: /etc/repository/secret
name: ${secretVolume}
22 changes: 22 additions & 0 deletions catalog/raw/mongodb/5.0.2/mongodb-restore-task.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
apiVersion: stash.appscode.com/v1beta1
kind: Task
metadata:
name: mongodb-restore-5.0.2
spec:
steps:
- name: mongodb-restore-5.0.2
params:
- name: outputDir
value: /tmp/output
- name: secretVolume
value: secret-volume
- name: update-status
params:
- name: outputDir
value: /tmp/output
- name: secretVolume
value: secret-volume
volumes:
- name: secret-volume
secret:
secretName: ${REPOSITORY_SECRET_NAME}
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{{ if .Values.mongodb.enabled }}
apiVersion: stash.appscode.com/v1beta1
kind: Function
metadata:
name: 'mongodb-backup-5.0.2'
labels:
{{- include "stash-catalog.labels" . | nindent 4 }}
spec:
args:
- backup-mongo
- --provider=${REPOSITORY_PROVIDER:=}
- --bucket=${REPOSITORY_BUCKET:=}
- --endpoint=${REPOSITORY_ENDPOINT:=}
- --region=${REPOSITORY_REGION:=}
- --path=${REPOSITORY_PREFIX:=}
- --secret-dir=/etc/repository/secret
- --scratch-dir=/tmp
- --enable-cache=${ENABLE_CACHE:=true}
- --max-connections=${MAX_CONNECTIONS:=0}
- --hostname=${HOSTNAME:=}
- --mongo-args=${args:={{ .Values.mongodb.backup.args }}}
- --max-concurrency=${MAX_CONCURRENCY:={{ .Values.mongodb.maxConcurrency}}}
- --wait-timeout=${waitTimeout:={{ .Values.waitTimeout}}}
- --namespace=${NAMESPACE:=default}
- --appbinding=${TARGET_NAME:=}
- --backupsession=${BACKUP_SESSION:=}
- --retention-keep-last=${RETENTION_KEEP_LAST:=0}
- --retention-keep-hourly=${RETENTION_KEEP_HOURLY:=0}
- --retention-keep-daily=${RETENTION_KEEP_DAILY:=0}
- --retention-keep-weekly=${RETENTION_KEEP_WEEKLY:=0}
- --retention-keep-monthly=${RETENTION_KEEP_MONTHLY:=0}
- --retention-keep-yearly=${RETENTION_KEEP_YEARLY:=0}
- --retention-keep-tags=${RETENTION_KEEP_TAGS:=}
- --retention-prune=${RETENTION_PRUNE:=false}
- --retention-dry-run=${RETENTION_DRY_RUN:=false}
- --output-dir=${outputDir:=}
- --license-apiservice=${LICENSE_APISERVICE:=}
image: '{{ include "catalog.registry" . }}/stash-mongodb:5.0.2'
volumeMounts:
- mountPath: /etc/repository/secret
name: ${secretVolume}
{{ end }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{{ if .Values.mongodb.enabled }}
apiVersion: stash.appscode.com/v1beta1
kind: Task
metadata:
name: 'mongodb-backup-5.0.2'
labels:
{{- include "stash-catalog.labels" . | nindent 4 }}
spec:
steps:
- name: mongodb-backup-5.0.2
params:
- name: outputDir
value: /tmp/output
- name: secretVolume
value: secret-volume
- name: update-status
params:
- name: outputDir
value: /tmp/output
- name: secretVolume
value: secret-volume
volumes:
- name: secret-volume
secret:
secretName: ${REPOSITORY_SECRET_NAME}
{{ end }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{{ if .Values.mongodb.enabled }}
apiVersion: stash.appscode.com/v1beta1
kind: Function
metadata:
name: 'mongodb-restore-5.0.2'
labels:
{{- include "stash-catalog.labels" . | nindent 4 }}
spec:
args:
- restore-mongo
- --provider=${REPOSITORY_PROVIDER:=}
- --bucket=${REPOSITORY_BUCKET:=}
- --endpoint=${REPOSITORY_ENDPOINT:=}
- --region=${REPOSITORY_REGION:=}
- --path=${REPOSITORY_PREFIX:=}
- --secret-dir=/etc/repository/secret
- --scratch-dir=/tmp
- --enable-cache=false
- --max-connections=${MAX_CONNECTIONS:=0}
- --hostname=${HOSTNAME:=}
- --source-hostname=${SOURCE_HOSTNAME:=}
- --mongo-args=${args:={{ .Values.mongodb.restore.args }}}
- --max-concurrency=${MAX_CONCURRENCY:={{ .Values.mongodb.maxConcurrency}}}
- --wait-timeout=${waitTimeout:={{ .Values.waitTimeout}}}
- --namespace=${NAMESPACE:=default}
- --appbinding=${TARGET_NAME:=}
- --restoresession=${RESTORE_SESSION:=}
- --snapshot=${RESTORE_SNAPSHOTS:=}
- --output-dir=${outputDir:=}
- --license-apiservice=${LICENSE_APISERVICE:=}
image: '{{ include "catalog.registry" . }}/stash-mongodb:5.0.2'
volumeMounts:
- mountPath: /etc/repository/secret
name: ${secretVolume}
{{ end }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{{ if .Values.mongodb.enabled }}
apiVersion: stash.appscode.com/v1beta1
kind: Task
metadata:
name: 'mongodb-restore-5.0.2'
labels:
{{- include "stash-catalog.labels" . | nindent 4 }}
spec:
steps:
- name: mongodb-restore-5.0.2
params:
- name: outputDir
value: /tmp/output
- name: secretVolume
value: secret-volume
- name: update-status
params:
- name: outputDir
value: /tmp/output
- name: secretVolume
value: secret-volume
volumes:
- name: secret-volume
secret:
secretName: ${REPOSITORY_SECRET_NAME}
{{ end }}

0 comments on commit 01ecae5

Please sign in to comment.