Skip to content

Commit b3d902b

Browse files
Add support for mongodb 5.0.15 backup-restore addon (#311)
Signed-off-by: Arnob Kumar Saha <arnob@appscode.com>
1 parent 7bd860c commit b3d902b

File tree

9 files changed

+211
-0
lines changed

9 files changed

+211
-0
lines changed

catalog/catalog.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
"4.2.3-v26",
5252
"4.4.6-v17",
5353
"5.0.3-v14",
54+
"5.0.15-v1",
5455
"6.0.5-v2"
5556
]
5657
},
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
apiVersion: stash.appscode.com/v1beta1
2+
kind: Function
3+
metadata:
4+
name: mongodb-backup-5.0.15
5+
spec:
6+
args:
7+
- backup-mongo
8+
- --provider=${REPOSITORY_PROVIDER:=}
9+
- --bucket=${REPOSITORY_BUCKET:=}
10+
- --endpoint=${REPOSITORY_ENDPOINT:=}
11+
- --region=${REPOSITORY_REGION:=}
12+
- --path=${REPOSITORY_PREFIX:=}
13+
- --storage-secret-name=${REPOSITORY_SECRET_NAME:=}
14+
- --storage-secret-namespace=${REPOSITORY_SECRET_NAMESPACE:=}
15+
- --scratch-dir=/stash-tmp
16+
- --enable-cache=${ENABLE_CACHE:=true}
17+
- --max-connections=${MAX_CONNECTIONS:=0}
18+
- --hostname=${HOSTNAME:=}
19+
- --mongo-args=${args:=}
20+
- --max-concurrency=${MAX_CONCURRENCY:=3}
21+
- --wait-timeout=${waitTimeout:=300}
22+
- --namespace=${NAMESPACE:=default}
23+
- --appbinding=${TARGET_NAME:=}
24+
- --appbinding-namespace=${TARGET_NAMESPACE:=}
25+
- --backupsession=${BACKUP_SESSION:=}
26+
- --retention-keep-last=${RETENTION_KEEP_LAST:=0}
27+
- --retention-keep-hourly=${RETENTION_KEEP_HOURLY:=0}
28+
- --retention-keep-daily=${RETENTION_KEEP_DAILY:=0}
29+
- --retention-keep-weekly=${RETENTION_KEEP_WEEKLY:=0}
30+
- --retention-keep-monthly=${RETENTION_KEEP_MONTHLY:=0}
31+
- --retention-keep-yearly=${RETENTION_KEEP_YEARLY:=0}
32+
- --retention-keep-tags=${RETENTION_KEEP_TAGS:=}
33+
- --retention-prune=${RETENTION_PRUNE:=false}
34+
- --retention-dry-run=${RETENTION_DRY_RUN:=false}
35+
- --output-dir=${outputDir:=}
36+
- --license-apiservice=${LICENSE_APISERVICE:=}
37+
- --authentication-database=${authenticationDatabase:=admin}
38+
image: ghcr.io/stashed/stash-mongodb:5.0.15-v1
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
apiVersion: stash.appscode.com/v1beta1
2+
kind: Task
3+
metadata:
4+
name: mongodb-backup-5.0.15
5+
spec:
6+
steps:
7+
- name: mongodb-backup-5.0.15
8+
params:
9+
- name: outputDir
10+
value: /stash-tmp/output
11+
- name: update-status
12+
params:
13+
- name: outputDir
14+
value: /stash-tmp/output
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
apiVersion: stash.appscode.com/v1beta1
2+
kind: Function
3+
metadata:
4+
name: mongodb-restore-5.0.15
5+
spec:
6+
args:
7+
- restore-mongo
8+
- --provider=${REPOSITORY_PROVIDER:=}
9+
- --bucket=${REPOSITORY_BUCKET:=}
10+
- --endpoint=${REPOSITORY_ENDPOINT:=}
11+
- --region=${REPOSITORY_REGION:=}
12+
- --path=${REPOSITORY_PREFIX:=}
13+
- --storage-secret-name=${REPOSITORY_SECRET_NAME:=}
14+
- --storage-secret-namespace=${REPOSITORY_SECRET_NAMESPACE:=}
15+
- --scratch-dir=/stash-tmp
16+
- --enable-cache=false
17+
- --max-connections=${MAX_CONNECTIONS:=0}
18+
- --hostname=${HOSTNAME:=}
19+
- --source-hostname=${SOURCE_HOSTNAME:=}
20+
- --mongo-args=${args:=}
21+
- --max-concurrency=${MAX_CONCURRENCY:=3}
22+
- --wait-timeout=${waitTimeout:=300}
23+
- --namespace=${NAMESPACE:=default}
24+
- --appbinding=${TARGET_NAME:=}
25+
- --appbinding-namespace=${TARGET_NAMESPACE:=}
26+
- --restoresession=${RESTORE_SESSION:=}
27+
- --snapshot=${RESTORE_SNAPSHOTS:=}
28+
- --output-dir=${outputDir:=}
29+
- --license-apiservice=${LICENSE_APISERVICE:=}
30+
- --authentication-database=${authenticationDatabase:=admin}
31+
image: ghcr.io/stashed/stash-mongodb:5.0.15-v1
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
apiVersion: stash.appscode.com/v1beta1
2+
kind: Task
3+
metadata:
4+
name: mongodb-restore-5.0.15
5+
spec:
6+
steps:
7+
- name: mongodb-restore-5.0.15
8+
params:
9+
- name: outputDir
10+
value: /stash-tmp/output
11+
- name: update-status
12+
params:
13+
- name: outputDir
14+
value: /stash-tmp/output
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{{ if .Values.mongodb.enabled }}
2+
apiVersion: stash.appscode.com/v1beta1
3+
kind: Function
4+
metadata:
5+
name: 'mongodb-backup-5.0.15'
6+
labels:
7+
{{- include "stash-catalog.labels" . | nindent 4 }}
8+
spec:
9+
args:
10+
- backup-mongo
11+
- --provider=${REPOSITORY_PROVIDER:=}
12+
- --bucket=${REPOSITORY_BUCKET:=}
13+
- --endpoint=${REPOSITORY_ENDPOINT:=}
14+
- --region=${REPOSITORY_REGION:=}
15+
- --path=${REPOSITORY_PREFIX:=}
16+
- --storage-secret-name=${REPOSITORY_SECRET_NAME:=}
17+
- --storage-secret-namespace=${REPOSITORY_SECRET_NAMESPACE:=}
18+
- --scratch-dir=/stash-tmp
19+
- --enable-cache=${ENABLE_CACHE:=true}
20+
- --max-connections=${MAX_CONNECTIONS:=0}
21+
- --hostname=${HOSTNAME:=}
22+
- --mongo-args=${args:={{ .Values.mongodb.backup.args }}}
23+
- --max-concurrency=${MAX_CONCURRENCY:={{ .Values.mongodb.maxConcurrency}}}
24+
- --wait-timeout=${waitTimeout:={{ .Values.waitTimeout}}}
25+
- --namespace=${NAMESPACE:=default}
26+
- --appbinding=${TARGET_NAME:=}
27+
- --appbinding-namespace=${TARGET_NAMESPACE:=}
28+
- --backupsession=${BACKUP_SESSION:=}
29+
- --retention-keep-last=${RETENTION_KEEP_LAST:=0}
30+
- --retention-keep-hourly=${RETENTION_KEEP_HOURLY:=0}
31+
- --retention-keep-daily=${RETENTION_KEEP_DAILY:=0}
32+
- --retention-keep-weekly=${RETENTION_KEEP_WEEKLY:=0}
33+
- --retention-keep-monthly=${RETENTION_KEEP_MONTHLY:=0}
34+
- --retention-keep-yearly=${RETENTION_KEEP_YEARLY:=0}
35+
- --retention-keep-tags=${RETENTION_KEEP_TAGS:=}
36+
- --retention-prune=${RETENTION_PRUNE:=false}
37+
- --retention-dry-run=${RETENTION_DRY_RUN:=false}
38+
- --output-dir=${outputDir:=}
39+
- --license-apiservice=${LICENSE_APISERVICE:=}
40+
- --authentication-database=${authenticationDatabase:=admin}
41+
image: '{{ include "catalog.registry" (merge (dict "_reg" "ghcr.io" "_repo" "stashed") .Values) }}/stash-mongodb:5.0.15-v1'
42+
{{ end }}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{{ if .Values.mongodb.enabled }}
2+
apiVersion: stash.appscode.com/v1beta1
3+
kind: Task
4+
metadata:
5+
name: 'mongodb-backup-5.0.15'
6+
labels:
7+
{{- include "stash-catalog.labels" . | nindent 4 }}
8+
spec:
9+
steps:
10+
- name: mongodb-backup-5.0.15
11+
params:
12+
- name: outputDir
13+
value: /stash-tmp/output
14+
- name: update-status
15+
params:
16+
- name: outputDir
17+
value: /stash-tmp/output
18+
{{ end }}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{{ if .Values.mongodb.enabled }}
2+
apiVersion: stash.appscode.com/v1beta1
3+
kind: Function
4+
metadata:
5+
name: 'mongodb-restore-5.0.15'
6+
labels:
7+
{{- include "stash-catalog.labels" . | nindent 4 }}
8+
spec:
9+
args:
10+
- restore-mongo
11+
- --provider=${REPOSITORY_PROVIDER:=}
12+
- --bucket=${REPOSITORY_BUCKET:=}
13+
- --endpoint=${REPOSITORY_ENDPOINT:=}
14+
- --region=${REPOSITORY_REGION:=}
15+
- --path=${REPOSITORY_PREFIX:=}
16+
- --storage-secret-name=${REPOSITORY_SECRET_NAME:=}
17+
- --storage-secret-namespace=${REPOSITORY_SECRET_NAMESPACE:=}
18+
- --scratch-dir=/stash-tmp
19+
- --enable-cache=false
20+
- --max-connections=${MAX_CONNECTIONS:=0}
21+
- --hostname=${HOSTNAME:=}
22+
- --source-hostname=${SOURCE_HOSTNAME:=}
23+
- --mongo-args=${args:={{ .Values.mongodb.restore.args }}}
24+
- --max-concurrency=${MAX_CONCURRENCY:={{ .Values.mongodb.maxConcurrency}}}
25+
- --wait-timeout=${waitTimeout:={{ .Values.waitTimeout}}}
26+
- --namespace=${NAMESPACE:=default}
27+
- --appbinding=${TARGET_NAME:=}
28+
- --appbinding-namespace=${TARGET_NAMESPACE:=}
29+
- --restoresession=${RESTORE_SESSION:=}
30+
- --snapshot=${RESTORE_SNAPSHOTS:=}
31+
- --output-dir=${outputDir:=}
32+
- --license-apiservice=${LICENSE_APISERVICE:=}
33+
- --authentication-database=${authenticationDatabase:=admin}
34+
image: '{{ include "catalog.registry" (merge (dict "_reg" "ghcr.io" "_repo" "stashed") .Values) }}/stash-mongodb:5.0.15-v1'
35+
{{ end }}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{{ if .Values.mongodb.enabled }}
2+
apiVersion: stash.appscode.com/v1beta1
3+
kind: Task
4+
metadata:
5+
name: 'mongodb-restore-5.0.15'
6+
labels:
7+
{{- include "stash-catalog.labels" . | nindent 4 }}
8+
spec:
9+
steps:
10+
- name: mongodb-restore-5.0.15
11+
params:
12+
- name: outputDir
13+
value: /stash-tmp/output
14+
- name: update-status
15+
params:
16+
- name: outputDir
17+
value: /stash-tmp/output
18+
{{ end }}

0 commit comments

Comments
 (0)