feat(platform-postgres): run the shared database as Guaranteed QoS
The one PostgreSQL instance holds the Gitea, Keycloak and tech-log databases. It is Burstable at priority 0 with oom_score_adj 985, so under memory pressure the kernel kills it before almost anything else, and an eviction treats it like Grafana (k3s maturity review 2026-11-11, 7.2 items 2 and 3). Set priorityClassName platform-critical (services/priority-classes) and raise the requests to the existing limits, CPU 2 and memory 4Gi, so the pod is Guaranteed and its oom_score_adj becomes -997. The backup README now gives the restart, not pg_hba, as the reason to add spec.backup with kubectl patch. Risk: applying this changes the pod spec, so CloudNativePG restarts the single instance and the three databases are down for that time. It belongs in the k3s restart window. Node requests grow by 1.75 CPU and 3.5Gi; peak use over the last 6 hours was 0.025 CPU and 195MB. Verification: kubectl diff of the rendered build root against the live cluster shows only priorityClassName, the two requests and the DatabaseRole defaults that were already there; no pg_hba line differs. render-phase1.sh passes.
This commit is contained in:
@@ -45,10 +45,12 @@ AIStor ObjectStore minio-aistor (HDD sdb3, aistor-local-xfs-retain)
|
||||
|
||||
전제: 이 PR이 병합된 platform-core checkout, desktop의 kube context `default`.
|
||||
|
||||
**주의: `services/platform-postgres`를 통째로 다시 적용하지 않는다.** live Cluster의
|
||||
`pg_hba`에는 Phase 1 원본에 없는 `host techlog techlog all scram-sha-256`과
|
||||
`host all techlog all reject`가 있다. 원본을 다시 적용하면 이 두 줄이 지워져 tech-log 운영
|
||||
백엔드가 DB에 붙지 못한다. 그래서 백업 설정만 `kubectl patch`로 더한다.
|
||||
**백업 설정은 `kubectl patch`로만 더한다.** `services/platform-postgres` 렌더를 다시 적용하면
|
||||
`priorityClassName`과 Guaranteed resources도 같이 들어가 PostgreSQL이 재시작된다. 그것은
|
||||
k3s 재시작 창(`scripts/bootstrap/apply-k3s-restart-bundle.sh`)에서 한다. 2026-11-11까지는
|
||||
live `pg_hba`의 `techlog` 두 줄이 원본에 없어서 다시 적용하면 tech-log 백엔드가 끊겼다.
|
||||
이 브랜치에서 원본에 넣었으므로(`fix(platform-postgres): keep the tech-log pg_hba rules`)
|
||||
지금 렌더의 `kubectl diff`에는 pg_hba 차이가 없다.
|
||||
|
||||
1. bucket, 정책, 사용자, Secret을 만든다. 화면에 자격 증명이 나오지 않는다.
|
||||
|
||||
@@ -75,7 +77,7 @@ AIStor ObjectStore minio-aistor (HDD sdb3, aistor-local-xfs-retain)
|
||||
kubectl -n platform-data get cluster platform-postgres -o jsonpath='{.spec.postgresql.pg_hba}{"\n"}'
|
||||
```
|
||||
|
||||
마지막 줄에 `techlog` 두 줄이 그대로 있어야 한다. 몇 분 뒤 WAL이 올라가는지 본다.
|
||||
마지막 줄에 `techlog` 두 줄이 있어야 한다. 몇 분 뒤 WAL이 올라가는지 본다.
|
||||
|
||||
```bash
|
||||
kubectl -n platform-data get cluster platform-postgres \
|
||||
|
||||
Reference in New Issue
Block a user