feat(hydra): add horizontal pod autoscaling
This commit is contained in:
parent
8b02e8a875
commit
4cbc6c3972
|
@ -10,6 +10,7 @@ resources:
|
|||
- ./resources/hydra-migrate-job.yaml
|
||||
- ./resources/hydra-maester
|
||||
- ./resources/hydra-janitor-cronjob.yaml
|
||||
- ./resources/hydra-hpa.yaml
|
||||
|
||||
secretGenerator:
|
||||
- name: hydra-secret
|
||||
|
|
|
@ -55,6 +55,9 @@ spec:
|
|||
name: hydra-public
|
||||
- containerPort: 4445
|
||||
name: hydra-admin
|
||||
resources: {}
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 128Mi
|
||||
restartPolicy: Always
|
||||
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
apiVersion: autoscaling/v2
|
||||
kind: HorizontalPodAutoscaler
|
||||
metadata:
|
||||
name: hydra
|
||||
labels:
|
||||
io.kompose.service: hydra
|
||||
spec:
|
||||
scaleTargetRef:
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
name: hydra
|
||||
minReplicas: 1
|
||||
maxReplicas: 3
|
||||
metrics:
|
||||
- type: Resource
|
||||
resource:
|
||||
name: memory
|
||||
target:
|
||||
type: Utilization
|
||||
averageUtilization: 80
|
||||
- type: Resource
|
||||
resource:
|
||||
name: cpu
|
||||
target:
|
||||
type: Utilization
|
||||
averageUtilization: 80
|
Loading…
Reference in New Issue