Skip to content

Commit 9ca6f72

Browse files
committed
feat(deploy): split db and api secrets
1 parent 2b7e419 commit 9ca6f72

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

deploy/app-pod.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ spec:
1919
- configMapRef:
2020
name: app
2121
- secretRef:
22-
name: app
22+
name: app-db
2323
securityContext:
2424
runAsUser: 920
2525
runAsGroup: 920
@@ -48,7 +48,7 @@ spec:
4848
- configMapRef:
4949
name: app
5050
- secretRef:
51-
name: app
51+
name: app-api
5252
securityContext:
5353
runAsUser: 921
5454
runAsGroup: 921

deploy/app-secrets.example.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
11
apiVersion: v1
22
kind: Secret
33
metadata:
4-
name: app
4+
name: app-db
55
stringData:
66
POSTGRES_USER: pguser
77
POSTGRES_PASSWORD: pgsecret
88
POSTGRES_DB: app
9+
---
10+
apiVersion: v1
11+
kind: Secret
12+
metadata:
13+
name: app-api
14+
stringData:
915
DATABASE_URL: postgresql+asyncpg://pguser:pgsecret@db:5432/app
16+
SECRET_KEY: Secret123

0 commit comments

Comments
 (0)