kustomize + helm now managed by argocd
This commit is contained in:
3
infrastructure/argocd/argocd-cm.patch.yaml
Normal file
3
infrastructure/argocd/argocd-cm.patch.yaml
Normal file
@@ -0,0 +1,3 @@
|
||||
- op: add
|
||||
path: /data/kustomize.buildOptions
|
||||
value: --enable-helm
|
@@ -8,7 +8,15 @@ resources:
|
||||
- ingress.yaml
|
||||
- argo-apps.application.yaml
|
||||
|
||||
|
||||
### apply patches from file
|
||||
patchesStrategicMerge:
|
||||
- known-hosts.configmap.yaml
|
||||
|
||||
|
||||
## patch to add entries from argocd.configmap.yaml to the configmap
|
||||
patches:
|
||||
- target:
|
||||
kind: ConfigMap
|
||||
name: argocd-cm
|
||||
namespace: argocd
|
||||
path: argocd-cm.patch.yaml
|
||||
|
32
infrastructure/backup/base/db-backup.cronjob.yaml
Normal file
32
infrastructure/backup/base/db-backup.cronjob.yaml
Normal file
@@ -0,0 +1,32 @@
|
||||
apiVersion: batch/v1beta1
|
||||
kind: CronJob
|
||||
metadata:
|
||||
name: postgres-backup
|
||||
spec:
|
||||
# Backup the database every day at 2AM
|
||||
schedule: "0 2 * * *"
|
||||
jobTemplate:
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: postgres-backup
|
||||
image: postgres:12
|
||||
command: ["/bin/sh"]
|
||||
args: ["-c", 'echo "$PGPASS" > /root/.pgpass && chmod 600 /root/.pgpass && pg_dump -U postgres_admin -h postgres test_database > /var/backups/backup-$(date +"%m-%d-%Y-%H-%M").sql']
|
||||
env:
|
||||
- name: PGPASS
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: pgpass
|
||||
key: pgpass
|
||||
volumeMounts:
|
||||
- mountPath: /var/backups
|
||||
name: postgres-storage
|
||||
restartPolicy: Never
|
||||
volumes:
|
||||
- name: postgres-storage
|
||||
hostPath:
|
||||
# Ensure the file directory is created.
|
||||
path: /var/volumes/postgres-backups
|
||||
type: DirectoryOrCreate
|
Reference in New Issue
Block a user