From 98367283e0a5fea8499e77dd79e24471b5130280 Mon Sep 17 00:00:00 2001 From: Julius Tens Date: Tue, 14 May 2024 03:26:44 +0200 Subject: [PATCH] deploy postgres 16 --- kubernetes/clusters/tilia/apps.yaml | 2 ++ kubernetes/clusters/tilia/postgres-16.yaml | 16 ++++++++++ .../postgres-16/kustomization.yaml | 5 ++++ .../infrastructure/postgres-16/release.yaml | 30 +++++++++++++++++++ 4 files changed, 53 insertions(+) create mode 100644 kubernetes/clusters/tilia/postgres-16.yaml create mode 100644 kubernetes/infrastructure/postgres-16/kustomization.yaml create mode 100644 kubernetes/infrastructure/postgres-16/release.yaml diff --git a/kubernetes/clusters/tilia/apps.yaml b/kubernetes/clusters/tilia/apps.yaml index 12782b2..ac6f870 100644 --- a/kubernetes/clusters/tilia/apps.yaml +++ b/kubernetes/clusters/tilia/apps.yaml @@ -10,6 +10,8 @@ spec: namespace: flux-system - name: postgres namespace: flux-system + - name: postgres-16 + namespace: flux-system sourceRef: kind: GitRepository name: flux-system diff --git a/kubernetes/clusters/tilia/postgres-16.yaml b/kubernetes/clusters/tilia/postgres-16.yaml new file mode 100644 index 0000000..7a6c07f --- /dev/null +++ b/kubernetes/clusters/tilia/postgres-16.yaml @@ -0,0 +1,16 @@ +apiVersion: kustomize.toolkit.fluxcd.io/v1beta1 +kind: Kustomization +metadata: + name: postgres-16 + namespace: flux-system +spec: + interval: 5m0s + dependsOn: + - name: helm-repositories + namespace: flux-system + sourceRef: + kind: GitRepository + name: flux-system + path: ./kubernetes/infrastructure/postgres-16 + prune: true + validation: client diff --git a/kubernetes/infrastructure/postgres-16/kustomization.yaml b/kubernetes/infrastructure/postgres-16/kustomization.yaml new file mode 100644 index 0000000..559cfac --- /dev/null +++ b/kubernetes/infrastructure/postgres-16/kustomization.yaml @@ -0,0 +1,5 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +namespace: postgres +resources: + - release.yaml diff --git a/kubernetes/infrastructure/postgres-16/release.yaml b/kubernetes/infrastructure/postgres-16/release.yaml new file mode 100644 index 0000000..79e4415 --- /dev/null +++ b/kubernetes/infrastructure/postgres-16/release.yaml @@ -0,0 +1,30 @@ +apiVersion: helm.toolkit.fluxcd.io/v2beta1 +kind: HelmRelease +metadata: + name: postgres-16 + namespace: postgres +spec: + chart: + spec: + chart: postgresql + sourceRef: + kind: HelmRepository + name: bitnami + namespace: flux-system + version: '^15.3.1' + values: + global: + postgresql: + auth: + username: 'user' + database: 'public-transport' + existingSecret: 'postgres-secret' + secretKeys: + adminPasswordKey: 'admin-password' + userPasswordKey: 'user-password' + replicationPasswordKey: 'replication-password' + primary: + resourcesPreset: 'medium' + persistence: + size: '20Gi' + interval: 5m