mirror of
https://github.com/cna-bootcamp/phonebill.git
synced 2026-06-13 03:59:10 +00:00
GitHub Actions CI/CD 파이프라인 구축 완료
- GitHub Actions 전용 Kustomize 매니페스트 구조 생성 - 환경별(dev/staging/prod) Overlay 및 Patch 파일 작성 - SonarQube 코드 품질 분석 통합 - Docker 이미지 빌드 및 Azure Container Registry 푸시 - Kubernetes 자동 배포 워크플로우 구성 - 수동 배포 스크립트 및 구축 가이드 문서 추가 주요 기능: - 자동 배포: Push/PR 시 dev 환경 자동 배포 - 수동 배포: 환경 선택 가능한 워크플로우 트리거 - 환경별 최적화: dev(1 replica), staging(2 replicas), prod(3 replicas) - 보안 설정: staging/prod HTTPS, JWT 토큰 유효시간 조정 - 롤백 지원: GitHub Actions, kubectl, 수동 스크립트 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -1,12 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: cm-common
|
||||
|
||||
data:
|
||||
CORS_ALLOWED_ORIGINS: "http://localhost:8081,http://localhost:8082,http://localhost:8083,http://localhost:8084,http://phonebill-dg0500.20.214.196.128.nip.io"
|
||||
JWT_ACCESS_TOKEN_VALIDITY: "18000000"
|
||||
JWT_REFRESH_TOKEN_VALIDITY: "86400000"
|
||||
REDIS_PORT: "6379"
|
||||
SPRING_PROFILES_ACTIVE: "dev"
|
||||
DDL_AUTO: "update"
|
||||
@@ -1,17 +0,0 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: api-gateway
|
||||
spec:
|
||||
replicas: 1
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: api-gateway
|
||||
resources:
|
||||
requests:
|
||||
cpu: 256m
|
||||
memory: 256Mi
|
||||
limits:
|
||||
cpu: 1024m
|
||||
memory: 1024Mi
|
||||
@@ -1,17 +0,0 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: bill-service
|
||||
spec:
|
||||
replicas: 1
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: bill-service
|
||||
resources:
|
||||
requests:
|
||||
cpu: 256m
|
||||
memory: 256Mi
|
||||
limits:
|
||||
cpu: 1024m
|
||||
memory: 1024Mi
|
||||
@@ -1,17 +0,0 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: kos-mock
|
||||
spec:
|
||||
replicas: 1
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: kos-mock
|
||||
resources:
|
||||
requests:
|
||||
cpu: 256m
|
||||
memory: 256Mi
|
||||
limits:
|
||||
cpu: 1024m
|
||||
memory: 1024Mi
|
||||
@@ -1,17 +0,0 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: product-service
|
||||
spec:
|
||||
replicas: 1
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: product-service
|
||||
resources:
|
||||
requests:
|
||||
cpu: 256m
|
||||
memory: 256Mi
|
||||
limits:
|
||||
cpu: 1024m
|
||||
memory: 1024Mi
|
||||
@@ -1,17 +0,0 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: user-service
|
||||
spec:
|
||||
replicas: 1
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: user-service
|
||||
resources:
|
||||
requests:
|
||||
cpu: 256m
|
||||
memory: 256Mi
|
||||
limits:
|
||||
cpu: 1024m
|
||||
memory: 1024Mi
|
||||
@@ -1,48 +0,0 @@
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: phonebill-ingress
|
||||
annotations:
|
||||
kubernetes.io/ingress.class: nginx
|
||||
nginx.ingress.kubernetes.io/ssl-redirect: "false"
|
||||
spec:
|
||||
ingressClassName: nginx
|
||||
rules:
|
||||
- host: phonebill-dg0500-api.20.214.196.128.nip.io
|
||||
http:
|
||||
paths:
|
||||
- path: /api/v1/auth
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: user-service
|
||||
port:
|
||||
number: 80
|
||||
- path: /api/v1/users
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: user-service
|
||||
port:
|
||||
number: 80
|
||||
- path: /api/v1/bills
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: bill-service
|
||||
port:
|
||||
number: 80
|
||||
- path: /api/v1/products
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: product-service
|
||||
port:
|
||||
number: 80
|
||||
- path: /api/v1/kos
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: kos-mock
|
||||
port:
|
||||
number: 80
|
||||
@@ -1,65 +0,0 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
namespace: phonebill-dg0500
|
||||
|
||||
resources:
|
||||
- ../../base
|
||||
|
||||
patches:
|
||||
- path: cm-common-patch.yaml
|
||||
target:
|
||||
kind: ConfigMap
|
||||
name: cm-common
|
||||
- path: deployment-api-gateway-patch.yaml
|
||||
target:
|
||||
kind: Deployment
|
||||
name: api-gateway
|
||||
- path: deployment-user-service-patch.yaml
|
||||
target:
|
||||
kind: Deployment
|
||||
name: user-service
|
||||
- path: deployment-bill-service-patch.yaml
|
||||
target:
|
||||
kind: Deployment
|
||||
name: bill-service
|
||||
- path: deployment-product-service-patch.yaml
|
||||
target:
|
||||
kind: Deployment
|
||||
name: product-service
|
||||
- path: deployment-kos-mock-patch.yaml
|
||||
target:
|
||||
kind: Deployment
|
||||
name: kos-mock
|
||||
- path: ingress-patch.yaml
|
||||
target:
|
||||
kind: Ingress
|
||||
name: phonebill
|
||||
- path: secret-common-patch.yaml
|
||||
target:
|
||||
kind: Secret
|
||||
name: secret-common
|
||||
- path: secret-user-service-patch.yaml
|
||||
target:
|
||||
kind: Secret
|
||||
name: secret-user-service
|
||||
- path: secret-bill-service-patch.yaml
|
||||
target:
|
||||
kind: Secret
|
||||
name: secret-bill-service
|
||||
- path: secret-product-service-patch.yaml
|
||||
target:
|
||||
kind: Secret
|
||||
name: secret-product-service
|
||||
|
||||
images:
|
||||
- name: acrdigitalgarage01.azurecr.io/phonebill/api-gateway
|
||||
newTag: dev-latest
|
||||
- name: acrdigitalgarage01.azurecr.io/phonebill/user-service
|
||||
newTag: dev-latest
|
||||
- name: acrdigitalgarage01.azurecr.io/phonebill/bill-service
|
||||
newTag: dev-latest
|
||||
- name: acrdigitalgarage01.azurecr.io/phonebill/product-service
|
||||
newTag: dev-latest
|
||||
- name: acrdigitalgarage01.azurecr.io/phonebill/kos-mock
|
||||
newTag: dev-latest
|
||||
@@ -1,11 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: secret-bill-service
|
||||
|
||||
type: Opaque
|
||||
stringData:
|
||||
DB_HOST: "bill-inquiry-postgres-dev-postgresql"
|
||||
DB_NAME: "bill_inquiry_db"
|
||||
DB_USERNAME: "bill_inquiry_user"
|
||||
DB_PASSWORD: "BillUser2025!"
|
||||
@@ -1,10 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: secret-common
|
||||
|
||||
type: Opaque
|
||||
stringData:
|
||||
JWT_SECRET: "nwe5Yo9qaJ6FBD/Thl2/j6/SFAfNwUorAY1ZcWO2KI7uA4bmVLOCPxE9hYuUpRCOkgV2UF2DdHXtqHi3+BU/ecbz2zpHyf/720h48UbA3XOMYOX1sdM+dQ=="
|
||||
REDIS_HOST: "redis-cache-dev-master"
|
||||
REDIS_PASSWORD: "Redis2025Dev!"
|
||||
@@ -1,11 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: secret-product-service
|
||||
|
||||
type: Opaque
|
||||
stringData:
|
||||
DB_HOST: "product-change-postgres-dev-postgresql"
|
||||
DB_NAME: "product_change_db"
|
||||
DB_USERNAME: "product_change_user"
|
||||
DB_PASSWORD: "ProductUser2025!"
|
||||
@@ -1,11 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: secret-user-service
|
||||
|
||||
type: Opaque
|
||||
stringData:
|
||||
DB_HOST: "auth-postgres-dev-postgresql"
|
||||
DB_NAME: "phonebill_auth"
|
||||
DB_USERNAME: "auth_user"
|
||||
DB_PASSWORD: "AuthUser2025!"
|
||||
Reference in New Issue
Block a user