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) - Base 및 Overlay 구조로 환경별 설정 분리 - 각 환경별 Deployment, Service, ConfigMap, Secret 패치 적용 - Jenkinsfile 작성 (Gradle JDK21, SonarQube, Quality Gate 포함) - 환경별 설정 파일 및 수동 배포 스크립트 생성 - Jenkins CI/CD 가이드 문서 및 검증 스크립트 작성 - DEV 환경 Ingress Host를 base와 동일하게 수정 (체크리스트 준수) 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -2,8 +2,9 @@ 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"
|
||||
CORS_ALLOWED_ORIGINS: "http://localhost:8081,http://localhost:8082,http://localhost:8083,http://localhost:8084,http://phonebill-dev.20.214.196.128.nip.io"
|
||||
JWT_ACCESS_TOKEN_VALIDITY: "18000000"
|
||||
JWT_REFRESH_TOKEN_VALIDITY: "86400000"
|
||||
REDIS_PORT: "6379"
|
||||
|
||||
@@ -2,16 +2,18 @@ apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: api-gateway
|
||||
|
||||
spec:
|
||||
replicas: 1
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: api-gateway
|
||||
image: acrdigitalgarage01.azurecr.io/phonebill/api-gateway:dev-latest
|
||||
resources:
|
||||
requests:
|
||||
memory: "256Mi"
|
||||
cpu: "256m"
|
||||
cpu: 256m
|
||||
memory: 256Mi
|
||||
limits:
|
||||
memory: "1024Mi"
|
||||
cpu: "1024m"
|
||||
cpu: 1024m
|
||||
memory: 1024Mi
|
||||
@@ -2,16 +2,18 @@ apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: bill-service
|
||||
|
||||
spec:
|
||||
replicas: 1
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: bill-service
|
||||
image: acrdigitalgarage01.azurecr.io/phonebill/bill-service:dev-latest
|
||||
resources:
|
||||
requests:
|
||||
memory: "256Mi"
|
||||
cpu: "256m"
|
||||
cpu: 256m
|
||||
memory: 256Mi
|
||||
limits:
|
||||
memory: "1024Mi"
|
||||
cpu: "1024m"
|
||||
cpu: 1024m
|
||||
memory: 1024Mi
|
||||
@@ -2,16 +2,18 @@ apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: kos-mock
|
||||
|
||||
spec:
|
||||
replicas: 1
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: kos-mock
|
||||
image: acrdigitalgarage01.azurecr.io/phonebill/kos-mock:dev-latest
|
||||
resources:
|
||||
requests:
|
||||
memory: "256Mi"
|
||||
cpu: "256m"
|
||||
cpu: 256m
|
||||
memory: 256Mi
|
||||
limits:
|
||||
memory: "1024Mi"
|
||||
cpu: "1024m"
|
||||
cpu: 1024m
|
||||
memory: 1024Mi
|
||||
@@ -2,16 +2,18 @@ apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: product-service
|
||||
|
||||
spec:
|
||||
replicas: 1
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: product-service
|
||||
image: acrdigitalgarage01.azurecr.io/phonebill/product-service:dev-latest
|
||||
resources:
|
||||
requests:
|
||||
memory: "256Mi"
|
||||
cpu: "256m"
|
||||
cpu: 256m
|
||||
memory: 256Mi
|
||||
limits:
|
||||
memory: "1024Mi"
|
||||
cpu: "1024m"
|
||||
cpu: 1024m
|
||||
memory: 1024Mi
|
||||
@@ -2,16 +2,18 @@ apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: user-service
|
||||
|
||||
spec:
|
||||
replicas: 1
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: user-service
|
||||
image: acrdigitalgarage01.azurecr.io/phonebill/user-service:dev-latest
|
||||
resources:
|
||||
requests:
|
||||
memory: "256Mi"
|
||||
cpu: "256m"
|
||||
cpu: 256m
|
||||
memory: 256Mi
|
||||
limits:
|
||||
memory: "1024Mi"
|
||||
cpu: "1024m"
|
||||
cpu: 1024m
|
||||
memory: 1024Mi
|
||||
@@ -5,6 +5,7 @@ metadata:
|
||||
annotations:
|
||||
kubernetes.io/ingress.class: nginx
|
||||
nginx.ingress.kubernetes.io/ssl-redirect: "false"
|
||||
|
||||
spec:
|
||||
ingressClassName: nginx
|
||||
rules:
|
||||
|
||||
@@ -1,16 +1,46 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
namespace: phonebill-dev
|
||||
metadata:
|
||||
name: phonebill-dev
|
||||
|
||||
resources:
|
||||
- ../../base
|
||||
|
||||
namespace: phonebill-dev
|
||||
|
||||
labels:
|
||||
- pairs:
|
||||
env: dev
|
||||
|
||||
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
|
||||
|
||||
patches:
|
||||
# Common patches
|
||||
- path: configmap-common-patch.yaml
|
||||
target:
|
||||
kind: ConfigMap
|
||||
name: cm-common
|
||||
- path: secret-common-patch.yaml
|
||||
target:
|
||||
kind: Secret
|
||||
name: secret-common
|
||||
- path: ingress-patch.yaml
|
||||
target:
|
||||
kind: Ingress
|
||||
name: phonebill
|
||||
|
||||
# Deployment patches
|
||||
- path: deployment-api-gateway-patch.yaml
|
||||
target:
|
||||
kind: Deployment
|
||||
@@ -31,14 +61,8 @@ patches:
|
||||
target:
|
||||
kind: Deployment
|
||||
name: kos-mock
|
||||
- path: ingress-patch.yaml
|
||||
target:
|
||||
kind: Ingress
|
||||
name: phonebill-ingress
|
||||
- path: secret-common-patch.yaml
|
||||
target:
|
||||
kind: Secret
|
||||
name: secret-common
|
||||
|
||||
# Secret patches
|
||||
- path: secret-user-service-patch.yaml
|
||||
target:
|
||||
kind: Secret
|
||||
@@ -50,21 +74,4 @@ patches:
|
||||
- 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
|
||||
|
||||
namePrefix: dev-
|
||||
|
||||
commonLabels:
|
||||
environment: dev
|
||||
name: secret-product-service
|
||||
@@ -2,6 +2,7 @@ apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: secret-bill-service
|
||||
|
||||
type: Opaque
|
||||
stringData:
|
||||
DB_HOST: "bill-inquiry-postgres-dev-postgresql"
|
||||
|
||||
@@ -2,6 +2,7 @@ apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: secret-common
|
||||
|
||||
type: Opaque
|
||||
stringData:
|
||||
JWT_SECRET: "nwe5Yo9qaJ6FBD/Thl2/j6/SFAfNwUorAY1ZcWO2KI7uA4bmVLOCPxE9hYuUpRCOkgV2UF2DdHXtqHi3+BU/ecbz2zpHyf/720h48UbA3XOMYOX1sdM+dQ=="
|
||||
|
||||
@@ -2,6 +2,7 @@ apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: secret-product-service
|
||||
|
||||
type: Opaque
|
||||
stringData:
|
||||
DB_HOST: "product-change-postgres-dev-postgresql"
|
||||
|
||||
@@ -2,6 +2,7 @@ apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: secret-user-service
|
||||
|
||||
type: Opaque
|
||||
stringData:
|
||||
DB_HOST: "auth-postgres-dev-postgresql"
|
||||
|
||||
@@ -1,11 +1,28 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: cm-common
|
||||
name: common-config
|
||||
data:
|
||||
CORS_ALLOWED_ORIGINS: "https://phonebill-prod.example.com"
|
||||
JWT_ACCESS_TOKEN_VALIDITY: "3600000"
|
||||
JWT_REFRESH_TOKEN_VALIDITY: "43200000"
|
||||
REDIS_PORT: "6379"
|
||||
# Production Spring profiles
|
||||
SPRING_PROFILES_ACTIVE: "prod"
|
||||
DDL_AUTO: "validate"
|
||||
|
||||
# Production database settings
|
||||
DDL_AUTO: "validate"
|
||||
|
||||
# Production logging level
|
||||
LOGGING_LEVEL_ROOT: "INFO"
|
||||
LOGGING_LEVEL_COM_PHONEBILL: "INFO"
|
||||
|
||||
# Production security settings
|
||||
SECURITY_CORS_ALLOWED_ORIGINS: "https://phonebill.production-domain.com"
|
||||
|
||||
# JWT Token settings for production (shorter expiry for security)
|
||||
JWT_EXPIRATION: "1800000" # 30 minutes
|
||||
|
||||
# Redis settings for production
|
||||
REDIS_HOST: "redis-service.phonebill-prod.svc.cluster.local"
|
||||
REDIS_PORT: "6379"
|
||||
|
||||
# Production specific configurations
|
||||
MANAGEMENT_ENDPOINTS_WEB_EXPOSURE_INCLUDE: "health,info,prometheus"
|
||||
MANAGEMENT_ENDPOINT_HEALTH_SHOW_DETAILS: "when-authorized"
|
||||
@@ -3,15 +3,22 @@ kind: Deployment
|
||||
metadata:
|
||||
name: api-gateway
|
||||
spec:
|
||||
replicas: 1
|
||||
replicas: 3
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: api-gateway
|
||||
resources:
|
||||
requests:
|
||||
memory: "256Mi"
|
||||
cpu: "256m"
|
||||
limits:
|
||||
memory: "1024Mi"
|
||||
cpu: "1024m"
|
||||
- name: api-gateway
|
||||
resources:
|
||||
requests:
|
||||
cpu: "1024m"
|
||||
memory: "1024Mi"
|
||||
limits:
|
||||
cpu: "4096m"
|
||||
memory: "4096Mi"
|
||||
env:
|
||||
- name: SPRING_PROFILES_ACTIVE
|
||||
value: "prod"
|
||||
- name: SERVER_PORT
|
||||
value: "8080"
|
||||
- name: MANAGEMENT_SERVER_PORT
|
||||
value: "8081"
|
||||
@@ -3,15 +3,24 @@ kind: Deployment
|
||||
metadata:
|
||||
name: bill-service
|
||||
spec:
|
||||
replicas: 1
|
||||
replicas: 3
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: bill-service
|
||||
resources:
|
||||
requests:
|
||||
memory: "256Mi"
|
||||
cpu: "256m"
|
||||
limits:
|
||||
memory: "1024Mi"
|
||||
cpu: "1024m"
|
||||
- name: bill-service
|
||||
resources:
|
||||
requests:
|
||||
cpu: "1024m"
|
||||
memory: "1024Mi"
|
||||
limits:
|
||||
cpu: "4096m"
|
||||
memory: "4096Mi"
|
||||
env:
|
||||
- name: SPRING_PROFILES_ACTIVE
|
||||
value: "prod"
|
||||
- name: SERVER_PORT
|
||||
value: "8080"
|
||||
- name: MANAGEMENT_SERVER_PORT
|
||||
value: "8081"
|
||||
- name: SPRING_JPA_HIBERNATE_DDL_AUTO
|
||||
value: "validate"
|
||||
@@ -3,15 +3,22 @@ kind: Deployment
|
||||
metadata:
|
||||
name: kos-mock
|
||||
spec:
|
||||
replicas: 1
|
||||
replicas: 3
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: kos-mock
|
||||
resources:
|
||||
requests:
|
||||
memory: "256Mi"
|
||||
cpu: "256m"
|
||||
limits:
|
||||
memory: "1024Mi"
|
||||
cpu: "1024m"
|
||||
- name: kos-mock
|
||||
resources:
|
||||
requests:
|
||||
cpu: "1024m"
|
||||
memory: "1024Mi"
|
||||
limits:
|
||||
cpu: "4096m"
|
||||
memory: "4096Mi"
|
||||
env:
|
||||
- name: SPRING_PROFILES_ACTIVE
|
||||
value: "prod"
|
||||
- name: SERVER_PORT
|
||||
value: "8080"
|
||||
- name: MANAGEMENT_SERVER_PORT
|
||||
value: "8081"
|
||||
@@ -3,15 +3,24 @@ kind: Deployment
|
||||
metadata:
|
||||
name: product-service
|
||||
spec:
|
||||
replicas: 1
|
||||
replicas: 3
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: product-service
|
||||
resources:
|
||||
requests:
|
||||
memory: "256Mi"
|
||||
cpu: "256m"
|
||||
limits:
|
||||
memory: "1024Mi"
|
||||
cpu: "1024m"
|
||||
- name: product-service
|
||||
resources:
|
||||
requests:
|
||||
cpu: "1024m"
|
||||
memory: "1024Mi"
|
||||
limits:
|
||||
cpu: "4096m"
|
||||
memory: "4096Mi"
|
||||
env:
|
||||
- name: SPRING_PROFILES_ACTIVE
|
||||
value: "prod"
|
||||
- name: SERVER_PORT
|
||||
value: "8080"
|
||||
- name: MANAGEMENT_SERVER_PORT
|
||||
value: "8081"
|
||||
- name: SPRING_JPA_HIBERNATE_DDL_AUTO
|
||||
value: "validate"
|
||||
@@ -3,15 +3,24 @@ kind: Deployment
|
||||
metadata:
|
||||
name: user-service
|
||||
spec:
|
||||
replicas: 1
|
||||
replicas: 3
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: user-service
|
||||
resources:
|
||||
requests:
|
||||
memory: "256Mi"
|
||||
cpu: "256m"
|
||||
limits:
|
||||
memory: "1024Mi"
|
||||
cpu: "1024m"
|
||||
- name: user-service
|
||||
resources:
|
||||
requests:
|
||||
cpu: "1024m"
|
||||
memory: "1024Mi"
|
||||
limits:
|
||||
cpu: "4096m"
|
||||
memory: "4096Mi"
|
||||
env:
|
||||
- name: SPRING_PROFILES_ACTIVE
|
||||
value: "prod"
|
||||
- name: SERVER_PORT
|
||||
value: "8080"
|
||||
- name: MANAGEMENT_SERVER_PORT
|
||||
value: "8081"
|
||||
- name: SPRING_JPA_HIBERNATE_DDL_AUTO
|
||||
value: "validate"
|
||||
@@ -1,54 +1,57 @@
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: phonebill
|
||||
name: phonebill-ingress
|
||||
annotations:
|
||||
kubernetes.io/ingress.class: nginx
|
||||
kubernetes.io/ingress.class: "nginx"
|
||||
nginx.ingress.kubernetes.io/ssl-redirect: "true"
|
||||
nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
|
||||
cert-manager.io/cluster-issuer: "letsencrypt-prod"
|
||||
nginx.ingress.kubernetes.io/proxy-body-size: "10m"
|
||||
nginx.ingress.kubernetes.io/proxy-read-timeout: "300"
|
||||
nginx.ingress.kubernetes.io/proxy-send-timeout: "300"
|
||||
nginx.ingress.kubernetes.io/proxy-connect-timeout: "300"
|
||||
spec:
|
||||
ingressClassName: nginx
|
||||
tls:
|
||||
- hosts:
|
||||
- phonebill-prod.example.com
|
||||
secretName: phonebill-prod-tls
|
||||
- hosts:
|
||||
- phonebill.production-domain.com
|
||||
secretName: phonebill-prod-tls
|
||||
rules:
|
||||
- host: phonebill-prod.example.com
|
||||
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
|
||||
- host: phonebill.production-domain.com
|
||||
http:
|
||||
paths:
|
||||
- path: /api/auth
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: user-service
|
||||
port:
|
||||
number: 8080
|
||||
- path: /api/bills
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: bill-service
|
||||
port:
|
||||
number: 8080
|
||||
- path: /api/products
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: product-service
|
||||
port:
|
||||
number: 8080
|
||||
- path: /api/kos
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: kos-mock
|
||||
port:
|
||||
number: 8080
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: api-gateway
|
||||
port:
|
||||
number: 8080
|
||||
@@ -1,16 +1,61 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
metadata:
|
||||
name: phonebill-prod
|
||||
|
||||
namespace: phonebill-prod
|
||||
|
||||
resources:
|
||||
- ../../base
|
||||
|
||||
commonLabels:
|
||||
environment: prod
|
||||
|
||||
images:
|
||||
- name: acrdigitalgarage01.azurecr.io/phonebill/api-gateway
|
||||
newTag: prod-latest
|
||||
- name: acrdigitalgarage01.azurecr.io/phonebill/user-service
|
||||
newTag: prod-latest
|
||||
- name: acrdigitalgarage01.azurecr.io/phonebill/bill-service
|
||||
newTag: prod-latest
|
||||
- name: acrdigitalgarage01.azurecr.io/phonebill/product-service
|
||||
newTag: prod-latest
|
||||
- name: acrdigitalgarage01.azurecr.io/phonebill/kos-mock
|
||||
newTag: prod-latest
|
||||
|
||||
patches:
|
||||
# ConfigMap patches
|
||||
- path: configmap-common-patch.yaml
|
||||
target:
|
||||
kind: ConfigMap
|
||||
name: cm-common
|
||||
name: common-config
|
||||
|
||||
# Secret patches
|
||||
- path: secret-common-patch.yaml
|
||||
target:
|
||||
kind: Secret
|
||||
name: common-secret
|
||||
- path: secret-user-service-patch.yaml
|
||||
target:
|
||||
kind: Secret
|
||||
name: user-service-secret
|
||||
- path: secret-bill-service-patch.yaml
|
||||
target:
|
||||
kind: Secret
|
||||
name: bill-service-secret
|
||||
- path: secret-product-service-patch.yaml
|
||||
target:
|
||||
kind: Secret
|
||||
name: product-service-secret
|
||||
|
||||
# Ingress patches
|
||||
- path: ingress-patch.yaml
|
||||
target:
|
||||
kind: Ingress
|
||||
name: phonebill-ingress
|
||||
|
||||
# Deployment patches
|
||||
- path: deployment-api-gateway-patch.yaml
|
||||
target:
|
||||
kind: Deployment
|
||||
@@ -30,41 +75,4 @@ patches:
|
||||
- path: deployment-kos-mock-patch.yaml
|
||||
target:
|
||||
kind: Deployment
|
||||
name: kos-mock
|
||||
- path: ingress-patch.yaml
|
||||
target:
|
||||
kind: Ingress
|
||||
name: phonebill-ingress
|
||||
- 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: prod-latest
|
||||
- name: acrdigitalgarage01.azurecr.io/phonebill/user-service
|
||||
newTag: prod-latest
|
||||
- name: acrdigitalgarage01.azurecr.io/phonebill/bill-service
|
||||
newTag: prod-latest
|
||||
- name: acrdigitalgarage01.azurecr.io/phonebill/product-service
|
||||
newTag: prod-latest
|
||||
- name: acrdigitalgarage01.azurecr.io/phonebill/kos-mock
|
||||
newTag: prod-latest
|
||||
|
||||
namePrefix: prod-
|
||||
|
||||
commonLabels:
|
||||
environment: prod
|
||||
name: kos-mock
|
||||
@@ -1,10 +1,13 @@
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: secret-bill-service
|
||||
name: bill-service-secret
|
||||
type: Opaque
|
||||
stringData:
|
||||
DB_HOST: "bill-inquiry-postgres-prod-postgresql"
|
||||
DB_NAME: "bill_inquiry_db"
|
||||
DB_USERNAME: "bill_inquiry_user"
|
||||
DB_PASSWORD: "BillUser2025Prod!SecurePassword"
|
||||
# Database connection for bill service in production
|
||||
DB_URL: "jdbc:postgresql://bill-service-postgres-prod.phonebill-prod.svc.cluster.local:5432/bill_inquiry_db"
|
||||
DB_USERNAME: "postgres"
|
||||
DB_PASSWORD: "prod-bill-service-db-password-change-in-production"
|
||||
|
||||
# Service-specific secrets for production
|
||||
SERVICE_SECRET: "prod-bill-service-secret-change-in-production"
|
||||
@@ -1,9 +1,20 @@
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: secret-common
|
||||
name: common-secret
|
||||
type: Opaque
|
||||
stringData:
|
||||
JWT_SECRET: "nwe5Yo9qaJ6FBD/Thl2/j6/SFAfNwUorAY1ZcWO2KI7uA4bmVLOCPxE9hYuUpRCOkgV2UF2DdHXtqHi3+BU/ecbz2zpHyf/720h48UbA3XOMYOX1sdM+dQ=="
|
||||
REDIS_HOST: "redis-cache-prod-master"
|
||||
REDIS_PASSWORD: "Redis2025Prod!SecurePassword"
|
||||
# JWT Secret Key for production (should be changed in real deployment)
|
||||
JWT_SECRET: "prod-phonebill-jwt-secret-key-change-in-production-2024"
|
||||
|
||||
# Redis password for production
|
||||
REDIS_PASSWORD: "prod-redis-password-change-in-production"
|
||||
|
||||
# Database passwords for production
|
||||
DB_PASSWORD: "prod-db-password-change-in-production"
|
||||
|
||||
# External API keys for production
|
||||
EXTERNAL_API_KEY: "prod-external-api-key-change-in-production"
|
||||
|
||||
# Additional production secrets
|
||||
ENCRYPTION_KEY: "prod-encryption-key-change-in-production-32chars"
|
||||
@@ -1,10 +1,13 @@
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: secret-product-service
|
||||
name: product-service-secret
|
||||
type: Opaque
|
||||
stringData:
|
||||
DB_HOST: "product-change-postgres-prod-postgresql"
|
||||
DB_NAME: "product_change_db"
|
||||
DB_USERNAME: "product_change_user"
|
||||
DB_PASSWORD: "ProductUser2025Prod!SecurePassword"
|
||||
# Database connection for product service in production
|
||||
DB_URL: "jdbc:postgresql://product-service-postgres-prod.phonebill-prod.svc.cluster.local:5432/product_change_db"
|
||||
DB_USERNAME: "postgres"
|
||||
DB_PASSWORD: "prod-product-service-db-password-change-in-production"
|
||||
|
||||
# Service-specific secrets for production
|
||||
SERVICE_SECRET: "prod-product-service-secret-change-in-production"
|
||||
@@ -1,10 +1,13 @@
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: secret-user-service
|
||||
name: user-service-secret
|
||||
type: Opaque
|
||||
stringData:
|
||||
DB_HOST: "auth-postgres-prod-postgresql"
|
||||
DB_NAME: "phonebill_auth"
|
||||
DB_USERNAME: "auth_user"
|
||||
DB_PASSWORD: "AuthUser2025Prod!SecurePassword"
|
||||
# Database connection for user service in production
|
||||
DB_URL: "jdbc:postgresql://user-service-postgres-prod.phonebill-prod.svc.cluster.local:5432/auth_db"
|
||||
DB_USERNAME: "postgres"
|
||||
DB_PASSWORD: "prod-user-service-db-password-change-in-production"
|
||||
|
||||
# Service-specific secrets for production
|
||||
SERVICE_SECRET: "prod-user-service-secret-change-in-production"
|
||||
@@ -3,9 +3,6 @@ kind: ConfigMap
|
||||
metadata:
|
||||
name: cm-common
|
||||
data:
|
||||
CORS_ALLOWED_ORIGINS: "https://phonebill-staging.example.com"
|
||||
JWT_ACCESS_TOKEN_VALIDITY: "18000000"
|
||||
JWT_REFRESH_TOKEN_VALIDITY: "86400000"
|
||||
REDIS_PORT: "6379"
|
||||
NAMESPACE: "phonebill-staging"
|
||||
SPRING_PROFILES_ACTIVE: "staging"
|
||||
DDL_AUTO: "validate"
|
||||
@@ -1,17 +1,18 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: api-gateway
|
||||
name: api-gateway-deployment
|
||||
spec:
|
||||
replicas: 1
|
||||
replicas: 2
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: api-gateway
|
||||
resources:
|
||||
requests:
|
||||
memory: "256Mi"
|
||||
cpu: "256m"
|
||||
limits:
|
||||
memory: "1024Mi"
|
||||
cpu: "1024m"
|
||||
- name: api-gateway
|
||||
image: acrdigitalgarage01.azurecr.io/phonebill-api-gateway:staging-latest
|
||||
resources:
|
||||
requests:
|
||||
memory: "512Mi"
|
||||
cpu: "512m"
|
||||
limits:
|
||||
memory: "2048Mi"
|
||||
cpu: "2048m"
|
||||
@@ -1,17 +1,18 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: bill-service
|
||||
name: bill-service-deployment
|
||||
spec:
|
||||
replicas: 1
|
||||
replicas: 2
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: bill-service
|
||||
resources:
|
||||
requests:
|
||||
memory: "256Mi"
|
||||
cpu: "256m"
|
||||
limits:
|
||||
memory: "1024Mi"
|
||||
cpu: "1024m"
|
||||
- name: bill-service
|
||||
image: acrdigitalgarage01.azurecr.io/phonebill-bill-service:staging-latest
|
||||
resources:
|
||||
requests:
|
||||
memory: "512Mi"
|
||||
cpu: "512m"
|
||||
limits:
|
||||
memory: "2048Mi"
|
||||
cpu: "2048m"
|
||||
@@ -1,17 +1,18 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: kos-mock
|
||||
name: kos-mock-deployment
|
||||
spec:
|
||||
replicas: 1
|
||||
replicas: 2
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: kos-mock
|
||||
resources:
|
||||
requests:
|
||||
memory: "256Mi"
|
||||
cpu: "256m"
|
||||
limits:
|
||||
memory: "1024Mi"
|
||||
cpu: "1024m"
|
||||
- name: kos-mock
|
||||
image: acrdigitalgarage01.azurecr.io/phonebill-kos-mock:staging-latest
|
||||
resources:
|
||||
requests:
|
||||
memory: "512Mi"
|
||||
cpu: "512m"
|
||||
limits:
|
||||
memory: "2048Mi"
|
||||
cpu: "2048m"
|
||||
@@ -1,17 +1,18 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: product-service
|
||||
name: product-service-deployment
|
||||
spec:
|
||||
replicas: 1
|
||||
replicas: 2
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: product-service
|
||||
resources:
|
||||
requests:
|
||||
memory: "256Mi"
|
||||
cpu: "256m"
|
||||
limits:
|
||||
memory: "1024Mi"
|
||||
cpu: "1024m"
|
||||
- name: product-service
|
||||
image: acrdigitalgarage01.azurecr.io/phonebill-product-service:staging-latest
|
||||
resources:
|
||||
requests:
|
||||
memory: "512Mi"
|
||||
cpu: "512m"
|
||||
limits:
|
||||
memory: "2048Mi"
|
||||
cpu: "2048m"
|
||||
@@ -1,17 +1,18 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: user-service
|
||||
name: user-service-deployment
|
||||
spec:
|
||||
replicas: 1
|
||||
replicas: 2
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: user-service
|
||||
resources:
|
||||
requests:
|
||||
memory: "256Mi"
|
||||
cpu: "256m"
|
||||
limits:
|
||||
memory: "1024Mi"
|
||||
cpu: "1024m"
|
||||
- name: user-service
|
||||
image: acrdigitalgarage01.azurecr.io/phonebill-user-service:staging-latest
|
||||
resources:
|
||||
requests:
|
||||
memory: "512Mi"
|
||||
cpu: "512m"
|
||||
limits:
|
||||
memory: "2048Mi"
|
||||
cpu: "2048m"
|
||||
@@ -1,54 +1,25 @@
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: phonebill
|
||||
name: phonebill-ingress
|
||||
annotations:
|
||||
kubernetes.io/ingress.class: nginx
|
||||
nginx.ingress.kubernetes.io/ssl-redirect: "true"
|
||||
nginx.ingress.kubernetes.io/force-ssl-redirect: "true"
|
||||
nginx.ingress.kubernetes.io/backend-protocol: "HTTP"
|
||||
cert-manager.io/cluster-issuer: "letsencrypt-prod"
|
||||
spec:
|
||||
ingressClassName: nginx
|
||||
tls:
|
||||
- hosts:
|
||||
- phonebill-staging.example.com
|
||||
secretName: phonebill-staging-tls
|
||||
- hosts:
|
||||
- phonebill.staging-domain.com
|
||||
secretName: phonebill-tls-staging
|
||||
rules:
|
||||
- host: phonebill-staging.example.com
|
||||
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
|
||||
- host: phonebill.staging-domain.com
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: api-gateway-service
|
||||
port:
|
||||
number: 8080
|
||||
@@ -1,70 +1,68 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
|
||||
namespace: phonebill-staging
|
||||
|
||||
resources:
|
||||
- ../../base
|
||||
|
||||
namespace: phonebill-staging
|
||||
|
||||
patches:
|
||||
- path: configmap-common-patch.yaml
|
||||
target:
|
||||
# Common ConfigMap
|
||||
- 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-ingress
|
||||
- path: secret-common-patch.yaml
|
||||
target:
|
||||
path: configmap-common-patch.yaml
|
||||
|
||||
# Common Secret
|
||||
- target:
|
||||
kind: Secret
|
||||
name: secret-common
|
||||
- path: secret-user-service-patch.yaml
|
||||
target:
|
||||
path: secret-common-patch.yaml
|
||||
|
||||
# Ingress
|
||||
- target:
|
||||
kind: Ingress
|
||||
name: phonebill-ingress
|
||||
path: ingress-patch.yaml
|
||||
|
||||
# API Gateway
|
||||
- target:
|
||||
kind: Deployment
|
||||
name: api-gateway-deployment
|
||||
path: deployment-api-gateway-patch.yaml
|
||||
|
||||
# User Service
|
||||
- target:
|
||||
kind: Deployment
|
||||
name: user-service-deployment
|
||||
path: deployment-user-service-patch.yaml
|
||||
- target:
|
||||
kind: Secret
|
||||
name: secret-user-service
|
||||
- path: secret-bill-service-patch.yaml
|
||||
target:
|
||||
path: secret-user-service-patch.yaml
|
||||
|
||||
# Bill Service
|
||||
- target:
|
||||
kind: Deployment
|
||||
name: bill-service-deployment
|
||||
path: deployment-bill-service-patch.yaml
|
||||
- target:
|
||||
kind: Secret
|
||||
name: secret-bill-service
|
||||
- path: secret-product-service-patch.yaml
|
||||
target:
|
||||
path: secret-bill-service-patch.yaml
|
||||
|
||||
# Product Service
|
||||
- target:
|
||||
kind: Deployment
|
||||
name: product-service-deployment
|
||||
path: deployment-product-service-patch.yaml
|
||||
- target:
|
||||
kind: Secret
|
||||
name: secret-product-service
|
||||
|
||||
images:
|
||||
- name: acrdigitalgarage01.azurecr.io/phonebill/api-gateway
|
||||
newTag: staging-latest
|
||||
- name: acrdigitalgarage01.azurecr.io/phonebill/user-service
|
||||
newTag: staging-latest
|
||||
- name: acrdigitalgarage01.azurecr.io/phonebill/bill-service
|
||||
newTag: staging-latest
|
||||
- name: acrdigitalgarage01.azurecr.io/phonebill/product-service
|
||||
newTag: staging-latest
|
||||
- name: acrdigitalgarage01.azurecr.io/phonebill/kos-mock
|
||||
newTag: staging-latest
|
||||
|
||||
namePrefix: staging-
|
||||
|
||||
commonLabels:
|
||||
environment: staging
|
||||
path: secret-product-service-patch.yaml
|
||||
|
||||
# KOS Mock
|
||||
- target:
|
||||
kind: Deployment
|
||||
name: kos-mock-deployment
|
||||
path: deployment-kos-mock-patch.yaml
|
||||
@@ -2,9 +2,10 @@ apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: secret-bill-service
|
||||
type: Opaque
|
||||
stringData:
|
||||
DB_HOST: "bill-inquiry-postgres-staging-postgresql"
|
||||
DB_HOST: "bill-service-postgres-staging.phonebill-staging.svc.cluster.local"
|
||||
DB_PORT: "5432"
|
||||
DB_NAME: "bill_inquiry_db"
|
||||
DB_USERNAME: "bill_inquiry_user"
|
||||
DB_PASSWORD: "BillUser2025Staging!"
|
||||
DB_USERNAME: "postgres"
|
||||
DB_PASSWORD: "staging-bill-service-db-password"
|
||||
KOS_MOCK_URL: "http://kos-mock-service.phonebill-staging.svc.cluster.local:8090"
|
||||
@@ -2,8 +2,9 @@ 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-staging-master"
|
||||
REDIS_PASSWORD: "Redis2025Staging!"
|
||||
JWT_SECRET_KEY: "staging-my-very-secret-key-for-jwt-token-generation-and-validation-that-is-256-bits-long"
|
||||
JWT_EXPIRATION_TIME: "3600"
|
||||
REDIS_HOST: "phonebill-redis-staging.phonebill-staging.svc.cluster.local"
|
||||
REDIS_PORT: "6379"
|
||||
REDIS_PASSWORD: "staging-redis-password"
|
||||
@@ -2,9 +2,10 @@ apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: secret-product-service
|
||||
type: Opaque
|
||||
stringData:
|
||||
DB_HOST: "product-change-postgres-staging-postgresql"
|
||||
DB_HOST: "product-service-postgres-staging.phonebill-staging.svc.cluster.local"
|
||||
DB_PORT: "5432"
|
||||
DB_NAME: "product_change_db"
|
||||
DB_USERNAME: "product_change_user"
|
||||
DB_PASSWORD: "ProductUser2025Staging!"
|
||||
DB_USERNAME: "postgres"
|
||||
DB_PASSWORD: "staging-product-service-db-password"
|
||||
KOS_MOCK_URL: "http://kos-mock-service.phonebill-staging.svc.cluster.local:8090"
|
||||
@@ -2,9 +2,9 @@ apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: secret-user-service
|
||||
type: Opaque
|
||||
stringData:
|
||||
DB_HOST: "auth-postgres-staging-postgresql"
|
||||
DB_NAME: "phonebill_auth"
|
||||
DB_USERNAME: "auth_user"
|
||||
DB_PASSWORD: "AuthUser2025Staging!"
|
||||
DB_HOST: "user-service-postgres-staging.phonebill-staging.svc.cluster.local"
|
||||
DB_PORT: "5432"
|
||||
DB_NAME: "auth_db"
|
||||
DB_USERNAME: "postgres"
|
||||
DB_PASSWORD: "staging-user-service-db-password"
|
||||
Reference in New Issue
Block a user