Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 44 additions & 19 deletions HANDOFF.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

> 다음 세션이 *대화 컨텍스트 없이* 재개 가능하도록 유지. 작업 시작 시 가장 먼저 읽고, 종료 시 갱신.

## 현재 상태 (2026-04-30, P0 100% 완료 후)
## 현재 상태 (2026-04-30, P0 100% + 차별화 1 phase 2 완성)

- 마지막 커밋 (main): `33fef9a feat(citus): LibPQExecutor phase 1 (P0-6, RFC 0002 §6 production path 토대)`
- 본 세션(2026-04-30) 누적: **6 PR 머지 + P0 권장 100% 완료 + 글로벌 §2 정합 달성**
- 마지막 커밋 (main): `682dd12 feat(citus): 다중 cluster ctx-based DSN lookup (P0-6 phase 2b)`
- 본 세션(2026-04-30) 누적: **12 PR 머지 + P0 100% + P1 33% + 차별화 1 phase 2 완성 + 글로벌 §2 정합**

### 본 세션 머지된 PR 6개 (모두 admin merge, rebase, branch 자동 삭제)
### 본 세션 머지된 PR 12개 (모두 admin merge, rebase, branch 자동 삭제)

| # | merge commit | 영역 | 권장 ID |
|---|--------------|------|---------|
Expand All @@ -17,6 +17,20 @@
| 4 | `fa24a66` | Cascade delete envtest 회귀 차단 (ADR 0008) | P0-4 |
| 5 | `5bc0199` | NetworkPolicy 3개 활성화 (ADR 0006 §NetworkPolicy) | P0-3 |
| 6 | `33fef9a` | LibPQExecutor phase 1 (RFC 0002 §6 토대) | P0-6 phase 1 |
| 7 | `cc285a4` | HANDOFF.md 갱신 (workflow.md §2 종료 의식) | docs |
| 8 | `7efbdaf` | LibPQExecutor cmd/main.go 주입 (env-based) | P0-6 phase 2a |
| 9 | `d28085e` | TASKS.md P0 완료 마킹 + 8 PR commit hash 매핑 | docs |
| 10 | `947653c` | BackupOptions.ExecutionMode 필드 추가 | P1-6 |
| 11 | `613e6f4` | Helm chart 골격 (Chart + values + 7 templates) | P1-4 |
| 12 | `682dd12` | 다중 cluster ctx-based DSN lookup | P0-6 phase 2b |

### 권장 완료율

- **P0**: 6/6 (100%) — Status reason / SecurityContext / NetworkPolicy / Cascade test / AuthPlugin Rotate / LibPQExecutor (phase 1+2a+2b)
- **P1**: 2/6 (33%) — P1-4 Helm chart 골격, P1-6 BackupOptions.ExecutionMode
- **P2**: 0/7
- **차별화 1 (Citus)**: phase 1+2 완성 — phase 3(kind e2e → RFC 0002 → Implemented)만 남음
- **거버넌스**: ADR 0006/0007/0008/0009 (4 신설), HANDOFF/TASKS 동기화

## 도달 마일스톤

Expand All @@ -37,30 +51,41 @@

```bash
cd /Users/phil/WorkSpace/public/postgresql-operator
make lint && make test # 회귀 0 확인 (internal/citus 74.0%, internal/controller 82.9%)
make lint && make test # 회귀 0 확인 (internal/citus 75.2%, internal/controller 82.5%)
make audit # 0 vulnerabilities 확인
helm lint charts/postgresql-operator/ # 0 failed (P1-4 검증)

# 후보 1 (가치 큼): P0-6 phase 2 — cmd/main.go에서 LibPQExecutor 주입
git checkout -b feat/p0-6-phase2-cmd-injection
# DSNFunc 구현(election holder lookup + Secret 통합), reconciler.CitusExec에 주입.
# 후속 phase 3에서 RFC 0002 → Implemented 승격.

# 후보 2 (필요): e2e cert-manager 통합 (PR #1의 e2e fail 진짜 fix)
# 후보 1 (가장 큰 다음 가치): e2e cert-manager 통합 — PR #1 e2e fail 진짜 fix
git checkout -b feat/p7-cert-manager-integration
# config/certmanager/ 신설 (Issuer + Certificate CR) + kustomization 갱신
# + e2e_test.go BeforeAll에 webhook secret ready wait.
# config/certmanager/ 신설 (Issuer + Certificate CR) + config/default/kustomization
# 의 cert-manager replacements 활성화 + e2e_test.go BeforeAll webhook secret wait.
# manager Pod의 webhook serving cert 발급 대기 → e2e PASS.

# 후보 3 (사용자 채널): P1-4 Helm chart (ADR 0007 결정대로 P14에서 P1으로 앞당김)
git checkout -b feat/p1-4-helm-chart-skeleton
# charts/postgresql-operator/ 신설 (Chart.yaml, values.yaml, templates/...).
# 후보 2: P0-6 phase 3 — kind e2e → RFC 0002 → Implemented 승격
git checkout -b feat/p0-6-phase3-kind-e2e
# kind 클러스터 + 실 PG container build + LibPQExecutor 실 SQL apply 시나리오.
# pg_dist_node 자동 등재 검증 → RFC 0002 Draft → Implemented 승격.
# 차별화 1 *완전 완료* — README 차별화 표 "Citus 1급" 코드 입증.

# 후보 4 (Plugin SDK 호출자): P1-1 BackupJob CRD
# 후보 3: P1-1 BackupJob CRD — Plugin SDK 첫 호출자
git checkout -b feat/p1-1-backupjob-crd
# api/v1alpha1/backupjob_types.go + internal/controller/backupjob_controller.go
# + RFC 0004 작성.
# + RFC 0004 작성. BackupOptions.ExecutionMode (P1-6) 첫 사용처.

# 후보 4: P1-2 PgBouncer + cmd/router 통합
git checkout -b feat/p1-2-pgbouncer-router

# 후보 5: P1-3 Monitoring/Exporter 표준 통합
git checkout -b feat/p1-3-monitoring-exporter

# 후보 6: P1-5 ClusterUpgrade CRD
git checkout -b feat/p1-5-clusterupgrade-crd

# 후보 7+: P2 7개 (Citus rebalance, worker scale, Plugin SDK golden, gRPC,
# declarative DB/Role, multi-region, Citus PGUpgrade) — sprint 단위
```

권장 진입: **후보 1 (P0-6 phase 2)** — 차별화 1 코드 차원 잠금의 *완전성*이 다음 단계의 토대.
권장 진입: **후보 1 (e2e cert-manager 통합)** — 본 세션 PR #1의 e2e fail의 *진짜 fix* + P7 Security 영역 진입.

## 차단점

Expand Down
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,29 @@ PG18 활성화: `--feature-gates=PostgresEighteen=true`. Citus 호환 발표는

---

## Quickstart (Helm — P1-4 alpha)

```bash
# 1. Helm chart 설치 (operator + RBAC + NetworkPolicy 보안 baseline 한 번에)
helm install my-operator ./charts/postgresql-operator \
--namespace postgres-operator-system --create-namespace

# 2. (선택) LibPQExecutor 활성화 — single-cluster (P0-6 phase 2a)
helm upgrade my-operator ./charts/postgresql-operator \
--reuse-values \
--set citusLibPQ.dsn="host=<coord-svc-dns> port=5432 user=postgres dbname=postgres sslmode=require"
Comment on lines +107 to +109

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep Helm upgrade in the same release namespace

Step 1 installs the release into postgres-operator-system, but Step 2 runs helm upgrade without --namespace; Helm commands are namespace-scoped (-n, --namespace is the scope for the request, and release lookup follows current context namespace), so this upgrade will fail for users whose active namespace is still default instead of postgres-operator-system.

Useful? React with 👍 / 👎.


# 3. 또는 multi-cluster (P0-6 phase 2b — cluster별 환경 변수)
# Deployment.spec.containers[0].env에 직접 추가:
# - name: CITUS_LIBPQ_DSN_<namespace>__<cluster-name>
# value: "host=..."

# 4. Sample PostgresCluster 적용
kubectl apply -f config/samples/postgres_v1alpha1_postgrescluster.yaml

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Point Quickstart to an existing sample manifest

This Quickstart command references config/samples/postgres_v1alpha1_postgrescluster.yaml, but that file is not present in the repo (the available samples are ..._dev.yaml and ..._prod.yaml), so users following the new Helm path will fail at this step with a file-not-found error and cannot complete the first end-to-end apply.

Useful? React with 👍 / 👎.

```

NOTES.txt가 install 직후 다음 단계를 안내합니다 (NullExecutor 사용 중 인지, HA replicas 권장 등).

## Quickstart (계획, Phase 1 완료 시 활성화)

```bash
Expand Down
16 changes: 8 additions & 8 deletions TASKS.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,16 @@
| P0-5 | AuthPlugin.RotateSecret 인터페이스 추가 (additive, ADR 0005 §alpha rule) | F13(P13), F09(P7) | **완료** | — | `4623277` (PR #1) |
| P0-6 | LibPQExecutor 구현 (Citus 차별화 코드 차원 잠금, P2 → P0 승격) | F03(P11) | **phase 1+2a 완료** | P0-1 | `33fef9a` (PR #6 — SQL 매핑 + 7 단위 테스트), `7efbdaf` (PR #8 — env-based opt-in 주입). phase 2b(다중 cluster) + phase 3(kind e2e) → RFC 0002 Implemented 승격은 후속. |

### P1 (3-6 sprint, 중기) — 6개
### P1 (3-6 sprint, 중기) — 6개 — **2/6 완료**

| ID | 권장 | 영향 Pillar | 단계 | 의존 |
| ID | 권장 | 영향 Pillar | 단계 | 완료 commit |
|----|------|------------|------|------|
| P1-1 | BackupJob CRD + reconciler (BackupPlugin 첫 호출자) | F06(P4) | 설계 | P0-2 |
| P1-2 | PgBouncer 사이드카 + cmd/router 통합 | F07(P5), F12(P12) | 설계 | P0-2 |
| P1-3 | Monitoring/Exporter 표준 통합 (ExporterPlugin 호출자) | F08(P6) | 설계 | P0-2 |
| P1-4 | Helm chart 패키징 (P14 → P1 앞당김, ADR 0007) | **신규 P1 트랙** (F14에서 분리) | 설계 | — |
| P1-5 | ClusterUpgrade CRD 시그니처 (in-place + blue/green) | F11(P9) | 설계 | P1-1 |
| P1-6 | pgBackRest 실행 모델 (BackupOptions.ExecutionMode: sidecar\|job) | F06(P4), F13(P13) | 설계 | P1-1 |
| P1-1 | BackupJob CRD + reconciler (BackupPlugin 첫 호출자) | F06(P4) | 설계 | (후속 PR) |
| P1-2 | PgBouncer 사이드카 + cmd/router 통합 | F07(P5), F12(P12) | 설계 | (후속 PR) |
| P1-3 | Monitoring/Exporter 표준 통합 (ExporterPlugin 호출자) | F08(P6) | 설계 | (후속 PR) |
| P1-4 | Helm chart 패키징 (P14 → P1 앞당김, ADR 0007) | **신규 P1 트랙** (F14에서 분리) | **완료** (골격) | `613e6f4` (PR #11) — Chart + values + 7 templates |
| P1-5 | ClusterUpgrade CRD 시그니처 (in-place + blue/green) | F11(P9) | 설계 | (후속 PR) |
| P1-6 | pgBackRest 실행 모델 (BackupOptions.ExecutionMode: sidecar\|job) | F06(P4), F13(P13) | **완료** | `947653c` (PR #10) |

### P2 (6+ sprint, 장기 차별화) — 7개

Expand Down