Skip to content

chore: 새로운 프로젝트에 맞는 값 변경 (#69)#70

Merged
doup2001 merged 1 commit into
mainfrom
chore/#69
May 17, 2026
Merged

chore: 새로운 프로젝트에 맞는 값 변경 (#69)#70
doup2001 merged 1 commit into
mainfrom
chore/#69

Conversation

@doup2001
Copy link
Copy Markdown
Member

@doup2001 doup2001 commented May 17, 2026

📌 작업한 내용

  • 새 프로젝트에 맞게 기존 설정값을 변경했습니다.

🔍 참고 사항

🖼️ 스크린샷

🔗 관련 이슈

#69

✅ 체크리스트

  • 로컬에서 빌드 및 테스트 완료
  • 코드 리뷰 반영 완료
  • 문서화 필요 여부 확인

Summary by CodeRabbit

릴리스 노트

  • Chores
    • Dev 환경의 GCP 프로젝트 ID를 업데이트했습니다.
    • 컨테이너 이미지 레지스트리 경로를 새로운 저장소로 변경했습니다.
    • 데이터 저장소 버킷 이름을 수정했습니다.
    • Admin 리소스를 배포 구성에 추가했습니다.

Review Change Stack

@doup2001 doup2001 self-assigned this May 17, 2026
@doup2001 doup2001 added the chore 빌드, 배포, CI/CD 등 인프라 관련 작업 label May 17, 2026
@doup2001 doup2001 linked an issue May 17, 2026 that may be closed by this pull request
1 task
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 17, 2026

개요

개발 환경의 GCP 프로젝트를 dev-pinhouse에서 dev-pinhouse-2로 마이그레이션하고, 저장소 버킷 명명 규칙에 -terraform 접미사를 추가하는 인프라 구성 업데이트입니다. Terraform, Argo CD, Helm, Kustomize 구성 파일이 일관되게 변경되며, 어드민 리소스가 프로덕션 오버레이에 추가됩니다.

변경사항

Dev 환경 마이그레이션

계층 / 파일(들) 설명
Terraform 프로젝트 ID 및 상태 저장소 설정
terraform/environments/dev/variables.tf, terraform/environments/dev/backend.tf
프로젝트 ID 변수 기본값을 dev-pinhouse에서 dev-pinhouse-2로 변경하고, GCS 상태 버킷을 pinhouse-dev-terraform-state-bucket으로 업데이트합니다.
Terraform 저장소 버킷 이름 지정 규칙
terraform/environments/dev/storage.tf
정적 자산, Loki, Tempo 버킷 이름에 -terraform 접미사를 추가하여 저장소 명명 규칙을 표준화합니다.
Helm 플랫폼 차트 GCP 설정
k8s-helm/platform-chart/values-dev.yaml
Cert Manager CloudDNS 및 External Secrets GCP Secret Manager 프로젝트 ID를 dev-pinhouse-2로 업데이트합니다.
Argo CD 애플리케이션 이미지 레지스트리 경로
k8s-argocd/applications/dev/app/admin.yaml, k8s-argocd/applications/dev/app/backend.yaml, k8s-argocd/applications/dev/app/frontend.yaml
argocd-image-updater 어노테이션의 Docker Artifact Registry 경로를 dev-pinhouse에서 dev-pinhouse-2로 변경합니다.
Kustomize 오버레이 이미지 및 리소스 설정
k8s-kustomize/overlays/dev/admin/kustomization.yaml, k8s-kustomize/overlays/dev/backend/kustomization.yaml, k8s-kustomize/overlays/dev/frontend/kustomization.yaml, k8s-kustomize/overlays/dev/kustomization.yaml, k8s-kustomize/overlays/prod/kustomization.yaml
오버레이 이미지 경로를 dev-pinhouse-2로 업데이트하고, Dev/Prod 오버레이 리소스 목록에 Admin 항목을 추가합니다.
Helm 모니터링 저장소 버킷 설정
k8s-helm/releases/monitoring-loki/values-dev-gitops.yaml, k8s-helm/releases/monitoring-tempo/values-dev-gitops.yaml
Loki와 Tempo 모니터링 GCS 버킷 이름을 -terraform 접미사가 포함된 이름으로 변경합니다.

코드 검토 예상 소요 시간

🎯 2 (Simple) | ⏱️ ~10분

관련된 PR

  • PinHouse/PinHouse_CLOUD#67: 이 PR에서 도입된 Dev 어드민 Argo CD 애플리케이션과 Kustomize 이미지 매핑 설정의 레지스트리 경로를 dev-pinhouse-2로 업데이트합니다.
  • PinHouse/PinHouse_CLOUD#59: Backend와 Frontend Argo CD 애플리케이션의 argocd-image-updater 어노테이션을 수정하며 동일한 설정 포인트를 다룹니다.

🐰 새로운 프로젝트로 이사 가는 중,
토끼는 저장소에 -terraform 꼬리를 달고,
어드민은 Prod에도 살아가니,
Dev 환경의 모든 경로 갱신이,
일관되게 춤을 춘다! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed PR 제목이 변경 사항의 핵심을 요약하고 있으나, 구체적인 상세 내용이 부족합니다.
Description check ✅ Passed PR 설명이 템플릿 구조를 따르고 있으나, 변경 사항의 구체적인 내용이 부족합니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/#69

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 17, 2026

Terraform Plan - dev 환경

State 버킷 변수 확인 📦 ✅

초기화 결과 ⚙️ ❌

tfvars 복원 결과 🔐 ⏭️

포맷 검사 결과 🖌 ✅

유효성 검사 결과 🤖 ⏭️

Plan 결과 📖 ⏭️

Plan 상세 보기
Plan 출력 파일이 생성되지 않았습니다.

실행 사용자: @doup2001, 이벤트: pull_request

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between 0e41571 and 08fede2.

📒 Files selected for processing (14)
  • k8s-argocd/applications/dev/app/admin.yaml
  • k8s-argocd/applications/dev/app/backend.yaml
  • k8s-argocd/applications/dev/app/frontend.yaml
  • k8s-helm/platform-chart/values-dev.yaml
  • k8s-helm/releases/monitoring-loki/values-dev-gitops.yaml
  • k8s-helm/releases/monitoring-tempo/values-dev-gitops.yaml
  • k8s-kustomize/overlays/dev/admin/kustomization.yaml
  • k8s-kustomize/overlays/dev/backend/kustomization.yaml
  • k8s-kustomize/overlays/dev/frontend/kustomization.yaml
  • k8s-kustomize/overlays/dev/kustomization.yaml
  • k8s-kustomize/overlays/prod/kustomization.yaml
  • terraform/environments/dev/backend.tf
  • terraform/environments/dev/storage.tf
  • terraform/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
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

🧩 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"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

🧩 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/null

Repository: 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.yaml

Repository: 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 -40

Repository: 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.yaml

Repository: 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.admin IAM 권한 부여
  • Secret Manager API 활성화 및 External Secrets 서비스 계정에 roles/secretmanager.secretAccessor IAM 권한 부여
  • 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.

@doup2001 doup2001 merged commit 101fb25 into main May 17, 2026
10 of 13 checks passed
@doup2001 doup2001 deleted the chore/#69 branch May 17, 2026 08:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore 빌드, 배포, CI/CD 등 인프라 관련 작업

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chore: GCP 서비스계정 변경에 따른 수정

1 participant