diff --git a/deploy/azure/autoscaling.yml b/deploy/azure/autoscaling.yml new file mode 100644 index 00000000..714e7df3 --- /dev/null +++ b/deploy/azure/autoscaling.yml @@ -0,0 +1,40 @@ +--- +apiVersion: autoscaling/v2beta1 +kind: HorizontalPodAutoscaler +metadata: + labels: + app: atst + name: atst + namespace: atat +spec: + minReplicas: 2 + maxReplicas: 10 + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: atst + metrics: + - type: Resource + resource: + name: cpu + targetAverageUtilization: 60 +--- +apiVersion: autoscaling/v2beta1 +kind: HorizontalPodAutoscaler +metadata: + labels: + app: atst + name: atst-worker + namespace: atat +spec: + minReplicas: 2 + maxReplicas: 10 + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: atst + metrics: + - type: Resource + resource: + name: cpu + targetAverageUtilization: 60 diff --git a/deploy/azure/kustomization.yaml b/deploy/azure/kustomization.yaml index 9dee809c..d0162394 100644 --- a/deploy/azure/kustomization.yaml +++ b/deploy/azure/kustomization.yaml @@ -12,3 +12,4 @@ resources: - acme-challenges.yml - aadpodidentity.yml - nginx-snippets.yml + - autoscaling.yml