Skip to content

Commit

Permalink
added website NS and backup
Browse files Browse the repository at this point in the history
  • Loading branch information
rgaudin committed Jan 7, 2025
1 parent 094df38 commit 7a2bb69
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
38 changes: 38 additions & 0 deletions website/db-backup.cronjob.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
apiVersion: batch/v1
kind: CronJob
metadata:
name: db-backup
namespace: website
spec:
schedule: "@daily"
successfulJobsHistoryLimit: 1
failedJobsHistoryLimit: 1
concurrencyPolicy: Forbid
jobTemplate:
spec:
backoffLimit: 2
template:
spec:
containers:
- name: borg-backup
image: ghcr.io/kiwix/borg-backup:latest
imagePullPolicy: Always
env:
# not secret, dedicated read-only user, only reachable on localhost (cyon) and whitelisted IP
- name: "DATABASES"
value: "mysql://kiwixorg_backup:B9GRXwd8([email protected]:3306/kiwixorg_web2023"
- name: "BORGBASE_NAME"
value: "website-wordpress-db"
- name: "BITWARDEN_EMAIL"
value: "[email protected]"
envFrom:
- secretRef:
name: backup-credentials
command: ["single-backup"]
resources:
requests:
cpu: 200m
memory: 384Mi
restartPolicy: Never
nodeSelector:
k8s.kiwix.org/role: "services"
7 changes: 7 additions & 0 deletions website/website.ns.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: v1
kind: Namespace
metadata:
name: website
annotations:
k8s.kiwix.org/client: https://github.com/kelson42
k8s.kiwix.org/source_repo: https://github.com/kiwix/web

0 comments on commit 7a2bb69

Please sign in to comment.