zlambda/netbis: agenix로 APISIX admin key 암호화
- apisix.nix가 템플릿 + 런타임 sed 치환 구조로 변경됨 - admin key는 agenix로 암호화되어 git에 평문 없음 - /run/apisix/config.yaml(tmpfs)에 렌더링 후 컨테이너 마운트 - 회전 절차 문서화
This commit is contained in:
@@ -39,13 +39,13 @@ NixOS `virtualisation.oci-containers`로 선언 — `~/nixos-infra/apisix.nix`.
|
||||
|
||||
- Docker 네트워크: `apisix-net` (172.22.222.0/24), etcd=172.22.222.3, apisix=172.22.222.20
|
||||
- Admin API: `http://127.0.0.1:9180` (admin key 필수, Linode 방화벽이 public 차단 → Tailscale 경유)
|
||||
- Admin Key: `edd1c9f034335f136f87ad84b625c8f1`
|
||||
- Admin Key: **agenix로 암호화** (`secrets/apisix-admin-key.age`). activation 시 `/run/agenix/apisix-admin-key`로 복호화, render 서비스가 `/run/apisix/config.yaml`에 sed 치환. 회전 시 `nix run github:ryantm/agenix -- -e secrets/apisix-admin-key.age` 후 `nixos-rebuild switch`.
|
||||
- APISIX 컨테이너 ulimits: nofile 655360
|
||||
- 영속 데이터:
|
||||
- etcd: bind mount `/var/lib/apisix/etcd` (root 소유)
|
||||
- apisix 로그: docker named volume `apisix-logs` (이미지 VOLUME 선언이 uid 1001 권한 세팅)
|
||||
- config.yaml은 Nix store에서 생성되어 read-only bind mount (변경 시 rebuild)
|
||||
- systemd 의존: `init-apisix-net.service`(oneshot) → `docker-apisix-etcd.service` → `docker-apisix.service`
|
||||
- config.yaml: 템플릿(Nix store, `__ADMIN_KEY__` 자리표시자) → `apisix-render-config.service`(oneshot)가 `/run/apisix/config.yaml`에 렌더링 → 컨테이너에 read-only bind mount
|
||||
- systemd 의존: `init-apisix-net.service`(oneshot) → `docker-apisix-etcd.service`; `apisix-render-config.service`(oneshot) + `init-apisix-net.service` → `docker-apisix.service`
|
||||
- 플러그인: real-ip, cors, ip-restriction, proxy-rewrite, response-rewrite, redirect, limit-*, prometheus, http-logger, file-logger 등 (config.yaml 참조). **crowdsec-bouncer 플러그인은 미포함** (커스텀 lua 이전 필요 시 별도 작업).
|
||||
|
||||
### global_rules
|
||||
|
||||
Reference in New Issue
Block a user