Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
MetaGer Keymanager
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
open-source
MetaGer Keymanager
Commits
90cd5569
Commit
90cd5569
authored
2 years ago
by
Dominik Hebeler
Browse files
Options
Downloads
Patches
Plain Diff
added cronjob and backup script
parent
e333f3d0
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#7293
failed
2 years ago
Stage: build
Stage: deploy
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
chart/templates/backups.yaml
+54
-0
54 additions, 0 deletions
chart/templates/backups.yaml
pass/bin/do_backup
+5
-0
5 additions, 0 deletions
pass/bin/do_backup
with
59 additions
and
0 deletions
chart/templates/backups.yaml
0 → 100644
+
54
−
0
View file @
90cd5569
apiVersion
:
batch/v1
kind
:
CronJob
metadata
:
creationTimestamp
:
null
name
:
{{
include "chart.fullname" .
}}
-backup
spec
:
jobTemplate
:
metadata
:
creationTimestamp
:
null
name
:
{{
include "chart.fullname" .
}}
-backup
labels
:
{{
- include "chart.selectorLabels" . | nindent 6
}}
spec
:
template
:
metadata
:
creationTimestamp
:
null
labels
:
{{
- include "chart.selectorLabels" . | nindent 10
}}
spec
:
{{
- with .Values.imagePullSecrets
}}
imagePullSecrets
:
{{
- toYaml . | nindent 12
}}
{{
- end
}}
securityContext
:
{{
- toYaml .Values.podSecurityContext | nindent 12
}}
volumes
:
-
name
:
order-data
persistentVolumeClaim
:
claimName
:
order-data
{{
- if .Values.application.secretName
}}
-
name
:
application-secret
secret
:
secretName
:
{{
.Values.application.secretName
}}
defaultMode
:
420
{{
- end
}}
containers
:
-
image
:
"
{{
.Values.image.repository
}}:{{
.Values.image.tag
|
default
.Chart.AppVersion
}}"
imagePullPolicy
:
{{
.Values.image.pullPolicy
}}
name
:
{{
.Chart.Name
}}
-backup
command
:
[
"
/bin/bash"
]
args
:
[
"
-c"
,
"
bin/do_backup"
]
securityContext
:
{{
- toYaml .Values.securityContext | nindent 14
}}
volumeMounts
:
-
name
:
order-data
mountPath
:
/data
{{
- if .Values.application.secretName
}}
-
name
:
application-secret
readOnly
:
true
mountPath
:
/app/config/production.json
subPath
:
production.json
{{
- end
}}
restartPolicy
:
OnFailure
schedule
:
'
*/15
*
*
*
*'
\ No newline at end of file
This diff is collapsed.
Click to expand it.
pass/bin/do_backup
0 → 100644
+
5
−
0
View file @
90cd5569
#!/bin/bash
set
-e
node backup
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment