-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split PostgreSQL / MongoDB backup chart (#3)
* Split PostgreSQL / MongoDB backup chart * Bump chart versions
- Loading branch information
Showing
20 changed files
with
108 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,6 +25,6 @@ mongodb: | |
databases: | ||
- cozy | ||
|
||
s3-backups: | ||
mongodb-s3-backup: | ||
database: | ||
password: cozy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,6 +32,6 @@ mongodb: | |
databases: | ||
- modmail | ||
|
||
s3-backups: | ||
mongodb-s3-backup: | ||
database: | ||
password: modmail |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
# Spec: https://helm.sh/docs/topics/charts/#the-chartyaml-file | ||
apiVersion: v2 | ||
name: s3-backups | ||
name: mongodb-s3-backup | ||
# This is the chart version. This version number should be incremented each time you make changes | ||
# to the chart and its templates, including the app version. | ||
# Versions are expected to follow Semantic Versioning (https://semver.org/) | ||
version: 0.2.0 | ||
version: 1.0.0 | ||
# This is the version number of the application being deployed (purely informational). | ||
appVersion: '1' | ||
description: helm chart handling Quilt's backups to an S3 | ||
description: helm chart handling Quilt's MongoDB backups to an S3 | ||
home: https://github.com/QuiltMC/quilt-helm-charts | ||
# A chart can be either an 'application' or a 'library' chart. | ||
type: application | ||
|
@@ -16,7 +16,3 @@ maintainers: | |
email: [email protected] | ||
- name: tibs | ||
email: [email protected] | ||
dependencies: | ||
- name: mongodb | ||
version: 13.16.2 | ||
repository: https://charts.bitnami.com/bitnami |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{{ if .Values.enabled }} | ||
apiVersion: batch/v1 | ||
kind: CronJob | ||
metadata: | ||
name: {{ .Release.Name }}-mongodb-backup | ||
spec: | ||
schedule: "0 0 * * *" | ||
jobTemplate: | ||
spec: | ||
ttlSecondsAfterFinished: 3600 | ||
template: | ||
spec: | ||
containers: | ||
- name: backup | ||
image: {{ .Values.image }} | ||
imagePullPolicy: IfNotPresent | ||
command: ["/bin/sh", "-c"] | ||
args: | ||
- > | ||
EXT=gz && | ||
mongodump -h="{{ tpl .Values.database.host . }}" -u="{{ .Values.database.username | default "root" }}" -p="{{ .Values.database.password }}" --gzip --archive="backup.$EXT" && | ||
aws --endpoint {{ .Values.endpoint }} s3 cp backup.gz s3://quilt-backups/{{ .Release.Name }}/`date -I`.$EXT | ||
envFrom: | ||
- secretRef: | ||
# should contain AWS credentials environment variables | ||
name: {{ .Values.awsSecretName }} | ||
restartPolicy: OnFailure | ||
{{ end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
enabled: true | ||
database: | ||
host: '{{ .Release.Name }}-mongodb' | ||
username: '' | ||
password: '' | ||
awsSecretName: 'quilt-backups' | ||
endpoint: 'https://s3.eu-central-003.backblazeb2.com' | ||
image: 'ghcr.io/quiltmc/mongodb-s3-backup:4b26b78' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Spec: https://helm.sh/docs/topics/charts/#the-chartyaml-file | ||
apiVersion: v2 | ||
name: postgresql-s3-backup | ||
# This is the chart version. This version number should be incremented each time you make changes | ||
# to the chart and its templates, including the app version. | ||
# Versions are expected to follow Semantic Versioning (https://semver.org/) | ||
version: 1.0.0 | ||
# This is the version number of the application being deployed (purely informational). | ||
appVersion: '1' | ||
description: Helm chart handling Quilt's PostgreSQL backups to an S3 | ||
home: https://github.com/QuiltMC/quilt-helm-charts | ||
# A chart can be either an 'application' or a 'library' chart. | ||
type: application | ||
maintainers: | ||
- name: Pyrofab | ||
email: [email protected] | ||
- name: tibs | ||
email: [email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
enabled: true | ||
database: | ||
host: '{{ .Release.Name }}-postgresql' | ||
username: '' | ||
password: '' | ||
dbName: | ||
awsSecretName: 'quilt-backups' | ||
endpoint: 'https://s3.eu-central-003.backblazeb2.com' | ||
image: 'ghcr.io/quiltmc/postgresql-s3-backup:4b26b78' |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters