Let's try this pattern for app config. Refactor postgres.

This commit is contained in:
2025-05-28 15:17:15 -07:00
parent 72cd0ecf56
commit 2636bd9b6d
3 changed files with 20 additions and 18 deletions

View File

@@ -1,10 +1 @@
# Postgress app
## Required .env variables
```
POSTGRES_DB
POSTGRES_USER
POSTGRES_PASSWORD
PGDATA
```

View File

@@ -0,0 +1,18 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: postgres
labels:
- includeSelectors: true
pairs:
app: postgres
managedBy: kustomize
partOf: wild-cloud
configMapGenerator:
- name: config
envs:
- config.env
secretGenerator:
- name: secrets
envs:
- secrets.env

View File

@@ -6,20 +6,13 @@ labels:
pairs:
app: postgres
managedBy: kustomize
partOf: sovereign-cloud
partOf: wild-cloud
resources:
- config
- deployment.yaml
- namespace.yaml
- service.yaml
- pvc.yaml
configMapGenerator:
- name: config
envs:
- config/config.env
secretGenerator:
- name: secrets
envs:
- config/secrets.env
replacements:
- source: