From 95769266d5c3dd1826fae6d677a646119e028ff4 Mon Sep 17 00:00:00 2001 From: cloudymax Date: Fri, 20 Dec 2024 16:15:51 +0100 Subject: [PATCH] postgres and swfs up --- .../postgres_argocd_appset.yaml | 13 ++- demo/argo-workflows/s3_pvc_appset.yaml | 84 +++++++++++++++++++ 2 files changed, 90 insertions(+), 7 deletions(-) create mode 100644 demo/argo-workflows/s3_pvc_appset.yaml diff --git a/demo/argo-workflows/postgres_argocd_appset.yaml b/demo/argo-workflows/postgres_argocd_appset.yaml index 2fedf4224..cc7c02649 100644 --- a/demo/argo-workflows/postgres_argocd_appset.yaml +++ b/demo/argo-workflows/postgres_argocd_appset.yaml @@ -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 @@ -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 diff --git a/demo/argo-workflows/s3_pvc_appset.yaml b/demo/argo-workflows/s3_pvc_appset.yaml new file mode 100644 index 000000000..cd0c08e2a --- /dev/null +++ b/demo/argo-workflows/s3_pvc_appset.yaml @@ -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 * * *"