Files
java21-template/java-service-template-deploy/base/deployment.yaml
T
Bruno GaoandQwen-Coder eefe2c5b34 M2: Add complete Java21 template with Clean Architecture implementation
- 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>
2026-02-11 23:54:21 +08:00

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