- Add four-layer modular structure (domain, application, infrastructure, api) - Implement complete CRUD example with Order entity - Add ArchUnit architecture compliance tests - Add Maven configuration with proper dependency management - Add Dockerfile for containerization - Add Kustomize deployment templates - Add initialization script (init.sh) - Add CI/CD workflow configuration - Add comprehensive documentation and configuration files Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
53 lines
1.2 KiB
YAML
53 lines
1.2 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: tmpl-service
|
|
labels:
|
|
app: tmpl-service
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: tmpl-service
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: tmpl-service
|
|
spec:
|
|
containers:
|
|
- name: tmpl-api
|
|
image: tmpl-api:latest
|
|
ports:
|
|
- containerPort: 8080
|
|
env:
|
|
- name: SPRING_PROFILES_ACTIVE
|
|
value: "prod"
|
|
- name: SERVER_PORT
|
|
value: "8080"
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /actuator/health/liveness
|
|
port: 8080
|
|
initialDelaySeconds: 15
|
|
periodSeconds: 10
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /actuator/health/readiness
|
|
port: 8080
|
|
initialDelaySeconds: 10
|
|
periodSeconds: 5
|
|
resources:
|
|
requests:
|
|
memory: "512Mi"
|
|
cpu: "250m"
|
|
limits:
|
|
memory: "1Gi"
|
|
cpu: "500m"
|
|
securityContext:
|
|
runAsNonRoot: true
|
|
runAsUser: 1001
|
|
allowPrivilegeEscalation: false
|
|
readOnlyRootFilesystem: false
|
|
capabilities:
|
|
drop:
|
|
- ALL |