diff --git a/.github/actions-pipeline-guide.md b/.github/actions-pipeline-guide.md index 2e717b3..a5e7ad4 100644 --- a/.github/actions-pipeline-guide.md +++ b/.github/actions-pipeline-guide.md @@ -2,178 +2,160 @@ ## πŸ“‹ κ°œμš” -GitHub Actionsλ₯Ό μ΄μš©ν•œ λ°±μ—”λ“œ μ„œλΉ„μŠ€ CI/CD νŒŒμ΄ν”„λΌμΈ ꡬ좕 κ°€μ΄λ“œμž…λ‹ˆλ‹€. -Kustomizeλ₯Ό ν™œμš©ν•œ ν™˜κ²½λ³„ 배포 μžλ™ν™”μ™€ SonarQube ν’ˆμ§ˆ 뢄석을 ν¬ν•¨ν•©λ‹ˆλ‹€. +ν†΅μ‹ μš”κΈˆ 관리 μ„œλΉ„μŠ€(phonebill)의 GitHub Actions 기반 CI/CD νŒŒμ΄ν”„λΌμΈ ꡬ좕 κ°€μ΄λ“œμž…λ‹ˆλ‹€. -### μ‹œμŠ€ν…œ 정보 -- **μ‹œμŠ€ν…œλͺ…**: phonebill -- **μ„œλΉ„μŠ€ λͺ©λ‘**: api-gateway, user-service, bill-service, product-service, kos-mock -- **JDK 버전**: 21 -- **ACR 이름**: acrdigitalgarage01 -- **λ¦¬μ†ŒμŠ€ κ·Έλ£Ή**: rg-digitalgarage-01 -- **AKS ν΄λŸ¬μŠ€ν„°**: aks-digitalgarage-01 +**싀행정보**: +- ACR_NAME: acrdigitalgarage01 +- RESOURCE_GROUP: rg-digitalgarage-01 +- AKS_CLUSTER: aks-digitalgarage-01 -## πŸ—οΈ κ΅¬μΆ•λœ 파일 ꡬ쑰 +**μ‹œμŠ€ν…œ 정보**: +- μ‹œμŠ€ν…œλͺ…: phonebill +- JDK 버전: 21 +- μ„œλΉ„μŠ€: api-gateway, user-service, bill-service, product-service, kos-mock +## πŸ—οΈ κ΅¬μΆ•λœ νŒŒμ΄ν”„λΌμΈ ꡬ쑰 + +### 디렉토리 ꡬ쑰 ``` .github/ β”œβ”€β”€ kustomize/ -β”‚ β”œβ”€β”€ base/ +β”‚ β”œβ”€β”€ base/ # κΈ°λ³Έ λ§€λ‹ˆνŽ˜μŠ€νŠΈ β”‚ β”‚ β”œβ”€β”€ kustomization.yaml β”‚ β”‚ β”œβ”€β”€ namespace.yaml -β”‚ β”‚ β”œβ”€β”€ common/ -β”‚ β”‚ β”‚ β”œβ”€β”€ cm-common.yaml -β”‚ β”‚ β”‚ β”œβ”€β”€ secret-common.yaml -β”‚ β”‚ β”‚ β”œβ”€β”€ secret-imagepull.yaml -β”‚ β”‚ β”‚ └── ingress.yaml -β”‚ β”‚ └── {service-name}/ -β”‚ β”‚ β”œβ”€β”€ deployment.yaml -β”‚ β”‚ β”œβ”€β”€ service.yaml -β”‚ β”‚ β”œβ”€β”€ cm-{service-name}.yaml (쑴재 μ‹œ) -β”‚ β”‚ └── secret-{service-name}.yaml (쑴재 μ‹œ) -β”‚ └── overlays/ +β”‚ β”‚ β”œβ”€β”€ common/ # 곡톡 λ¦¬μ†ŒμŠ€ +β”‚ β”‚ └── {μ„œλΉ„μŠ€λͺ…}/ # 각 μ„œλΉ„μŠ€λ³„ λ§€λ‹ˆνŽ˜μŠ€νŠΈ +β”‚ └── overlays/ # ν™˜κ²½λ³„ μ˜€λ²„λ ˆμ΄ β”‚ β”œβ”€β”€ dev/ -β”‚ β”‚ β”œβ”€β”€ kustomization.yaml -β”‚ β”‚ β”œβ”€β”€ cm-common-patch.yaml -β”‚ β”‚ β”œβ”€β”€ secret-common-patch.yaml -β”‚ β”‚ β”œβ”€β”€ ingress-patch.yaml -β”‚ β”‚ β”œβ”€β”€ deployment-{service-name}-patch.yaml -β”‚ β”‚ └── secret-{service-name}-patch.yaml β”‚ β”œβ”€β”€ staging/ β”‚ └── prod/ -β”œβ”€β”€ config/ +β”œβ”€β”€ config/ # ν™˜κ²½λ³„ μ„€μ • β”‚ β”œβ”€β”€ deploy_env_vars_dev β”‚ β”œβ”€β”€ deploy_env_vars_staging β”‚ └── deploy_env_vars_prod -β”œβ”€β”€ scripts/ +β”œβ”€β”€ scripts/ # 배포 슀크립트 β”‚ └── deploy-actions.sh -└── workflows/ +└── workflows/ # GitHub Actions μ›Œν¬ν”Œλ‘œμš° └── backend-cicd.yaml ``` +### νŒŒμ΄ν”„λΌμΈ μ›Œν¬ν”Œλ‘œμš° +1. **Build & Test**: Gradle λΉŒλ“œ 및 λ‹¨μœ„ ν…ŒμŠ€νŠΈ +2. **SonarQube Analysis**: μ½”λ“œ ν’ˆμ§ˆ 뢄석 (선택적) +3. **Container Build & Push**: ν™˜κ²½λ³„ 이미지 λΉŒλ“œ 및 ACR ν‘Έμ‹œ +4. **Kustomize Deploy**: ν™˜κ²½λ³„ λ§€λ‹ˆνŽ˜μŠ€νŠΈ 적용 + ## βš™οΈ GitHub Repository μ„€μ • ### 1. Repository Secrets μ„€μ • -Repository Settings > Secrets and variables > Actions > Repository secrets에 λ‹€μŒμ„ 등둝: +GitHub Repository > Settings > Secrets and variables > Actions > Repository secrets에 λ‹€μŒ ν•­λͺ©λ“€μ„ λ“±λ‘ν•˜μ„Έμš”: -```yaml -# Azure Service Principal +#### Azure 인증 정보 +```json AZURE_CREDENTIALS: { - "clientId": "{ν΄λΌμ΄μ–ΈνŠΈID}", - "clientSecret": "{ν΄λΌμ΄μ–ΈνŠΈμ‹œν¬λ¦Ώ}", - "subscriptionId": "{ꡬ독ID}", - "tenantId": "{ν…Œλ„ŒνŠΈID}" + "clientId": "5e4b5b41-7208-48b7-b821-d6d5acf50ecf", + "clientSecret": "ldu8Q~GQEzFYU.dJX7_QsahR7n7C2xqkIM6hqbV8", + "subscriptionId": "2513dd36-7978-48e3-9a7c-b221d4874f66", + "tenantId": "4f0a3bfd-1156-4cce-8dc2-a049a13dba23" } +``` -# ACR Credentials +#### ACR Credentials +```bash +# ACR 자격 증λͺ… 확인 λͺ…λ Ήμ–΄ +az acr credential show --name acrdigitalgarage01 +``` +``` ACR_USERNAME: acrdigitalgarage01 ACR_PASSWORD: {ACRνŒ¨μŠ€μ›Œλ“œ} +``` -# Docker Hub (Rate Limit ν•΄κ²°μš©) +#### SonarQube μ„€μ • +```bash +# SonarQube URL 확인 +kubectl get svc -n sonarqube +``` +``` +SONAR_HOST_URL: http://{External IP} +SONAR_TOKEN: {SonarQube토큰} +``` + +**SonarQube 토큰 생성 방법**: +1. SonarQube 둜그인 ν›„ 우츑 상단 'Administrator' > My Account 클릭 +2. Security νƒ­ 선택 ν›„ 토큰 생성 + +#### Docker Hub μ„€μ • (Rate Limit ν•΄κ²°) +``` DOCKERHUB_USERNAME: {Docker Hub μ‚¬μš©μžλͺ…} DOCKERHUB_PASSWORD: {Docker Hub νŒ¨μŠ€μ›Œλ“œ} - -# SonarQube (선택사항) -SONAR_TOKEN: {SonarQube토큰} -SONAR_HOST_URL: {SonarQubeμ„œλ²„URL} ``` ### 2. Repository Variables μ„€μ • -Repository Settings > Secrets and variables > Actions > Variables > Repository variables에 등둝: +GitHub Repository > Settings > Secrets and variables > Actions > Variables > Repository variables에 등둝: -```yaml -ENVIRONMENT: dev # κΈ°λ³Έκ°’ -SKIP_SONARQUBE: true # κΈ°λ³Έκ°’ +``` +ENVIRONMENT: dev +SKIP_SONARQUBE: true ``` -### 3. ACR νŒ¨μŠ€μ›Œλ“œ 확인 방법 +## πŸš€ νŒŒμ΄ν”„λΌμΈ μ‹€ν–‰ 방법 +### μžλ™ μ‹€ν–‰ +- **Push/PR 트리거**: main, develop 브랜치둜 pushμ‹œ μžλ™ μ‹€ν–‰ +- **κΈ°λ³Έ μ„€μ •**: ENVIRONMENT=dev, SKIP_SONARQUBE=true + +### μˆ˜λ™ μ‹€ν–‰ +1. GitHub Repository > Actions νƒ­ +2. "Backend Services CI/CD" μ›Œν¬ν”Œλ‘œμš° 선택 +3. "Run workflow" λ²„νŠΌ 클릭 +4. ν™˜κ²½ 선택 (dev/staging/prod) +5. SonarQube 뢄석 μ—¬λΆ€ 선택 (true/false) + +## πŸ“¦ 배포 ν™˜κ²½λ³„ μ„€μ • + +### DEV ν™˜κ²½ +- **Namespace**: phonebill-dev +- **Replicas**: λͺ¨λ“  μ„œλΉ„μŠ€ 1개 +- **Resources**: CPU 256m/1024m, Memory 256Mi/1024Mi +- **Profile**: dev (DDL_AUTO: update) +- **SSL**: λΉ„ν™œμ„±ν™” + +### STAGING ν™˜κ²½ +- **Namespace**: phonebill-staging +- **Replicas**: λͺ¨λ“  μ„œλΉ„μŠ€ 2개 +- **Resources**: CPU 512m/2048m, Memory 512Mi/2048Mi +- **Profile**: staging (DDL_AUTO: validate) +- **SSL**: ν™œμ„±ν™” + +### PROD ν™˜κ²½ +- **Namespace**: phonebill-prod +- **Replicas**: λͺ¨λ“  μ„œλΉ„μŠ€ 3개 +- **Resources**: CPU 1024m/4096m, Memory 1024Mi/4096Mi +- **Profile**: prod (DDL_AUTO: validate, 짧은 JWT) +- **SSL**: ν™œμ„±ν™” + +## πŸ”§ μˆ˜λ™ 배포 방법 + +### 슀크립트λ₯Ό μ΄μš©ν•œ 배포 ```bash -az acr credential show --name acrdigitalgarage01 +# κΈ°λ³Έ (dev ν™˜κ²½, latest νƒœκ·Έ) +./.github/scripts/deploy-actions.sh + +# νŠΉμ • ν™˜κ²½κ³Ό νƒœκ·Έ μ§€μ • +./.github/scripts/deploy-actions.sh staging 20241215143022 ``` -## πŸš€ CI/CD νŒŒμ΄ν”„λΌμΈ ꡬ성 - -### μ›Œν¬ν”Œλ‘œμš° 트리거 - -1. **μžλ™ μ‹€ν–‰**: - - `main`, `develop` λΈŒλžœμΉ˜μ— Push - - `main` 브랜치둜 Pull Request - -2. **μˆ˜λ™ μ‹€ν–‰**: - - Actions νƒ­ > "Backend Services CI/CD" > "Run workflow" - - ν™˜κ²½ 선택: dev/staging/prod - - SonarQube 뢄석 μ—¬λΆ€ 선택 - -### νŒŒμ΄ν”„λΌμΈ 단계 - -#### 1. Build and Test -- Gradle λΉŒλ“œ (ν…ŒμŠ€νŠΈ μ œμ™Έ) -- SonarQube 뢄석 (선택적) -- λΉŒλ“œ μ•„ν‹°νŒ©νŠΈ μ—…λ‘œλ“œ - -#### 2. Build and Push Docker Images -- Docker 이미지 λΉŒλ“œ -- ACR에 ν‘Έμ‹œ (νƒœκ·Έ: {environment}-{timestamp}) - -#### 3. Deploy to Kubernetes -- Kustomizeλ₯Ό μ΄μš©ν•œ ν™˜κ²½λ³„ 배포 -- 배포 μƒνƒœ 확인 -- Health Check - -## πŸ”§ ν™˜κ²½λ³„ μ„€μ • - -### 개발 ν™˜κ²½ (dev) -- **λ„€μž„μŠ€νŽ˜μ΄μŠ€**: phonebill-dev -- **Replicas**: 1 -- **Resources**: 256Mi/256m β†’ 1024Mi/1024m -- **DDL**: update -- **Host**: phonebill-api.20.214.196.128.nip.io -- **SSL**: false - -### μŠ€ν…Œμ΄μ§• ν™˜κ²½ (staging) -- **λ„€μž„μŠ€νŽ˜μ΄μŠ€**: phonebill-staging -- **Replicas**: 2 -- **Resources**: 512Mi/512m β†’ 2048Mi/2048m -- **DDL**: validate -- **Host**: staging.phonebill.com -- **SSL**: true (Let's Encrypt) - -### 운영 ν™˜κ²½ (prod) -- **λ„€μž„μŠ€νŽ˜μ΄μŠ€**: phonebill-prod -- **Replicas**: 3 -- **Resources**: 1024Mi/1024m β†’ 4096Mi/4096m -- **DDL**: validate -- **JWT Token**: 1μ‹œκ°„ (λ³΄μ•ˆ κ°•ν™”) -- **Host**: phonebill.com -- **SSL**: true (Let's Encrypt) - -## πŸ“ μˆ˜λ™ 배포 방법 - -### 슀크립트 μ‚¬μš© +### kubectl을 μ΄μš©ν•œ 직접 배포 ```bash -# 개발 ν™˜κ²½ 배포 -./.github/scripts/deploy-actions.sh dev latest +# Kustomize μ„€μΉ˜ +curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | bash +sudo mv kustomize /usr/local/bin/ -# μŠ€ν…Œμ΄μ§• ν™˜κ²½ 배포 -./.github/scripts/deploy-actions.sh staging 20241215123456 - -# 운영 ν™˜κ²½ 배포 -./.github/scripts/deploy-actions.sh prod 20241215123456 -``` - -### kubectl 직접 μ‚¬μš© -```bash -# ν™˜κ²½λ³„ λ””λ ‰ν† λ¦¬λ‘œ 이동 +# ν™˜κ²½λ³„ 배포 cd .github/kustomize/overlays/dev - -# 이미지 νƒœκ·Έ μ—…λ°μ΄νŠΈ -kustomize edit set image acrdigitalgarage01.azurecr.io/phonebill/api-gateway:dev-20241215123456 - -# 배포 μ‹€ν–‰ kubectl apply -k . ``` @@ -185,119 +167,91 @@ kubectl apply -k . ### 2. kubectl을 μ΄μš©ν•œ λ‘€λ°± ```bash -# νŠΉμ • λ²„μ „μœΌλ‘œ λ‘€λ°± -kubectl rollout undo deployment/api-gateway -n phonebill-dev --to-revision=2 +# 이전 λ²„μ „μœΌλ‘œ λ‘€λ°± +kubectl rollout undo deployment/user-service -n phonebill-dev --to-revision=2 # λ‘€λ°± μƒνƒœ 확인 -kubectl rollout status deployment/api-gateway -n phonebill-dev +kubectl rollout status deployment/user-service -n phonebill-dev ``` ### 3. μˆ˜λ™ 슀크립트λ₯Ό μ΄μš©ν•œ λ‘€λ°± ```bash -# 이전 μ•ˆμ • 버전 이미지 νƒœκ·Έλ‘œ 배포 -./.github/scripts/deploy-actions.sh dev 20241214123456 +# 이전 μ•ˆμ • 버전 νƒœκ·Έλ‘œ 배포 +./.github/scripts/deploy-actions.sh dev 20241215140000 ``` -## πŸ” SonarQube μ„€μ • +## πŸ“Š SonarQube Quality Gate μ„€μ • -### Quality Gate κΈ°μ€€ -- Coverage: >= 80% -- Duplicated Lines: <= 3% -- Maintainability Rating: <= A -- Reliability Rating: <= A -- Security Rating: <= A +각 μ„œλΉ„μŠ€λ³„ SonarQube ν”„λ‘œμ νŠΈμ—μ„œ λ‹€μŒ Quality Gate μ„€μ •: -### ν”„λ‘œμ νŠΈ 생성 -각 μ„œλΉ„μŠ€λ³„λ‘œ `phonebill-{service}-{environment}` ν˜•μ‹μœΌλ‘œ ν”„λ‘œμ νŠΈ 생성 +``` +Coverage: >= 80% +Duplicated Lines: <= 3% +Maintainability Rating: <= A +Reliability Rating: <= A +Security Rating: <= A +``` -## πŸ“Š λͺ¨λ‹ˆν„°λ§ 및 확인 +## πŸ› νŠΈλŸ¬λΈ”μŠˆνŒ… -### 배포 μƒνƒœ 확인 +### 1. Kustomize λΉŒλ“œ μ‹€νŒ¨ ```bash -# Pod μƒνƒœ 확인 +# Base λ§€λ‹ˆνŽ˜μŠ€νŠΈ 검증 +kubectl kustomize .github/kustomize/base/ + +# ν™˜κ²½λ³„ μ˜€λ²„λ ˆμ΄ 검증 +kubectl kustomize .github/kustomize/overlays/dev/ +``` + +### 2. 이미지 Pull μ‹€νŒ¨ +- ACR 자격 증λͺ… 확인 +- ImagePullSecret μ„€μ • 확인 + +### 3. 배포 νƒ€μž„μ•„μ›ƒ +```bash +# 배포 μƒνƒœ 확인 kubectl get pods -n phonebill-dev -# μ„œλΉ„μŠ€ μƒνƒœ 확인 -kubectl get services -n phonebill-dev - -# Ingress 확인 -kubectl get ingress -n phonebill-dev - # 둜그 확인 -kubectl logs -f deployment/api-gateway -n phonebill-dev +kubectl logs -f deployment/user-service -n phonebill-dev ``` -### Health Check +### 4. SonarQube μ—°κ²° μ‹€νŒ¨ +- SONAR_HOST_URLκ³Ό SONAR_TOKEN 확인 +- SonarQube μ„œλ²„ μƒνƒœ 확인 + +## πŸ“‹ 체크리슀트 + +### 배포 μ „ 확인사항 +- [ ] GitHub Secrets λͺ¨λ“  ν•­λͺ© μ„€μ • μ™„λ£Œ +- [ ] Repository Variables μ„€μ • μ™„λ£Œ +- [ ] ACR μ ‘κ·Ό κΆŒν•œ 확인 +- [ ] AKS ν΄λŸ¬μŠ€ν„° μ ‘κ·Ό κΆŒν•œ 확인 +- [ ] SonarQube μ„œλ²„ μƒνƒœ 확인 (뢄석 μˆ˜ν–‰μ‹œ) + +### 배포 ν›„ 확인사항 +- [ ] λͺ¨λ“  Podκ°€ Running μƒνƒœμΈμ§€ 확인 +- [ ] Service와 Ingressκ°€ μ •μƒμ μœΌλ‘œ μƒμ„±λ˜μ—ˆλŠ”μ§€ 확인 +- [ ] Health Check μ—”λ“œν¬μΈνŠΈ 응닡 확인 +- [ ] λ‘œκ·Έμ— μ—λŸ¬κ°€ μ—†λŠ”μ§€ 확인 + +## πŸ“ž 지원 및 μ—°λ½μ²˜ + +문제 λ°œμƒμ‹œ λ‹€μŒ λͺ…λ Ήμ–΄λ‘œ 디버깅 정보λ₯Ό μˆ˜μ§‘ν•˜μ—¬ μ§€μ›νŒ€μ— λ¬Έμ˜ν•˜μ„Έμš”: + ```bash -# API Gateway Health Check -kubectl -n phonebill-dev exec deployment/api-gateway -- curl -f http://localhost:8080/actuator/health +# μ‹œμŠ€ν…œ μƒνƒœ 확인 +kubectl get all -n phonebill-{ν™˜κ²½} + +# 둜그 μˆ˜μ§‘ +kubectl logs -l app.kubernetes.io/name=user-service -n phonebill-{ν™˜κ²½} + +# 이벀트 확인 +kubectl get events -n phonebill-{ν™˜κ²½} --sort-by='.lastTimestamp' ``` -## ⚠️ μ£Όμ˜μ‚¬ν•­ - -1. **ν™˜κ²½λ³„ Secret 관리**: - - ν˜„μž¬λŠ” λ™μΌν•œ κ°’μœΌλ‘œ μ„€μ •λ˜μ–΄ 있음 - - μ‹€μ œ 운영 μ‹œ ν™˜κ²½λ³„λ‘œ λ‹€λ₯Έ κ°’ μ„€μ • ν•„μš” - -2. **도메인 μ„€μ •**: - - staging/prod ν™˜κ²½μ˜ 도메인은 μ‹€μ œ κ΅¬λ§€ν•œ λ„λ©”μΈμœΌλ‘œ λ³€κ²½ ν•„μš” - - SSL μΈμ¦μ„œλŠ” cert-manager μ„€μ • ν•„μš” - -3. **λ¦¬μ†ŒμŠ€ ν•œκ³„**: - - ν™˜κ²½λ³„ λ¦¬μ†ŒμŠ€ 섀정은 μ‹€μ œ λΆ€ν•˜μ— 맞게 μ‘°μ • ν•„μš” - -4. **λ°μ΄ν„°λ² μ΄μŠ€ μ—°κ²°**: - - ν™˜κ²½λ³„λ‘œ λ‹€λ₯Έ λ°μ΄ν„°λ² μ΄μŠ€ μΈμŠ€ν„΄μŠ€ μ‚¬μš© ꢌμž₯ - -## πŸ”§ 문제 ν•΄κ²° - -### 일반적인 λ¬Έμ œλ“€ - -1. **이미지 Pull μ‹€νŒ¨**: - ```bash - # Secret 확인 - kubectl get secret secret-imagepull -n phonebill-dev -o yaml - ``` - -2. **ConfigMap/Secret μ—…λ°μ΄νŠΈ 반영 μ•ˆλ¨**: - ```bash - # Pod μž¬μ‹œμž‘ - kubectl rollout restart deployment/api-gateway -n phonebill-dev - ``` - -3. **Ingress IP ν• λ‹Ή μ•ˆλ¨**: - ```bash - # Ingress Controller μƒνƒœ 확인 - kubectl get pods -n ingress-nginx - ``` - -## πŸ“š μ°Έκ³  자료 - -- [Kustomize 곡식 λ¬Έμ„œ](https://kustomize.io/) -- [GitHub Actions λ¬Έμ„œ](https://docs.github.com/en/actions) -- [Azure Container Registry λ¬Έμ„œ](https://docs.microsoft.com/en-us/azure/container-registry/) -- [Azure Kubernetes Service λ¬Έμ„œ](https://docs.microsoft.com/en-us/azure/aks/) - --- -## 체크리슀트 +βœ… **GitHub Actions CI/CD νŒŒμ΄ν”„λΌμΈ ꡬ좕이 μ™„λ£Œλ˜μ—ˆμŠ΅λ‹ˆλ‹€!** -### 초기 μ„€μ • -- [ ] GitHub Repository Secrets μ„€μ • μ™„λ£Œ -- [ ] GitHub Repository Variables μ„€μ • μ™„λ£Œ -- [ ] Azure Service Principal 생성 및 κΆŒν•œ μ„€μ • -- [ ] ACR μ ‘κ·Ό κΆŒν•œ 확인 - -### 배포 ν…ŒμŠ€νŠΈ -- [ ] 개발 ν™˜κ²½ 배포 성곡 -- [ ] μŠ€ν…Œμ΄μ§• ν™˜κ²½ 배포 성곡 -- [ ] 운영 ν™˜κ²½ 배포 성곡 -- [ ] Health Check 톡과 -- [ ] λ‘€λ°± ν…ŒμŠ€νŠΈ 성곡 - -### λͺ¨λ‹ˆν„°λ§ μ„€μ • -- [ ] SonarQube ν”„λ‘œμ νŠΈ 생성 -- [ ] Quality Gate μ„€μ • -- [ ] μ•Œλ¦Ό μ„€μ • (선택사항) - -이 κ°€μ΄λ“œλ₯Ό 톡해 GitHub Actions 기반의 μ™„μ „ μžλ™ν™”λœ CI/CD νŒŒμ΄ν”„λΌμΈμ„ ꡬ좕할 수 μžˆμŠ΅λ‹ˆλ‹€. \ No newline at end of file +이제 μ½”λ“œλ₯Ό ν‘Έμ‹œν•˜κ±°λ‚˜ μˆ˜λ™μœΌλ‘œ μ›Œν¬ν”Œλ‘œμš°λ₯Ό μ‹€ν–‰ν•˜μ—¬ μžλ™ 배포λ₯Ό ν…ŒμŠ€νŠΈν•  수 μžˆμŠ΅λ‹ˆλ‹€. \ No newline at end of file diff --git a/.github/kustomize/base/kustomization.yaml b/.github/kustomize/base/kustomization.yaml index fcb04db..ce6062a 100644 --- a/.github/kustomize/base/kustomization.yaml +++ b/.github/kustomize/base/kustomization.yaml @@ -7,38 +7,40 @@ metadata: resources: # Common resources - namespace.yaml + - common/ingress.yaml - common/cm-common.yaml - common/secret-common.yaml - common/secret-imagepull.yaml - - common/ingress.yaml - # API Gateway service + # API Gateway - api-gateway/deployment.yaml - api-gateway/service.yaml - api-gateway/cm-api-gateway.yaml + - api-gateway/secret-api-gateway.yaml - # User service + # User Service - user-service/deployment.yaml - user-service/service.yaml - user-service/cm-user-service.yaml - user-service/secret-user-service.yaml - # Bill service + # Bill Service - bill-service/deployment.yaml - bill-service/service.yaml - bill-service/cm-bill-service.yaml - bill-service/secret-bill-service.yaml - # Product service + # Product Service - product-service/deployment.yaml - product-service/service.yaml - product-service/cm-product-service.yaml - product-service/secret-product-service.yaml - # KOS Mock service + # KOS Mock Service - kos-mock/deployment.yaml - kos-mock/service.yaml - kos-mock/cm-kos-mock.yaml + - kos-mock/secret-kos-mock.yaml images: - name: acrdigitalgarage01.azurecr.io/phonebill/api-gateway diff --git a/.github/kustomize/base/namespace.yaml b/.github/kustomize/base/namespace.yaml index b690784..e0edb58 100644 --- a/.github/kustomize/base/namespace.yaml +++ b/.github/kustomize/base/namespace.yaml @@ -1,4 +1,6 @@ apiVersion: v1 kind: Namespace metadata: - name: phonebill-default \ No newline at end of file + name: phonebill + labels: + name: phonebill \ No newline at end of file diff --git a/.github/kustomize/overlays/dev/cm-common-patch.yaml b/.github/kustomize/overlays/dev/cm-common-patch.yaml index a96b039..0511102 100644 --- a/.github/kustomize/overlays/dev/cm-common-patch.yaml +++ b/.github/kustomize/overlays/dev/cm-common-patch.yaml @@ -2,7 +2,6 @@ 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.20.214.196.128.nip.io" JWT_ACCESS_TOKEN_VALIDITY: "18000000" diff --git a/.github/kustomize/overlays/dev/ingress-patch.yaml b/.github/kustomize/overlays/dev/ingress-patch.yaml index b2bf566..3c5cec7 100644 --- a/.github/kustomize/overlays/dev/ingress-patch.yaml +++ b/.github/kustomize/overlays/dev/ingress-patch.yaml @@ -2,7 +2,6 @@ apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: phonebill - annotations: kubernetes.io/ingress.class: nginx nginx.ingress.kubernetes.io/ssl-redirect: "false" diff --git a/.github/kustomize/overlays/dev/kustomization.yaml b/.github/kustomize/overlays/dev/kustomization.yaml index 98de2ab..4ba4b35 100644 --- a/.github/kustomize/overlays/dev/kustomization.yaml +++ b/.github/kustomize/overlays/dev/kustomization.yaml @@ -39,6 +39,10 @@ patches: target: kind: Deployment name: kos-mock + - path: secret-api-gateway-patch.yaml + target: + kind: Secret + name: secret-api-gateway - path: secret-user-service-patch.yaml target: kind: Secret @@ -51,6 +55,10 @@ patches: target: kind: Secret name: secret-product-service + - path: secret-kos-mock-patch.yaml + target: + kind: Secret + name: secret-kos-mock images: - name: acrdigitalgarage01.azurecr.io/phonebill/api-gateway diff --git a/.github/kustomize/overlays/dev/secret-api-gateway-patch.yaml b/.github/kustomize/overlays/dev/secret-api-gateway-patch.yaml new file mode 100644 index 0000000..ff57af8 --- /dev/null +++ b/.github/kustomize/overlays/dev/secret-api-gateway-patch.yaml @@ -0,0 +1,7 @@ +apiVersion: v1 +kind: Secret +metadata: + name: secret-api-gateway +type: Opaque +stringData: + PLACEHOLDER: "dev-value" \ No newline at end of file diff --git a/.github/kustomize/overlays/dev/secret-common-patch.yaml b/.github/kustomize/overlays/dev/secret-common-patch.yaml index c21c3ea..b641d81 100644 --- a/.github/kustomize/overlays/dev/secret-common-patch.yaml +++ b/.github/kustomize/overlays/dev/secret-common-patch.yaml @@ -2,7 +2,6 @@ apiVersion: v1 kind: Secret metadata: name: secret-common - type: Opaque stringData: JWT_SECRET: "nwe5Yo9qaJ6FBD/Thl2/j6/SFAfNwUorAY1ZcWO2KI7uA4bmVLOCPxE9hYuUpRCOkgV2UF2DdHXtqHi3+BU/ecbz2zpHyf/720h48UbA3XOMYOX1sdM+dQ==" diff --git a/.github/kustomize/overlays/dev/secret-kos-mock-patch.yaml b/.github/kustomize/overlays/dev/secret-kos-mock-patch.yaml new file mode 100644 index 0000000..13cef26 --- /dev/null +++ b/.github/kustomize/overlays/dev/secret-kos-mock-patch.yaml @@ -0,0 +1,7 @@ +apiVersion: v1 +kind: Secret +metadata: + name: secret-kos-mock +type: Opaque +stringData: + PLACEHOLDER: "dev-value" \ No newline at end of file diff --git a/.github/kustomize/overlays/prod/cm-common-patch.yaml b/.github/kustomize/overlays/prod/cm-common-patch.yaml index b7f9b80..0511102 100644 --- a/.github/kustomize/overlays/prod/cm-common-patch.yaml +++ b/.github/kustomize/overlays/prod/cm-common-patch.yaml @@ -2,11 +2,10 @@ 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.20.214.196.128.nip.io" - JWT_ACCESS_TOKEN_VALIDITY: "3600000" + JWT_ACCESS_TOKEN_VALIDITY: "18000000" JWT_REFRESH_TOKEN_VALIDITY: "86400000" REDIS_PORT: "6379" - SPRING_PROFILES_ACTIVE: "prod" - DDL_AUTO: "validate" \ No newline at end of file + SPRING_PROFILES_ACTIVE: "dev" + DDL_AUTO: "update" \ No newline at end of file diff --git a/.github/kustomize/overlays/prod/deployment-api-gateway-patch.yaml b/.github/kustomize/overlays/prod/deployment-api-gateway-patch.yaml index e1aa47d..a0bdaec 100644 --- a/.github/kustomize/overlays/prod/deployment-api-gateway-patch.yaml +++ b/.github/kustomize/overlays/prod/deployment-api-gateway-patch.yaml @@ -3,15 +3,15 @@ kind: Deployment metadata: name: api-gateway spec: - replicas: 3 + replicas: 1 template: spec: containers: - name: api-gateway resources: requests: - memory: "1024Mi" - cpu: "1024m" + memory: "256Mi" + cpu: "256m" limits: - memory: "4096Mi" - cpu: "4096m" + memory: "1024Mi" + cpu: "1024m" \ No newline at end of file diff --git a/.github/kustomize/overlays/prod/deployment-bill-service-patch.yaml b/.github/kustomize/overlays/prod/deployment-bill-service-patch.yaml index 8ea7b73..bde12ae 100644 --- a/.github/kustomize/overlays/prod/deployment-bill-service-patch.yaml +++ b/.github/kustomize/overlays/prod/deployment-bill-service-patch.yaml @@ -3,15 +3,15 @@ kind: Deployment metadata: name: bill-service spec: - replicas: 3 + replicas: 1 template: spec: containers: - name: bill-service resources: requests: - memory: "1024Mi" - cpu: "1024m" + memory: "256Mi" + cpu: "256m" limits: - memory: "4096Mi" - cpu: "4096m" + memory: "1024Mi" + cpu: "1024m" \ No newline at end of file diff --git a/.github/kustomize/overlays/prod/deployment-kos-mock-patch.yaml b/.github/kustomize/overlays/prod/deployment-kos-mock-patch.yaml index 4fb4bc9..ab3676b 100644 --- a/.github/kustomize/overlays/prod/deployment-kos-mock-patch.yaml +++ b/.github/kustomize/overlays/prod/deployment-kos-mock-patch.yaml @@ -3,15 +3,15 @@ kind: Deployment metadata: name: kos-mock spec: - replicas: 3 + replicas: 1 template: spec: containers: - name: kos-mock resources: requests: - memory: "1024Mi" - cpu: "1024m" + memory: "256Mi" + cpu: "256m" limits: - memory: "4096Mi" - cpu: "4096m" + memory: "1024Mi" + cpu: "1024m" \ No newline at end of file diff --git a/.github/kustomize/overlays/prod/deployment-product-service-patch.yaml b/.github/kustomize/overlays/prod/deployment-product-service-patch.yaml index f7f7b00..ed481ca 100644 --- a/.github/kustomize/overlays/prod/deployment-product-service-patch.yaml +++ b/.github/kustomize/overlays/prod/deployment-product-service-patch.yaml @@ -3,15 +3,15 @@ kind: Deployment metadata: name: product-service spec: - replicas: 3 + replicas: 1 template: spec: containers: - name: product-service resources: requests: - memory: "1024Mi" - cpu: "1024m" + memory: "256Mi" + cpu: "256m" limits: - memory: "4096Mi" - cpu: "4096m" + memory: "1024Mi" + cpu: "1024m" \ No newline at end of file diff --git a/.github/kustomize/overlays/prod/deployment-user-service-patch.yaml b/.github/kustomize/overlays/prod/deployment-user-service-patch.yaml index 6ce746f..611c4e3 100644 --- a/.github/kustomize/overlays/prod/deployment-user-service-patch.yaml +++ b/.github/kustomize/overlays/prod/deployment-user-service-patch.yaml @@ -3,15 +3,15 @@ kind: Deployment metadata: name: user-service spec: - replicas: 3 + replicas: 1 template: spec: containers: - name: user-service resources: requests: - memory: "1024Mi" - cpu: "1024m" + memory: "256Mi" + cpu: "256m" limits: - memory: "4096Mi" - cpu: "4096m" + memory: "1024Mi" + cpu: "1024m" \ No newline at end of file diff --git a/.github/kustomize/overlays/prod/ingress-patch.yaml b/.github/kustomize/overlays/prod/ingress-patch.yaml index f7f9ada..3c5cec7 100644 --- a/.github/kustomize/overlays/prod/ingress-patch.yaml +++ b/.github/kustomize/overlays/prod/ingress-patch.yaml @@ -4,16 +4,11 @@ metadata: name: phonebill annotations: kubernetes.io/ingress.class: nginx - nginx.ingress.kubernetes.io/ssl-redirect: "true" - cert-manager.io/cluster-issuer: "letsencrypt-prod" + nginx.ingress.kubernetes.io/ssl-redirect: "false" spec: ingressClassName: nginx - tls: - - hosts: - - phonebill.com - secretName: prod-phonebill-tls rules: - - host: phonebill.com + - host: phonebill-api.20.214.196.128.nip.io http: paths: - path: /api/v1/auth diff --git a/.github/kustomize/overlays/prod/kustomization.yaml b/.github/kustomize/overlays/prod/kustomization.yaml index 91ba3a6..c80f95e 100644 --- a/.github/kustomize/overlays/prod/kustomization.yaml +++ b/.github/kustomize/overlays/prod/kustomization.yaml @@ -39,6 +39,10 @@ patches: target: kind: Deployment name: kos-mock + - path: secret-api-gateway-patch.yaml + target: + kind: Secret + name: secret-api-gateway - path: secret-user-service-patch.yaml target: kind: Secret @@ -51,6 +55,10 @@ patches: target: kind: Secret name: secret-product-service + - path: secret-kos-mock-patch.yaml + target: + kind: Secret + name: secret-kos-mock images: - name: acrdigitalgarage01.azurecr.io/phonebill/api-gateway diff --git a/.github/kustomize/overlays/prod/secret-api-gateway-patch.yaml b/.github/kustomize/overlays/prod/secret-api-gateway-patch.yaml new file mode 100644 index 0000000..ff57af8 --- /dev/null +++ b/.github/kustomize/overlays/prod/secret-api-gateway-patch.yaml @@ -0,0 +1,7 @@ +apiVersion: v1 +kind: Secret +metadata: + name: secret-api-gateway +type: Opaque +stringData: + PLACEHOLDER: "dev-value" \ No newline at end of file diff --git a/.github/kustomize/overlays/prod/secret-common-patch.yaml b/.github/kustomize/overlays/prod/secret-common-patch.yaml index c21c3ea..b641d81 100644 --- a/.github/kustomize/overlays/prod/secret-common-patch.yaml +++ b/.github/kustomize/overlays/prod/secret-common-patch.yaml @@ -2,7 +2,6 @@ apiVersion: v1 kind: Secret metadata: name: secret-common - type: Opaque stringData: JWT_SECRET: "nwe5Yo9qaJ6FBD/Thl2/j6/SFAfNwUorAY1ZcWO2KI7uA4bmVLOCPxE9hYuUpRCOkgV2UF2DdHXtqHi3+BU/ecbz2zpHyf/720h48UbA3XOMYOX1sdM+dQ==" diff --git a/.github/kustomize/overlays/prod/secret-kos-mock-patch.yaml b/.github/kustomize/overlays/prod/secret-kos-mock-patch.yaml new file mode 100644 index 0000000..13cef26 --- /dev/null +++ b/.github/kustomize/overlays/prod/secret-kos-mock-patch.yaml @@ -0,0 +1,7 @@ +apiVersion: v1 +kind: Secret +metadata: + name: secret-kos-mock +type: Opaque +stringData: + PLACEHOLDER: "dev-value" \ No newline at end of file diff --git a/.github/kustomize/overlays/staging/cm-common-patch.yaml b/.github/kustomize/overlays/staging/cm-common-patch.yaml index 1b70721..0511102 100644 --- a/.github/kustomize/overlays/staging/cm-common-patch.yaml +++ b/.github/kustomize/overlays/staging/cm-common-patch.yaml @@ -2,11 +2,10 @@ 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.20.214.196.128.nip.io" JWT_ACCESS_TOKEN_VALIDITY: "18000000" JWT_REFRESH_TOKEN_VALIDITY: "86400000" REDIS_PORT: "6379" - SPRING_PROFILES_ACTIVE: "staging" - DDL_AUTO: "validate" \ No newline at end of file + SPRING_PROFILES_ACTIVE: "dev" + DDL_AUTO: "update" \ No newline at end of file diff --git a/.github/kustomize/overlays/staging/deployment-api-gateway-patch.yaml b/.github/kustomize/overlays/staging/deployment-api-gateway-patch.yaml index db065e1..a0bdaec 100644 --- a/.github/kustomize/overlays/staging/deployment-api-gateway-patch.yaml +++ b/.github/kustomize/overlays/staging/deployment-api-gateway-patch.yaml @@ -3,15 +3,15 @@ kind: Deployment metadata: name: api-gateway spec: - replicas: 2 + replicas: 1 template: spec: containers: - name: api-gateway resources: requests: - memory: "512Mi" - cpu: "512m" + memory: "256Mi" + cpu: "256m" limits: - memory: "2048Mi" - cpu: "2048m" \ No newline at end of file + memory: "1024Mi" + cpu: "1024m" \ No newline at end of file diff --git a/.github/kustomize/overlays/staging/deployment-bill-service-patch.yaml b/.github/kustomize/overlays/staging/deployment-bill-service-patch.yaml index 4ebd2d2..bde12ae 100644 --- a/.github/kustomize/overlays/staging/deployment-bill-service-patch.yaml +++ b/.github/kustomize/overlays/staging/deployment-bill-service-patch.yaml @@ -3,15 +3,15 @@ kind: Deployment metadata: name: bill-service spec: - replicas: 2 + replicas: 1 template: spec: containers: - name: bill-service resources: requests: - memory: "512Mi" - cpu: "512m" + memory: "256Mi" + cpu: "256m" limits: - memory: "2048Mi" - cpu: "2048m" + memory: "1024Mi" + cpu: "1024m" \ No newline at end of file diff --git a/.github/kustomize/overlays/staging/deployment-kos-mock-patch.yaml b/.github/kustomize/overlays/staging/deployment-kos-mock-patch.yaml index cc30074..ab3676b 100644 --- a/.github/kustomize/overlays/staging/deployment-kos-mock-patch.yaml +++ b/.github/kustomize/overlays/staging/deployment-kos-mock-patch.yaml @@ -3,15 +3,15 @@ kind: Deployment metadata: name: kos-mock spec: - replicas: 2 + replicas: 1 template: spec: containers: - name: kos-mock resources: requests: - memory: "512Mi" - cpu: "512m" + memory: "256Mi" + cpu: "256m" limits: - memory: "2048Mi" - cpu: "2048m" + memory: "1024Mi" + cpu: "1024m" \ No newline at end of file diff --git a/.github/kustomize/overlays/staging/deployment-product-service-patch.yaml b/.github/kustomize/overlays/staging/deployment-product-service-patch.yaml index 2bf8c00..ed481ca 100644 --- a/.github/kustomize/overlays/staging/deployment-product-service-patch.yaml +++ b/.github/kustomize/overlays/staging/deployment-product-service-patch.yaml @@ -3,15 +3,15 @@ kind: Deployment metadata: name: product-service spec: - replicas: 2 + replicas: 1 template: spec: containers: - name: product-service resources: requests: - memory: "512Mi" - cpu: "512m" + memory: "256Mi" + cpu: "256m" limits: - memory: "2048Mi" - cpu: "2048m" + memory: "1024Mi" + cpu: "1024m" \ No newline at end of file diff --git a/.github/kustomize/overlays/staging/deployment-user-service-patch.yaml b/.github/kustomize/overlays/staging/deployment-user-service-patch.yaml index 2a75059..611c4e3 100644 --- a/.github/kustomize/overlays/staging/deployment-user-service-patch.yaml +++ b/.github/kustomize/overlays/staging/deployment-user-service-patch.yaml @@ -3,15 +3,15 @@ kind: Deployment metadata: name: user-service spec: - replicas: 2 + replicas: 1 template: spec: containers: - name: user-service resources: requests: - memory: "512Mi" - cpu: "512m" + memory: "256Mi" + cpu: "256m" limits: - memory: "2048Mi" - cpu: "2048m" + memory: "1024Mi" + cpu: "1024m" \ No newline at end of file diff --git a/.github/kustomize/overlays/staging/ingress-patch.yaml b/.github/kustomize/overlays/staging/ingress-patch.yaml index 152a2b6..3c5cec7 100644 --- a/.github/kustomize/overlays/staging/ingress-patch.yaml +++ b/.github/kustomize/overlays/staging/ingress-patch.yaml @@ -4,16 +4,11 @@ metadata: name: phonebill annotations: kubernetes.io/ingress.class: nginx - nginx.ingress.kubernetes.io/ssl-redirect: "true" - cert-manager.io/cluster-issuer: "letsencrypt-prod" + nginx.ingress.kubernetes.io/ssl-redirect: "false" spec: ingressClassName: nginx - tls: - - hosts: - - staging.phonebill.com - secretName: staging-phonebill-tls rules: - - host: staging.phonebill.com + - host: phonebill-api.20.214.196.128.nip.io http: paths: - path: /api/v1/auth diff --git a/.github/kustomize/overlays/staging/kustomization.yaml b/.github/kustomize/overlays/staging/kustomization.yaml index daffaa8..de16689 100644 --- a/.github/kustomize/overlays/staging/kustomization.yaml +++ b/.github/kustomize/overlays/staging/kustomization.yaml @@ -39,6 +39,10 @@ patches: target: kind: Deployment name: kos-mock + - path: secret-api-gateway-patch.yaml + target: + kind: Secret + name: secret-api-gateway - path: secret-user-service-patch.yaml target: kind: Secret @@ -51,6 +55,10 @@ patches: target: kind: Secret name: secret-product-service + - path: secret-kos-mock-patch.yaml + target: + kind: Secret + name: secret-kos-mock images: - name: acrdigitalgarage01.azurecr.io/phonebill/api-gateway diff --git a/.github/kustomize/overlays/staging/secret-api-gateway-patch.yaml b/.github/kustomize/overlays/staging/secret-api-gateway-patch.yaml new file mode 100644 index 0000000..ff57af8 --- /dev/null +++ b/.github/kustomize/overlays/staging/secret-api-gateway-patch.yaml @@ -0,0 +1,7 @@ +apiVersion: v1 +kind: Secret +metadata: + name: secret-api-gateway +type: Opaque +stringData: + PLACEHOLDER: "dev-value" \ No newline at end of file diff --git a/.github/kustomize/overlays/staging/secret-common-patch.yaml b/.github/kustomize/overlays/staging/secret-common-patch.yaml index c21c3ea..b641d81 100644 --- a/.github/kustomize/overlays/staging/secret-common-patch.yaml +++ b/.github/kustomize/overlays/staging/secret-common-patch.yaml @@ -2,7 +2,6 @@ apiVersion: v1 kind: Secret metadata: name: secret-common - type: Opaque stringData: JWT_SECRET: "nwe5Yo9qaJ6FBD/Thl2/j6/SFAfNwUorAY1ZcWO2KI7uA4bmVLOCPxE9hYuUpRCOkgV2UF2DdHXtqHi3+BU/ecbz2zpHyf/720h48UbA3XOMYOX1sdM+dQ==" diff --git a/.github/kustomize/overlays/staging/secret-kos-mock-patch.yaml b/.github/kustomize/overlays/staging/secret-kos-mock-patch.yaml new file mode 100644 index 0000000..13cef26 --- /dev/null +++ b/.github/kustomize/overlays/staging/secret-kos-mock-patch.yaml @@ -0,0 +1,7 @@ +apiVersion: v1 +kind: Secret +metadata: + name: secret-kos-mock +type: Opaque +stringData: + PLACEHOLDER: "dev-value" \ No newline at end of file diff --git a/.github/workflows/backend-cicd.yaml b/.github/workflows/backend-cicd.yaml index def6f78..c168d0c 100644 --- a/.github/workflows/backend-cicd.yaml +++ b/.github/workflows/backend-cicd.yaml @@ -271,22 +271,4 @@ jobs: kubectl -n phonebill-${{ env.ENVIRONMENT }} wait --for=condition=available deployment/user-service --timeout=300s kubectl -n phonebill-${{ env.ENVIRONMENT }} wait --for=condition=available deployment/bill-service --timeout=300s kubectl -n phonebill-${{ env.ENVIRONMENT }} wait --for=condition=available deployment/product-service --timeout=300s - kubectl -n phonebill-${{ env.ENVIRONMENT }} wait --for=condition=available deployment/kos-mock --timeout=300s - - - name: Health Check - run: | - echo "πŸ” Health Check starting..." - - # API Gateway Health Check - GATEWAY_POD=$(kubectl get pod -n phonebill-${{ env.ENVIRONMENT }} -l app.kubernetes.io/name=api-gateway -o jsonpath='{.items[0].metadata.name}') - kubectl -n phonebill-${{ env.ENVIRONMENT }} exec $GATEWAY_POD -- curl -f http://localhost:8080/actuator/health || exit 1 - - echo "βœ… All services are healthy!" - - - name: Get service information - run: | - echo "πŸ“‹ Service Information:" - kubectl get pods -n phonebill-${{ env.ENVIRONMENT }} - kubectl get services -n phonebill-${{ env.ENVIRONMENT }} - kubectl get ingress -n phonebill-${{ env.ENVIRONMENT }} - echo "Ingress IP: $(kubectl -n phonebill-${{ env.ENVIRONMENT }} get ingress phonebill -o jsonpath='{.status.loadBalancer.ingress[0].ip}' 2>/dev/null || echo 'Pending')" \ No newline at end of file + kubectl -n phonebill-${{ env.ENVIRONMENT }} wait --for=condition=available deployment/kos-mock --timeout=300s \ No newline at end of file