From 02c8f89ace0aff8eb8450100b6a43c76bae939c4 Mon Sep 17 00:00:00 2001 From: CJ_Clippy Date: Tue, 16 Jul 2024 10:33:37 -0800 Subject: [PATCH] use bitnami postgresql --- .../postgres.yaml | 2 +- flux/apps/base/postgresql/kustomization.yaml | 6 ++++ flux/apps/base/postgresql/release.yaml | 36 +++++++++++++++++++ flux/apps/base/postgresql/repository.yaml | 8 +++++ scripts/temporal-namespaces.sh | 0 5 files changed, 51 insertions(+), 1 deletion(-) rename charts/fp/{templates => templates-staging}/postgres.yaml (96%) create mode 100644 flux/apps/base/postgresql/kustomization.yaml create mode 100644 flux/apps/base/postgresql/release.yaml create mode 100644 flux/apps/base/postgresql/repository.yaml mode change 100644 => 100755 scripts/temporal-namespaces.sh diff --git a/charts/fp/templates/postgres.yaml b/charts/fp/templates-staging/postgres.yaml similarity index 96% rename from charts/fp/templates/postgres.yaml rename to charts/fp/templates-staging/postgres.yaml index 423d957..1cd2082 100644 --- a/charts/fp/templates/postgres.yaml +++ b/charts/fp/templates-staging/postgres.yaml @@ -60,7 +60,7 @@ spec: resources: limits: cpu: 500m - memory: 1Gi + memory: 1Gi volumeMounts: - name: postgres mountPath: /data/postgres diff --git a/flux/apps/base/postgresql/kustomization.yaml b/flux/apps/base/postgresql/kustomization.yaml new file mode 100644 index 0000000..70cb764 --- /dev/null +++ b/flux/apps/base/postgresql/kustomization.yaml @@ -0,0 +1,6 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +namespace: futureporn +resources: + - release.yaml + - repository.yaml diff --git a/flux/apps/base/postgresql/release.yaml b/flux/apps/base/postgresql/release.yaml new file mode 100644 index 0000000..6bd646b --- /dev/null +++ b/flux/apps/base/postgresql/release.yaml @@ -0,0 +1,36 @@ +apiVersion: helm.toolkit.fluxcd.io/v2 +kind: HelmRelease +metadata: + namespace: futureporn + name: postgresql +spec: + releaseName: postgresql + chart: + spec: + version: "15.5.17" + chart: postgresql + sourceRef: + kind: HelmRepository + name: bitnami + interval: 5m + install: + remediation: + retries: -1 + # Default values + # https://artifacthub.io/packages/helm/bitnami/postgresql?modal=values + values: + auth: + enablePostgresUser: true + existingSecret: postgres + architecture: replication + readReplicas: + replicaCount: 3 + persistence: + size: 40Gi ## Vultr HDD minimum size + replication: + syncronousCommit: "on" + numSyncronousReplicas: 3 + applicationName: futureporn + primary: + persistence: + size: 40Gi ## Vultr HDD minimum size diff --git a/flux/apps/base/postgresql/repository.yaml b/flux/apps/base/postgresql/repository.yaml new file mode 100644 index 0000000..89d157f --- /dev/null +++ b/flux/apps/base/postgresql/repository.yaml @@ -0,0 +1,8 @@ +apiVersion: source.toolkit.fluxcd.io/v1beta2 +kind: HelmRepository +metadata: + name: bitnami + namespace: futureporn +spec: + interval: 5m + url: hhttps://charts.bitnami.com/bitnami diff --git a/scripts/temporal-namespaces.sh b/scripts/temporal-namespaces.sh old mode 100644 new mode 100755