mirror of
https://github.com/cna-bootcamp/phonebill.git
synced 2026-06-13 03:59:10 +00:00
Jenkins 기반 CI/CD 파이프라인 구성
- Kustomize 기반 환경별(dev/staging/prod) 매니페스트 관리 - Jenkins 파이프라인 스크립트 작성 (Podman, Gradle, kubectl 컨테이너) - SonarQube 코드 품질 분석 및 Quality Gate 연동 - 수동 배포 및 리소스 검증 스크립트 추가 - k8s 매니페스트 구조 재정리 (configmaps, secrets, deployments, services 분리) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: cm-common
|
||||
name: phonebill-common-config
|
||||
labels:
|
||||
app.kubernetes.io/part-of: phonebill
|
||||
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: "3600000"
|
||||
JWT_REFRESH_TOKEN_VALIDITY: "43200000"
|
||||
REDIS_PORT: "6379"
|
||||
SPRING_PROFILES_ACTIVE: "prod"
|
||||
DDL_AUTO: "validate"
|
||||
REDIS_HOST: "cache-redis-master"
|
||||
REDIS_PORT: "6379"
|
||||
CORS_ALLOWED_ORIGINS: "https://phonebill.example.com"
|
||||
SHOW_SQL: "false"
|
||||
DDL_AUTO: "validate"
|
||||
|
||||
@@ -1,9 +1,14 @@
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: phonebill
|
||||
name: phonebill-ingress
|
||||
labels:
|
||||
app.kubernetes.io/part-of: phonebill
|
||||
annotations:
|
||||
kubernetes.io/ingress.class: nginx
|
||||
nginx.ingress.kubernetes.io/proxy-body-size: "50m"
|
||||
nginx.ingress.kubernetes.io/proxy-read-timeout: "60"
|
||||
nginx.ingress.kubernetes.io/proxy-send-timeout: "60"
|
||||
nginx.ingress.kubernetes.io/proxy-connect-timeout: "60"
|
||||
nginx.ingress.kubernetes.io/ssl-redirect: "true"
|
||||
cert-manager.io/cluster-issuer: "letsencrypt-prod"
|
||||
spec:
|
||||
@@ -16,38 +21,10 @@ spec:
|
||||
- host: phonebill.example.com
|
||||
http:
|
||||
paths:
|
||||
- path: /api/v1/auth
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: user-service
|
||||
name: api-gateway
|
||||
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
|
||||
number: 8080
|
||||
|
||||
@@ -1,16 +1,27 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
namespace: phonebill-dg0500
|
||||
namespace: phonebill-prod
|
||||
|
||||
resources:
|
||||
- ../../base
|
||||
|
||||
patches:
|
||||
# Common patches
|
||||
- path: cm-common-patch.yaml
|
||||
target:
|
||||
kind: ConfigMap
|
||||
name: cm-common
|
||||
name: phonebill-common-config
|
||||
- path: secret-common-patch.yaml
|
||||
target:
|
||||
kind: Secret
|
||||
name: phonebill-common-secret
|
||||
- path: ingress-patch.yaml
|
||||
target:
|
||||
kind: Ingress
|
||||
name: phonebill-ingress
|
||||
|
||||
# Deployment patches
|
||||
- path: deployment-api-gateway-patch.yaml
|
||||
target:
|
||||
kind: Deployment
|
||||
@@ -31,35 +42,29 @@ patches:
|
||||
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
|
||||
|
||||
# Service Secret patches
|
||||
- path: secret-user-service-patch.yaml
|
||||
target:
|
||||
kind: Secret
|
||||
name: secret-user-service
|
||||
name: user-service-db-secret
|
||||
- path: secret-bill-service-patch.yaml
|
||||
target:
|
||||
kind: Secret
|
||||
name: secret-bill-service
|
||||
name: bill-service-db-secret
|
||||
- path: secret-product-service-patch.yaml
|
||||
target:
|
||||
kind: Secret
|
||||
name: secret-product-service
|
||||
name: product-service-db-secret
|
||||
|
||||
images:
|
||||
- name: acrdigitalgarage01.azurecr.io/phonebill/api-gateway
|
||||
- name: docker.io/hiondal/api-gateway
|
||||
newTag: latest
|
||||
- name: acrdigitalgarage01.azurecr.io/phonebill/user-service
|
||||
- name: docker.io/hiondal/user-service
|
||||
newTag: latest
|
||||
- name: acrdigitalgarage01.azurecr.io/phonebill/bill-service
|
||||
- name: docker.io/hiondal/bill-service
|
||||
newTag: latest
|
||||
- name: acrdigitalgarage01.azurecr.io/phonebill/product-service
|
||||
- name: docker.io/hiondal/product-service
|
||||
newTag: latest
|
||||
- name: docker.io/hiondal/kos-mock
|
||||
newTag: latest
|
||||
- name: acrdigitalgarage01.azurecr.io/phonebill/kos-mock
|
||||
newTag: latest
|
||||
@@ -1,10 +1,11 @@
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: secret-bill-service
|
||||
name: bill-service-db-secret
|
||||
labels:
|
||||
app: bill-service
|
||||
app.kubernetes.io/part-of: phonebill
|
||||
type: Opaque
|
||||
stringData:
|
||||
DB_HOST: "bill-inquiry-postgres-dev-postgresql"
|
||||
DB_NAME: "bill_inquiry_db"
|
||||
DB_USERNAME: "bill_inquiry_user"
|
||||
DB_PASSWORD: "BillUser2025@"
|
||||
DB_USERNAME: "unicorn"
|
||||
DB_PASSWORD: "PROD_DB_PASSWORD"
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: secret-common
|
||||
name: phonebill-common-secret
|
||||
labels:
|
||||
app.kubernetes.io/part-of: phonebill
|
||||
type: Opaque
|
||||
stringData:
|
||||
JWT_SECRET: "nwe5Yo9qaJ6FBD/Thl2/j6/SFAfNwUorAY1ZcWO2KI7uA4bmVLOCPxE9hYuUpRCOkgV2UF2DdHXtqHi3+BU/ecbz2zpHyf/720h48UbA3XOMYOX1sdM+dQ=="
|
||||
REDIS_HOST: "redis-cache-dev-master"
|
||||
REDIS_PASSWORD: "Redis2025Dev@"
|
||||
JWT_SECRET: "PROD_JWT_SECRET_REPLACE_WITH_SECURE_VALUE"
|
||||
REDIS_PASSWORD: "PROD_REDIS_PASSWORD"
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: secret-product-service
|
||||
name: product-service-db-secret
|
||||
labels:
|
||||
app: product-service
|
||||
app.kubernetes.io/part-of: phonebill
|
||||
type: Opaque
|
||||
stringData:
|
||||
DB_HOST: "product-change-postgres-dev-postgresql"
|
||||
DB_NAME: "product_change_db"
|
||||
DB_USERNAME: "product_change_user"
|
||||
DB_PASSWORD: "ProductUser2025@"
|
||||
DB_USERNAME: "unicorn"
|
||||
DB_PASSWORD: "PROD_DB_PASSWORD"
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: secret-user-service
|
||||
name: user-service-db-secret
|
||||
labels:
|
||||
app: user-service
|
||||
app.kubernetes.io/part-of: phonebill
|
||||
type: Opaque
|
||||
stringData:
|
||||
DB_HOST: "auth-postgres-dev-postgresql"
|
||||
DB_NAME: "phonebill_auth"
|
||||
DB_USERNAME: "auth_user"
|
||||
DB_PASSWORD: "AuthUser2025@"
|
||||
DB_USERNAME: "unicorn"
|
||||
DB_PASSWORD: "PROD_DB_PASSWORD"
|
||||
|
||||
Reference in New Issue
Block a user