Skip to content

Commit

Permalink
postgres and swfs up
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudymax committed Dec 20, 2024
1 parent 3b93a53 commit 9576926
Show file tree
Hide file tree
Showing 2 changed files with 90 additions and 7 deletions.
13 changes: 6 additions & 7 deletions demo/argo-workflows/postgres_argocd_appset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ spec:
annotations:
argocd.argoproj.io/sync-wave: "3"
spec:
project: argocd
project: argo-cd
destination:
server: "https://kubernetes.default.svc"
namespace: argocd
Expand Down Expand Up @@ -70,16 +70,15 @@ spec:

certificates:
server:
enabled: true
generate: true
enabled: false
generate: false
client:
enabled: true
generate: true
enabled: false
generate: false
user:
enabled: true
enabled: false
username:
- workflows
- postgres

scheduledBackup:
name: workflows-pg-backup
Expand Down
84 changes: 84 additions & 0 deletions demo/argo-workflows/s3_pvc_appset.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
---
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: workflows-s3-pvc-app-set
namespace: argocd
annotations:
argocd.argoproj.io/sync-wave: "1"
spec:
goTemplate: true
# generator allows us to source specific values from an external k8s secret
generators:
- plugin:
configMapRef:
name: secret-var-plugin-generator
input:
parameters:
secret_vars:
- workflows_s3_provider
- workflows_s3_backup_endpoint
- workflows_s3_backup_bucket
- workflows_s3_backup_region
- workflows_s3_pvc_capacity
- workflows_pvc_backup_schedule
template:
metadata:
name: workflows-s3-pvc
annotations:
argocd.argoproj.io/sync-wave: "1"
spec:
project: argo-cd
destination:
server: "https://kubernetes.default.svc"
namespace: argocd
syncPolicy:
syncOptions:
- ApplyOutOfSyncOnly=true
automated:
prune: true
selfHeal: true
source:
repoURL: https://github.com/small-hack/argocd-apps.git
path: s3_persistence_and_backups/
targetRevision: main
helm:
valuesObject:
provider: seaweedfs
pvc_capacity: 10Gi

seaweedfs:
master_pvc: false

# not in use yet
k8up:
backup_name: "workflows-nightly-backup"

securityContext:
runAsUser: 0

# -- can be set to 's3' or 'local'
backup_type: "s3"

s3:
bucket: workflows-postgres
endpoint: s3.workflows.buildstar.online
accessKeyIDSecretRef:
name: 'workflows-s3-postgres-credentials'
key: 'accessKeyId'
optional: false
secretAccessKeySecretRef:
name: 'workflows-s3-postgres-credentials'
key: 'secretAccessKey'
optional: false

repoPasswordSecretRef:
name: 'workflows-s3-postgres-credentials'
key: 'resticRepoPassword'

prometheus_url: 'push-gateway.prometheus.svc:9091'

schedules:
backup: "0 0 0 * * *"
check: "0 2 * * *"
prune: "0 2 * * *"

0 comments on commit 9576926

Please sign in to comment.