diff --git a/infrastructures/postgresql/env/k3s-cluster/templates/ingress.yaml b/infrastructures/postgresql/env/k3s-cluster/ingress.yaml similarity index 100% rename from infrastructures/postgresql/env/k3s-cluster/templates/ingress.yaml rename to infrastructures/postgresql/env/k3s-cluster/ingress.yaml diff --git a/infrastructures/postgresql/env/k3s-cluster/kustomization.yaml b/infrastructures/postgresql/env/k3s-cluster/kustomization.yaml new file mode 100644 index 0000000..6301cb5 --- /dev/null +++ b/infrastructures/postgresql/env/k3s-cluster/kustomization.yaml @@ -0,0 +1,11 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +resources: + - ./volume.yaml + - ./ingress.yaml +helmCharts: + - name: postgresql + repo: oci://registry-1.docker.io/bitnamicharts + version: 15.5.17 + releaseName: postgresql + valuesFile: values.yaml \ No newline at end of file diff --git a/infrastructures/postgresql/env/k3s-cluster/values.yaml b/infrastructures/postgresql/env/k3s-cluster/values.yaml index 278771c..39ebf02 100644 --- a/infrastructures/postgresql/env/k3s-cluster/values.yaml +++ b/infrastructures/postgresql/env/k3s-cluster/values.yaml @@ -1,9 +1,29 @@ auth: - postgresPassword: ${postgres_password} - username: ${username} - password: ${password} - database: ${database} - replicationPassword: ${replication_password} + postgresPassword: + valueFrom: + secretKeyRef: + name: postgresql-secrets + key: postgres_password + username: + valueFrom: + secretKeyRef: + name: postgresql-secrets + key: username + password: + valueFrom: + secretKeyRef: + name: postgresql-secrets + key: password + database: + valueFrom: + secretKeyRef: + name: postgresql-secrets + key: database + replicationPassword: + valueFrom: + secretKeyRef: + name: postgresql-secrets + key: replication_password architecture: "replication" replication: synchronousCommit: "on" diff --git a/infrastructures/postgresql/env/k3s-cluster/templates/volume.yaml b/infrastructures/postgresql/env/k3s-cluster/volume.yaml similarity index 100% rename from infrastructures/postgresql/env/k3s-cluster/templates/volume.yaml rename to infrastructures/postgresql/env/k3s-cluster/volume.yaml