Skip to content

Commit

Permalink
feat: Add authentik to psql backups and DR
Browse files Browse the repository at this point in the history
Signed-off-by: Scotte Zinn <[email protected]>
  • Loading branch information
szinn committed Jan 15, 2025
1 parent 74addd4 commit 172adf2
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
32 changes: 32 additions & 0 deletions .taskfiles/postgres/Taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ tasks:
down_all:
desc: Turn down all applications using Postgres
cmds:
- task: _down
vars:
NAMESPACE: security
HELMRELEASE: authentik
KUSTOMIZATION: authentik
SERVICES: deployment/authentik-server deployment/authentik-worker
- task: _down
vars:
NAMESPACE: self-hosted
Expand Down Expand Up @@ -111,6 +117,12 @@ tasks:
up_all:
desc: Turn down all applications using Postgres
cmds:
- task: _up
vars:
NAMESPACE: security
HELMRELEASE: authentik
KUSTOMIZATION: authentik
SERVICES: deployment/authentik-server deployment/authentik-worker
- task: _up
vars:
NAMESPACE: self-hosted
Expand Down Expand Up @@ -203,6 +215,26 @@ tasks:
SERVICES: deployment/grafana
REPLICAS: 1

restore_authentik:
desc: Restore authentik database
cmds:
- task: _down
vars:
NAMESPACE: security
HELMRELEASE: authentik
KUSTOMIZATION: authentik
SERVICES: deployment/authentik-server deployment/authentik-worker
- task: _restore_db
vars:
DATABASE: authentik
- task: _up
vars:
NAMESPACE: security
HELMRELEASE: authentik
KUSTOMIZATION: authentik
SERVICES: deployment/authentik-server deployment/authentik-worker
REPLICAS: 1

restore_dmarc:
desc: Restore dmarc database
cmds:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ spec:
- name: POSTGRES_HOST
value: postgres-ro.dbms.svc.cluster.local
- name: POSTGRES_DB
value: "dmarc,shlink,teslamate,wikijs,prowlarr_main,lidarr_main,radarr_main,radarr_4k_main,sonarr_main"
value: "authentik,dmarc,shlink,teslamate,wikijs,prowlarr_main,lidarr_main,radarr_main,radarr_4k_main,sonarr_main"
- name: BACKUP_KEEP_DAYS
value: "7"
- name: BACKUP_KEEP_WEEKS
Expand Down

0 comments on commit 172adf2

Please sign in to comment.