This repository has been archived by the owner on Nov 3, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 152
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #120 from endrec/master
Update chart for 2020
- Loading branch information
Showing
11 changed files
with
439 additions
and
122 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,11 @@ | ||
apiVersion: v1 | ||
description: MongoDB dockerized backup agent. Runs schedule backups with retention, S3 & SFTP upload, notifications, instrumentation with Prometheus and more. | ||
description: | | ||
MongoDB dockerized backup agent. | ||
Runs scheduled backups with retention, S3 & SFTP upload, notifications, instrumentation with Prometheus and more. | ||
name: mgob | ||
version: 0.11.0 | ||
version: 1.0.0 | ||
sources: | ||
- https://github.com/stefanprodan/mgob | ||
maintainers: | ||
- name: endrec | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2017 Stefan Prodan | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
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,39 @@ | ||
# mgob | ||
|
||
![Version: 1.0.0](https://img.shields.io/badge/Version-1.0.0-informational?style=flat-square) | ||
|
||
MongoDB dockerized backup agent. | ||
Runs scheduled backups with retention, S3 & SFTP upload, notifications, instrumentation with Prometheus and more. | ||
|
||
## Maintainers | ||
|
||
| Name | Email | Url | | ||
| ---- | ------ | --- | | ||
| endrec | [email protected] | | | ||
|
||
## Source Code | ||
|
||
* <https://github.com/stefanprodan/mgob> | ||
|
||
## Values | ||
|
||
| Key | Type | Default | Description | | ||
|-----|------|---------|-------------| | ||
| config | object | `{}` | Backup plans. For details, see [values.yaml](values.yaml) | | ||
| env | object | `{}` | | | ||
| image.pullPolicy | string | `"IfNotPresent"` | Image pull policy | | ||
| image.repository | string | `"stefanprodan/mgob"` | Image repo | | ||
| image.tag | float | `1.1` | Image tag | | ||
| replicaCount | int | `1` | Number of replicas | | ||
| resources | object | `{"limits":{"cpu":"100m","memory":"128Mi"},"requests":{"cpu":"100m","memory":"128Mi"}}` | Resource requests and limits ref: http://kubernetes.io/docs/user-guide/compute-resources/ | | ||
| secret | object | `{}` | Secret(s) to mount. For details, see [values.yaml](values.yaml) | | ||
| service.externalPort | int | `8090` | Port to access the service | | ||
| service.internalPort | int | `8090` | Port to connect to in pod | | ||
| service.name | string | `"mgob"` | Service name | | ||
| serviceAccount.annotations | object | `{}` | Annotations to add on service account | | ||
| serviceAccount.create | bool | `true` | If false, default service account will be used | | ||
| storage.longTerm | object | `{"accessMode":"ReadWriteOnce","name":"mgob-storage","size":"10Gi","storageClass":"gp2"}` | Persistent volume for backups, see `config.retention` | | ||
| storage.tmp | object | `{"accessMode":"ReadWriteOnce","name":"mgob-tmp","size":"3Gi","storageClass":"gp2"}` | Persistent volume for temporary files | | ||
|
||
---------------------------------------------- | ||
Autogenerated from chart metadata using [helm-docs v1.3.0](https://github.com/norwoodj/helm-docs/releases/v1.3.0) |
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,123 @@ | ||
# Default values for mgob. | ||
# This is a YAML-formatted file. | ||
# Declare variables to be passed into your templates. | ||
# Note that two backup plans are provided as templates - they contain dummy values and should be changed before | ||
# attempting to apply the chart to your cluster. | ||
replicaCount: 1 | ||
image: | ||
repository: stefanprodan/mgob | ||
pullPolicy: IfNotPresent | ||
tag: 1.1 | ||
service: | ||
name: mgob | ||
externalPort: 8090 | ||
internalPort: 8090 | ||
serviceAccount: | ||
create: true | ||
annotations: | ||
eks.amazonaws.com/role-arn: iamArn | ||
resources: | ||
limits: | ||
cpu: 100m | ||
memory: 128Mi | ||
requests: | ||
cpu: 100m | ||
memory: 128Mi | ||
storage: | ||
longTerm: | ||
accessMode: "ReadWriteOnce" | ||
# storageClass: "gp2" # Note: "gp2" is for AWS. Use the storage class for your cloud provider. | ||
name: "mgob-storage" | ||
size: 10Mi | ||
tmp: | ||
accessMode: "ReadWriteOnce" | ||
# storageClass: "gp2" # Note: "gp2" is for AWS. Use the storage class for your cloud provider. | ||
name: "mgob-tmp" | ||
size: 10Mi | ||
config: | ||
# Add each plan as per below. | ||
the-first-database.yml: | ||
# run every day at 6:00 and 18:00 UTC | ||
schedule: "0 6,18 */1 * *" | ||
# number of backups to keep locally | ||
retention: 14 | ||
# backup operation timeout in minutes | ||
timeout: 60 | ||
target: | ||
# mongod IP or host name | ||
host: "172.18.7.21" | ||
# mongodb port | ||
port: 27017 | ||
# mongodb database name, leave blank to backup all databases | ||
database: "test" | ||
# leave blank if auth is not enabled | ||
username: "admin" | ||
password: "secret" | ||
# add custom params to mongodump (eg. Auth or SSL support), leave blank if not needed | ||
params: "--ssl --authenticationDatabase admin" | ||
# S3 upload (optional) | ||
s3: | ||
url: "https://play.minio.io:9000" | ||
bucket: "backup" | ||
accessKey: "Q3AM3UQ867SPQQA43P2F" | ||
secretKey: "zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG" | ||
# For Minio and AWS use S3v4 for GCP use S3v2 | ||
api: "S3v4" | ||
# GCloud upload (optional) | ||
gcloud: | ||
bucket: "backup" | ||
keyFilePath: /path/to/service-account.json | ||
# Azure blob storage upload (optional) | ||
azure: | ||
containerName: "backup" | ||
connectionString: "DefaultEndpointsProtocol=https;AccountName=...;AccountKey=...;EndpointSuffix=core.windows.net" | ||
# Rclone upload (optional) | ||
rclone: | ||
bucket: "my-backup-bucket" | ||
# See https://rclone.org/docs/ for details on how to configure rclone | ||
configFilePath: /etc/rclone.conf | ||
configSection: "myrclonesection" | ||
# SFTP upload (optional) | ||
sftp: | ||
host: sftp.company.com | ||
port: 2022 | ||
username: user | ||
password: secret | ||
# you can also specify path to a private key and a passphrase | ||
private_key: /etc/ssh/ssh_host_rsa_key | ||
passphrase: secretpassphrase | ||
# dir must exist on the SFTP server | ||
dir: backup | ||
# Email notifications (optional) | ||
smtp: | ||
server: smtp.company.com | ||
port: 465 | ||
username: user | ||
password: secret | ||
from: [email protected] | ||
to: | ||
- [email protected] | ||
- [email protected] | ||
# Slack notifications (optional) | ||
slack: | ||
url: https://hooks.slack.com/services/xxxx/xxx/xx | ||
channel: devops-alerts | ||
username: mgob | ||
# 'true' to notify only on failures | ||
warnOnly: false | ||
secret: {} | ||
## You can either insert your secret values as part of helm values, or refer externally created secrets. | ||
# - name: gcp-example-secret-name | ||
# - name: gcp-example-secret-name-with-values | ||
# data: | ||
# service-account.json: | | ||
# { | ||
# "type": "service_account", | ||
# "project_id": "your-gcp-project-id", | ||
# "private_key_id": "12345678901234567890", | ||
# "private_key": "-----BEGIN PRIVATE KEY-----\n...........\n-----END PRIVATE KEY-----\n", | ||
# ... | ||
# } | ||
env: {} | ||
# - name: HTTPS_PROXY | ||
# value: "http://localhost:3128" |
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 |
---|---|---|
@@ -1,8 +1,46 @@ | ||
kind: ConfigMap | ||
apiVersion: v1 | ||
metadata: | ||
name: {{ template "mgob.fullname" . }}-config | ||
labels: | ||
role: backup | ||
name: "mgob-config" | ||
{{- include "mgob.labels" . | nindent 4 }} | ||
data: | ||
{{ toYaml .Values.configMap.data | indent 2 }} | ||
{{- range $name,$value := .Values.config }} | ||
{{ $name | quote }}: |- | ||
scheduler: | ||
cron: {{ $value.schedule | quote }} | ||
retention: {{ $value.retention }} | ||
timeout: {{ $value.timeout }} | ||
{{- with $value.target }} | ||
target: | ||
{{ toYaml . | nindent 6 | trim }} | ||
{{- end }} | ||
{{- with $value.s3 }} | ||
s3: | ||
{{ toYaml . | nindent 6 | trim }} | ||
{{- end }} | ||
{{- with $value.gcloud }} | ||
gcloud: | ||
{{ toYaml . | nindent 6 | trim }} | ||
{{- end }} | ||
{{- with $value.azure }} | ||
azure: | ||
{{ toYaml . | nindent 6 | trim }} | ||
{{- end }} | ||
{{- with $value.rclone }} | ||
rclone: | ||
{{ toYaml . | nindent 6 | trim }} | ||
{{- end }} | ||
{{- with $value.sftp }} | ||
sftp: | ||
{{ toYaml . | nindent 6 | trim }} | ||
{{- end }} | ||
{{- with $value.smtp }} | ||
smtp: | ||
{{ toYaml . | nindent 6 | trim }} | ||
{{- end }} | ||
{{- with $value.slack }} | ||
slack: | ||
{{ toYaml . | nindent 6 | trim }} | ||
{{- end }} | ||
{{- 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
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,12 @@ | ||
{{- if .Values.serviceAccount.create -}} | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
labels: | ||
{{- include "mgob.labels" . | nindent 4 }} | ||
name: {{ template "mgob.serviceAccountName" . }} | ||
{{- with .Values.serviceAccount.annotations }} | ||
annotations: | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
{{- end -}} |
Oops, something went wrong.