Add HPA autoscaling and update PubMEDIS image to 455d984

- Remove replicas:1 override (base has 2)
- Add HPA: min 2, max 5 replicas (CPU 70%, memory 80%)
- Update image tag to 455d984 (OAuth pre-render fix)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-02 19:30:53 +00:00
parent 82ace95a6b
commit 7035567387
2 changed files with 42 additions and 10 deletions

View File

@@ -0,0 +1,40 @@
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: pubmedis
labels:
app.kubernetes.io/name: pubmedis
app.kubernetes.io/part-of: infinicaretech
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: pubmedis
minReplicas: 2
maxReplicas: 5
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 70
- type: Resource
resource:
name: memory
target:
type: Utilization
averageUtilization: 80
behavior:
scaleUp:
stabilizationWindowSeconds: 60
policies:
- type: Pods
value: 1
periodSeconds: 60
scaleDown:
stabilizationWindowSeconds: 300
policies:
- type: Pods
value: 1
periodSeconds: 120

View File

@@ -3,16 +3,8 @@ kind: Kustomization
resources: resources:
- ../../base - ../../base
- hpa.yaml
images: images:
- name: 10.0.0.3:31427/gitea_admin/pubmedis - name: 10.0.0.3:31427/gitea_admin/pubmedis
newTag: "b8d4cf6" newTag: "455d984"
patches:
- target:
kind: Deployment
name: pubmedis
patch: |-
- op: replace
path: /spec/replicas
value: 1