## 新增内容 ### Argo CD 配置 - Application: ljwx-bookstore (部署到 bookstore namespace) - 多源配置(Helm Chart + GitOps values) ### 环境配置 - base/values-common.yaml: 通用配置 - overlays/bookstore/values.yaml: bookstore 环境配置 ### AppProject 更新 - 添加 ljwx-bookstore 仓库权限 - 允许部署到 bookstore namespace ## 部署信息 - 命名空间: bookstore - 代码仓库: github.com/BrunoGaoSZ/ljwx-bookstore - Helm Chart: ljwx-bookstore/helm/ - 镜像: ghcr.io/brunogaosz/ljwx-bookstore/bookstore ## 部署命令 kubectl apply -f argocd-apps/projects/ljwx-project.yaml kubectl apply -f argocd-apps/40-ljwx-bookstore.yaml
77 lines
1.4 KiB
YAML
77 lines
1.4 KiB
YAML
# Bookstore 环境配置
|
||
|
||
# 副本数
|
||
replicaCount: 2
|
||
|
||
# 镜像配置
|
||
image:
|
||
repository: ghcr.io/brunogaosz/ljwx-bookstore/bookstore
|
||
tag: "main-latest" # CI 会更新为 Git SHA
|
||
pullPolicy: IfNotPresent
|
||
|
||
# 服务配置
|
||
service:
|
||
type: ClusterIP
|
||
port: 8080
|
||
targetPort: 8080
|
||
|
||
# Ingress 配置
|
||
ingress:
|
||
enabled: true
|
||
className: "nginx"
|
||
annotations:
|
||
cert-manager.io/cluster-issuer: "letsencrypt-prod"
|
||
nginx.ingress.kubernetes.io/ssl-redirect: "true"
|
||
nginx.ingress.kubernetes.io/proxy-body-size: "50m"
|
||
hosts:
|
||
- host: bookstore.example.com
|
||
paths:
|
||
- path: /
|
||
pathType: Prefix
|
||
tls:
|
||
- secretName: bookstore-tls
|
||
hosts:
|
||
- bookstore.example.com
|
||
|
||
# 资源限制
|
||
resources:
|
||
requests:
|
||
memory: "512Mi"
|
||
cpu: "500m"
|
||
limits:
|
||
memory: "1Gi"
|
||
cpu: "1000m"
|
||
|
||
# 健康检查
|
||
livenessProbe:
|
||
httpGet:
|
||
path: /actuator/health
|
||
port: 8080
|
||
initialDelaySeconds: 120
|
||
periodSeconds: 30
|
||
|
||
readinessProbe:
|
||
httpGet:
|
||
path: /actuator/health/readiness
|
||
port: 8080
|
||
initialDelaySeconds: 60
|
||
periodSeconds: 10
|
||
|
||
# 数据库配置(使用 infra postgres)
|
||
postgresql:
|
||
enabled: false # 使用外部数据库
|
||
|
||
# Redis 配置
|
||
redis:
|
||
enabled: false # 使用外部 Redis
|
||
|
||
# OpenSearch 配置
|
||
opensearch:
|
||
enabled: false # 使用外部 OpenSearch
|
||
|
||
# 环境变量(通过 Secret 注入)
|
||
env:
|
||
SPRING_PROFILES_ACTIVE: "prod"
|
||
SERVER_PORT: "8080"
|
||
# 数据库连接将通过 Secret 注入
|