# tech-log 테넌트 — 플랫폼 쪽 객체 tech-log(hyeonworks.com 운영)가 플랫폼을 쓰려면 플랫폼 namespace 안에 허용 객체가 있어야 한다. 이 빌드 루트가 그 객체를 소유한다. 앱 자체(Deployment·Service·Ingress·ServiceMonitor·앱 namespace 안의 NetworkPolicy)는 tech-log 저장소의 `deploy/`가 소유한다. 2026-11-11 점검(`docs/reviews/2026-11-11-k3s-maturity-review.md` 4.3절) 전까지 이 객체들은 `kubectl apply`로만 들어가 있었고 어느 저장소에도 없었다. 처음 내용은 라이브 객체의 `last-applied-configuration`을 그대로 옮겼다. 라이브와 다른 것은 `hyeonworks-prod`의 PSA 라벨뿐이다. | 파일 | 객체 | | --- | --- | | `namespace.yaml` | Namespace `hyeonworks-prod`: 관측 대상 라벨, PSA `enforce=baseline`·`warn=restricted`·`audit=restricted` | | `platform-data.yaml` | `techlog` Database와 DatabaseRole(로그인만, 연결 30), Postgres로 들어오는 ingress | | `object-storage.yaml` | AIStor 9000으로 들어오는 ingress | | `observability-probes.yaml` | blackbox Probe 둘(공개 HTTPS, 내부 readiness) | | `observability-rules.yaml` | PrometheusRule `techlog` 일곱 개 | | `dashboards/techlog-operations.json` | Grafana 대시보드(`grafana-dashboard-techlog` ConfigMap으로 생성) | | `observability-network-policies.yaml` | blackbox → readiness, Prometheus → management scrape egress | ## 여기에 없는 것 - `platform-data/platform-postgres`의 `pg_hba` techlog 두 줄: Cluster 객체는 `services/platform-postgres`가 소유한다. - Secret: `platform-data/techlog-db-credentials`(`kubernetes.io/basic-auth`, `username`은 정확히 `techlog`)는 DatabaseRole이 참조한다. 앱 쪽 `hyeonworks-prod/hyeonworks-secrets`는 tech-log가 소유한다. 둘 다 Git에 두지 않는다. ## PSA `enforce=baseline`은 2026-11-12에 서버 dry-run(`kubectl label --dry-run=server`)으로 위반 0을 확인하고 붙였다. `restricted`로 강제하면 지금 파드 셋(redis, backend, frontend)이 모두 걸린다 (`allowPrivilegeEscalation`, capabilities, `runAsNonRoot`, seccomp). tech-log 쪽 securityContext가 고쳐진 뒤 같은 dry-run이 경고 없이 통과하면 `enforce`를 `restricted`로 올린다. ## 렌더·적용 ```sh bash scripts/validate/render-tenants-and-policies.sh kubectl kustomize services/tenants/techlog | kubectl diff -f - kubectl apply -k services/tenants/techlog ``` 새로 설치할 때는 이 루트를 tech-log `deploy/`보다 먼저 적용한다(namespace를 여기서 만든다).