본문으로 건너뛰기

Deployment & GitOps

ArgoCD ApplicationSets

21개의 ApplicationSet이 두 리전의 K8s 리소스를 관리합니다.

Service Domains (5)

AppSet대상
appset-core.yamlCore 서비스 (product-catalog, inventory, cart, search)
appset-user.yamlUser 서비스 (user-account, user-profile, review, wishlist)
appset-fulfillment.yamlFulfillment 서비스 (order, payment, shipping, returns)
appset-business.yamlBusiness 서비스 (notification, recommendation, analytics, seller)
appset-platform.yamlPlatform 서비스 (api-gateway, event-bus, pricing, warehouse)

Infrastructure (16)

AppSet대상
appset-infra.yamlKarpenter CRDs, 기본 인프라
appset-tempo.yamlTempo 배포
appset-storageclass.yamlgp3 StorageClass
appset-helm-karpenter.yamlKarpenter Helm chart
appset-helm-prometheus.yamlPrometheus stack (us-east-1)
appset-helm-prometheus-west.yamlPrometheus stack (us-west-2)
appset-helm-prometheus-korea.yamlPrometheus stack (ap-northeast-2)
appset-helm-otel-collector.yamlOTel Collector Helm chart
appset-helm-alb-controller.yamlAWS ALB Controller
appset-helm-external-secrets.yamlExternal Secrets Operator
appset-helm-clickhouse-operator.yamlClickHouse Operator
appset-clickhouse.yamlClickHouse Installation
appset-grafana-nlb.yamlGrafana NLB
appset-prometheus-west-nlb.yamlPrometheus West NLB
appset-tempo-west-nlb.yamlTempo West NLB

Terraform Module Structure

terraform/
├── environments/production/
│ ├── us-east-1/main.tf # Primary region (~260 resources)
│ └── us-west-2/main.tf # Secondary region (~260 resources)

├── modules/
│ ├── networking/ # vpc, security-groups, transit-gateway
│ ├── compute/ # eks, alb, nlb
│ ├── data/ # aurora-global, documentdb-global, elasticache-global,
│ │ # msk, opensearch, s3, dsql, dsql-irsa
│ ├── edge/ # cloudfront, cloudfront-argocd, cloudfront-grafana,
│ │ # waf, route53
│ ├── security/ # kms, secrets-manager, iam, cognito
│ ├── observability/ # cloudwatch, xray, tempo-storage, otel-collector-irsa
│ └── dr-automation/ # Lambda failover functions

└── global/ # Cross-region resources

K8s Manifest Structure

k8s/
├── base/ # Shared namespace definitions
├── services/
│ ├── core/ # Per-service: deployment, service, hpa, pdb
│ ├── user/
│ ├── fulfillment/
│ ├── business/
│ └── platform/
├── infra/
│ ├── karpenter/ # NodePool, EC2NodeClass CRDs
│ ├── otel-collector/ # OTel Collector config
│ └── argocd/apps/ # ApplicationSet definitions
└── overlays/
├── us-east-1/ # Region-specific patches (real endpoints)
└── us-west-2/ # Region-specific patches

State Management

StateS3 KeyResources
us-east-1production/us-east-1/terraform.tfstate~260
us-west-2production/us-west-2/terraform.tfstate~260
동시 Apply 금지

Concurrent terraform applies는 state drift를 유발합니다. 항상 terraform plan으로 상태를 확인한 후 apply하세요.

Post-Deployment Verification

# 트래픽 흐름 검증 스크립트
bash scripts/test-traffic-flow.sh

검증 항목:

  • DNS resolution
  • NLB 존재 확인
  • Target group health
  • CloudFront connectivity
  • Route53 records
  • SG audit (no 0.0.0.0/0)
  • CloudFront origin 설정