Conversation
개요개발 환경의 GCP 프로젝트를 변경사항Dev 환경 마이그레이션
코드 검토 예상 소요 시간🎯 2 (Simple) | ⏱️ ~10분 관련된 PR
시
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Terraform Plan -
|
There was a problem hiding this comment.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
k8s-kustomize/overlays/dev/kustomization.yaml (1)
1-9:⚠️ Potential issue | 🟠 Major | ⚡ Quick win
.argocd-source-*.yaml파일에서 이전 프로젝트 ID로의 마이그레이션 미완료
k8s-kustomize/overlays/dev/디렉토리의 다음 파일들이 여전히dev-pinhouse레지스트리를 참조합니다:
backend/.argocd-source-backend-dev.yaml:3-asia-northeast3-docker.pkg.dev/dev-pinhouse/...사용admin/.argocd-source-admin-dev.yaml:3-asia-northeast3-docker.pkg.dev/dev-pinhouse/...사용frontend/.argocd-source-frontend-dev.yaml:3-asia-northeast3-docker.pkg.dev/dev-pinhouse/...사용다른 설정 파일들(kustomization.yaml, ArgoCD 애플리케이션, Helm values)은 이미
dev-pinhouse-2로 올바르게 마이그레이션되었습니다. 위 세 파일의 이미지 레지스트리 경로를dev-pinhouse-2로 업데이트하세요.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@k8s-kustomize/overlays/dev/kustomization.yaml` around lines 1 - 9, Three ArgoCD source YAMLs in overlays/dev still reference the old registry; update the image registry path in backend/.argocd-source-backend-dev.yaml, admin/.argocd-source-admin-dev.yaml, and frontend/.argocd-source-frontend-dev.yaml by replacing the host segment "asia-northeast3-docker.pkg.dev/.../dev-pinhouse/..." with the migrated project "asia-northeast3-docker.pkg.dev/.../dev-pinhouse-2/..." (preserve the rest of the image path and tag), save and verify the change on the lines that contain the image URI (line ~3) and run a quick kustomize/ArgoCD lint or git diff to confirm only the registry segment changed.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@k8s-argocd/applications/dev/app/admin.yaml`:
- Line 18: 현재 argocd 이미지 어노테이션(문자열 키
argocd-image-updater.argoproj.io/image-list)에 참조된 Artifact Registry 저장소들이 존재하지
않아 이미지 풀 실패가 발생합니다; dev-pinhouse-2 프로젝트의 asia-northeast3 리전에 pinhouse-dev-admin,
pinhouse-dev-be, pinhouse-dev-fe 저장소를 생성하고 각 서비스(예: frontend, admin, backend)
이미지를 해당 저장소로 빌드·태깅·푸시한 뒤, 필요하면 admin.yaml의
argocd-image-updater.argoproj.io/image-list 값(예:
frontend=.../pinhouse-admin/pinhouse-admin)과 다른 어노테이션 엔트리들을 실제 저장소 경로로 업데이트하세요.
In `@k8s-helm/platform-chart/values-dev.yaml`:
- Line 19: The values-dev.yaml sets projectId: "dev-pinhouse-2" but the GCP
project lacks required infra for DNS-01 and External Secrets; enable the Cloud
DNS API and Secret Manager API for that project, grant the Cert Manager service
account roles/dns.admin and the External Secrets service account
roles/secretmanager.secretAccessor, and ensure the required secrets exist in
Secret Manager named to match Dev_BE_* (regex), Dev_SWAGGER_BASIC_AUTH, and
Dev_MONITORING_* so Helm chart secret sync (Cert Manager DNS-01 challenge and
External Secrets) can succeed.
---
Outside diff comments:
In `@k8s-kustomize/overlays/dev/kustomization.yaml`:
- Around line 1-9: Three ArgoCD source YAMLs in overlays/dev still reference the
old registry; update the image registry path in
backend/.argocd-source-backend-dev.yaml, admin/.argocd-source-admin-dev.yaml,
and frontend/.argocd-source-frontend-dev.yaml by replacing the host segment
"asia-northeast3-docker.pkg.dev/.../dev-pinhouse/..." with the migrated project
"asia-northeast3-docker.pkg.dev/.../dev-pinhouse-2/..." (preserve the rest of
the image path and tag), save and verify the change on the lines that contain
the image URI (line ~3) and run a quick kustomize/ArgoCD lint or git diff to
confirm only the registry segment changed.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 190d4417-9be7-4018-a5a4-88adfeeaa176
📒 Files selected for processing (14)
k8s-argocd/applications/dev/app/admin.yamlk8s-argocd/applications/dev/app/backend.yamlk8s-argocd/applications/dev/app/frontend.yamlk8s-helm/platform-chart/values-dev.yamlk8s-helm/releases/monitoring-loki/values-dev-gitops.yamlk8s-helm/releases/monitoring-tempo/values-dev-gitops.yamlk8s-kustomize/overlays/dev/admin/kustomization.yamlk8s-kustomize/overlays/dev/backend/kustomization.yamlk8s-kustomize/overlays/dev/frontend/kustomization.yamlk8s-kustomize/overlays/dev/kustomization.yamlk8s-kustomize/overlays/prod/kustomization.yamlterraform/environments/dev/backend.tfterraform/environments/dev/storage.tfterraform/environments/dev/variables.tf
| - resources-finalizer.argocd.argoproj.io | ||
| annotations: | ||
| argocd-image-updater.argoproj.io/image-list: frontend=asia-northeast3-docker.pkg.dev/dev-pinhouse/pinhouse-dev-admin/pinhouse-admin | ||
| argocd-image-updater.argoproj.io/image-list: frontend=asia-northeast3-docker.pkg.dev/dev-pinhouse-2/pinhouse-dev-admin/pinhouse-admin |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Description: Verify Artifact Registry repositories and recent images
PROJECT_ID="dev-pinhouse-2"
REGION="asia-northeast3"
echo "=== Checking admin repository ==="
gcloud artifacts repositories describe pinhouse-dev-admin \
--location="$REGION" \
--project="$PROJECT_ID" \
--format="value(name)" 2>/dev/null || echo "Repository not found"
echo -e "\n=== Listing recent admin images (if exists) ==="
gcloud artifacts docker images list \
"$REGION-docker.pkg.dev/$PROJECT_ID/pinhouse-dev-admin/pinhouse-admin" \
--limit=5 \
--format="table(package,version,createTime)" 2>/dev/null || echo "No images found"
echo -e "\n=== Checking backend repository ==="
gcloud artifacts repositories describe pinhouse-dev-be \
--location="$REGION" \
--project="$PROJECT_ID" \
--format="value(name)" 2>/dev/null || echo "Repository not found"
echo -e "\n=== Listing recent backend images (if exists) ==="
gcloud artifacts docker images list \
"$REGION-docker.pkg.dev/$PROJECT_ID/pinhouse-dev-be/pinhouse-server" \
--limit=5 \
--format="table(package,version,createTime)" 2>/dev/null || echo "No images found"
echo -e "\n=== Checking frontend repository ==="
gcloud artifacts repositories describe pinhouse-dev-fe \
--location="$REGION" \
--project="$PROJECT_ID" \
--format="value(name)" 2>/dev/null || echo "Repository not found"
echo -e "\n=== Listing recent frontend images (if exists) ==="
gcloud artifacts docker images list \
"$REGION-docker.pkg.dev/$PROJECT_ID/pinhouse-dev-fe/pinhouse-web" \
--limit=5 \
--format="table(package,version,createTime)" 2>/dev/null || echo "No images found"Repository: PinHouse/PinHouse_CLOUD
Length of output: 439
필수 해결: Artifact Registry 저장소를 찾을 수 없습니다
dev-pinhouse-2 프로젝트 asia-northeast3 영역에서 다음 저장소들이 존재하지 않습니다:
pinhouse-dev-admin(admin 이미지)pinhouse-dev-be(backend 이미지)pinhouse-dev-fe(frontend 이미지)
배포 시 이미지 풀이 실패하므로, Artifact Registry 저장소를 생성하고 이미지를 먼저 푸시한 후 배포를 진행해야 합니다.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@k8s-argocd/applications/dev/app/admin.yaml` at line 18, 현재 argocd 이미지
어노테이션(문자열 키 argocd-image-updater.argoproj.io/image-list)에 참조된 Artifact Registry
저장소들이 존재하지 않아 이미지 풀 실패가 발생합니다; dev-pinhouse-2 프로젝트의 asia-northeast3 리전에
pinhouse-dev-admin, pinhouse-dev-be, pinhouse-dev-fe 저장소를 생성하고 각 서비스(예:
frontend, admin, backend) 이미지를 해당 저장소로 빌드·태깅·푸시한 뒤, 필요하면 admin.yaml의
argocd-image-updater.argoproj.io/image-list 값(예:
frontend=.../pinhouse-admin/pinhouse-admin)과 다른 어노테이션 엔트리들을 실제 저장소 경로로 업데이트하세요.
| # DNS-01 Challenge (CloudDNS) | ||
| cloudDNS: | ||
| projectId: "dev-pinhouse" | ||
| projectId: "dev-pinhouse-2" |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Description: Verify GCP project readiness for Cert Manager and External Secrets
PROJECT_ID="dev-pinhouse-2"
echo "=== Checking if project exists ==="
gcloud projects describe "$PROJECT_ID" --format="value(projectId)" 2>/dev/null || echo "Project not found"
echo -e "\n=== Checking required APIs ==="
gcloud services list --enabled --project="$PROJECT_ID" --filter="name:(dns.googleapis.com OR secretmanager.googleapis.com)" --format="table(name)" 2>/dev/null
echo -e "\n=== Checking Secret Manager secrets with Dev_BE_ prefix ==="
gcloud secrets list --project="$PROJECT_ID" --filter="name~^Dev_BE_" --format="table(name)" 2>/dev/null
echo -e "\n=== Checking Secret Manager secrets for monitoring ==="
gcloud secrets list --project="$PROJECT_ID" --filter="name~^Dev_MONITORING_" --format="table(name)" 2>/dev/null
echo -e "\n=== Checking Swagger auth secret ==="
gcloud secrets list --project="$PROJECT_ID" --filter="name=Dev_SWAGGER_BASIC_AUTH" --format="table(name)" 2>/dev/nullRepository: PinHouse/PinHouse_CLOUD
Length of output: 309
🏁 Script executed:
# Check the values-dev.yaml file and surrounding context
cd k8s-helm/platform-chart || exit 1
wc -l values-dev.yaml
echo "---"
head -30 values-dev.yamlRepository: PinHouse/PinHouse_CLOUD
Length of output: 565
🏁 Script executed:
# Search for External Secrets configuration and Secret Manager references
grep -n -i "secret\|externalsecret" k8s-helm/platform-chart/values-dev.yaml | head -40Repository: PinHouse/PinHouse_CLOUD
Length of output: 1066
🏁 Script executed:
# Read the External Secrets configuration section
sed -n '178,262p' k8s-helm/platform-chart/values-dev.yamlRepository: PinHouse/PinHouse_CLOUD
Length of output: 2402
dev-pinhouse-2 GCP 프로젝트에서 다음 필수 인프라 구성을 완료해야 배포가 정상 작동합니다.
Cert Manager의 DNS-01 Challenge와 External Secrets에서 GCP Secret Manager의 시크릿을 사용하기 위해 다음이 필수적으로 필요합니다:
- CloudDNS API 활성화 및 Cert Manager 서비스 계정에
roles/dns.adminIAM 권한 부여 - Secret Manager API 활성화 및 External Secrets 서비스 계정에
roles/secretmanager.secretAccessorIAM 권한 부여 - GCP Secret Manager에 다음 시크릿 존재 확인:
Dev_BE_*(정규식 패턴, 라인 205-210)Dev_SWAGGER_BASIC_AUTH(라인 233)Dev_MONITORING_*(정규식 패턴, 라인 250-255)
이 사항들이 구성되지 않으면 Helm 배포 후 시크릿 동기화가 실패하고 애플리케이션이 정상 작동하지 않습니다.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@k8s-helm/platform-chart/values-dev.yaml` at line 19, The values-dev.yaml sets
projectId: "dev-pinhouse-2" but the GCP project lacks required infra for DNS-01
and External Secrets; enable the Cloud DNS API and Secret Manager API for that
project, grant the Cert Manager service account roles/dns.admin and the External
Secrets service account roles/secretmanager.secretAccessor, and ensure the
required secrets exist in Secret Manager named to match Dev_BE_* (regex),
Dev_SWAGGER_BASIC_AUTH, and Dev_MONITORING_* so Helm chart secret sync (Cert
Manager DNS-01 challenge and External Secrets) can succeed.
📌 작업한 내용
🔍 참고 사항
🖼️ 스크린샷
🔗 관련 이슈
#69
✅ 체크리스트
Summary by CodeRabbit
릴리스 노트