Created
February 8, 2022 17:06
-
-
Save maxnowack/fd8ae99dcb86a3e58b07ee6452d8b0e7 to your computer and use it in GitHub Desktop.
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
--- | |
kind: ConfigMap | |
apiVersion: v1 | |
metadata: | |
labels: | |
role: mongo-backup | |
name: mgob-config | |
data: | |
database-backups.yml: | | |
scheduler: | |
cron: "0 * * * *" | |
retention: 1 | |
timeout: 45 | |
target: | |
host: "mongo-0.mongo.production.svc.cluster.local,mongo-1.mongo.production.svc.cluster.local,mongo-2.mongo.production.svc.cluster.local" | |
port: 27017 | |
database: "data" | |
username: "user" | |
password: "pass" | |
params: "--readPreference=secondary --authenticationDatabase admin" | |
slack: | |
url: https://hooks.slack.com/services/.../ | |
channel: backups | |
username: mgob | |
warnOnly: true | |
sftp: | |
host: host | |
port: 22 | |
username: user | |
password: pass | |
dir: backups | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: mgob | |
labels: | |
name: mgob | |
spec: | |
ports: | |
- port: 8090 | |
targetPort: 8090 | |
clusterIP: None | |
selector: | |
role: mongo-backup | |
--- | |
apiVersion: apps/v1 | |
kind: StatefulSet | |
metadata: | |
name: mgob | |
spec: | |
serviceName: "mgob" | |
replicas: 1 | |
selector: | |
matchLabels: | |
role: mongo-backup | |
template: | |
metadata: | |
labels: | |
role: mongo-backup | |
spec: | |
containers: | |
- name: mgobd | |
image: stefanprodan/mgob:latest | |
imagePullPolicy: Always | |
ports: | |
- containerPort: 8090 | |
protocol: TCP | |
volumeMounts: | |
- mountPath: /config/database-backups.yml | |
name: mgob-config | |
subPath: database-backups.yml | |
volumes: | |
- name: mgob-config | |
configMap: | |
name: mgob-config | |
items: | |
- key: database-backups.yml | |
path: database-backups.yml |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment