feat(deploy): update caddy resources and scaling

This commit is contained in:
incubator4 2023-11-19 13:59:23 +08:00
parent e17ec5aa11
commit e8cbf60fda
2 changed files with 24 additions and 4 deletions

View File

@ -101,11 +101,11 @@ spec:
command: ["caddy", "run", "-config", "/app/Caddyfile"]
resources:
requests:
cpu: 50m
memory: 64Mi
limits:
cpu: 100m
memory: 128Mi
limits:
cpu: 500m
memory: 512Mi
envFrom:
- secretRef:
name: xlog-caddy

View File

@ -1,4 +1,4 @@
apiVersion: autoscaling/v2beta2
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: xlog
@ -17,3 +17,23 @@ spec:
target:
type: Utilization
averageUtilization: 70
---
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: xlog-caddy
namespace: crossbell
spec:
maxReplicas: 20
minReplicas: 3
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: xlog-caddy
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 300