new scaling policy

This commit is contained in:
Rachit Bhargava
2024-01-19 11:42:08 -05:00
parent 97f085f5e8
commit 7149ce102d
7 changed files with 43 additions and 19 deletions

View File

@@ -83,11 +83,11 @@ spec:
timeoutSeconds: 10 timeoutSeconds: 10
resources: resources:
limits: limits:
cpu: 500m cpu: 1000m
memory: 1024Mi memory: 2048Mi
requests: requests:
cpu: 300m cpu: 500M
memory: 700Mi memory: 1024Mi
terminationMessagePath: /dev/termination-log terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File terminationMessagePolicy: File
volumeMounts: volumeMounts:

View File

@@ -1,4 +1,4 @@
apiVersion: autoscaling/v1 apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler kind: HorizontalPodAutoscaler
metadata: metadata:
name: medicalalert-web-hpa name: medicalalert-web-hpa
@@ -10,4 +10,10 @@ spec:
name: medicalalert-web name: medicalalert-web
minReplicas: 3 minReplicas: 3
maxReplicas: 6 maxReplicas: 6
targetCPUUtilizationPercentage: 70 metrics:
- resource:
name: cpu
target:
averageValue: "90"
type: AverageValue
type: Resource

View File

@@ -1,4 +1,4 @@
apiVersion: autoscaling/v1 apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler kind: HorizontalPodAutoscaler
metadata: metadata:
name: medicalalert-web-hpa name: medicalalert-web-hpa
@@ -10,4 +10,10 @@ spec:
name: medicalalert-web name: medicalalert-web
minReplicas: 3 minReplicas: 3
maxReplicas: 6 maxReplicas: 6
targetCPUUtilizationPercentage: 70 metrics:
- resource:
name: cpu
target:
averageValue: "90"
type: AverageValue
type: Resource

View File

@@ -9,7 +9,7 @@ metadata:
namespace: medicalalert-web namespace: medicalalert-web
spec: spec:
progressDeadlineSeconds: 600 progressDeadlineSeconds: 600
replicas: 3 replicas: 1
revisionHistoryLimit: 10 revisionHistoryLimit: 10
selector: selector:
matchLabels: matchLabels:

View File

@@ -1,4 +1,4 @@
apiVersion: autoscaling/v1 apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler kind: HorizontalPodAutoscaler
metadata: metadata:
name: medicalalert-web-hpa name: medicalalert-web-hpa
@@ -8,6 +8,12 @@ spec:
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
name: medicalalert-web name: medicalalert-web
minReplicas: 3 minReplicas: 1
maxReplicas: 6 maxReplicas: 2
targetCPUUtilizationPercentage: 70 metrics:
- resource:
name: cpu
target:
averageValue: "90"
type: AverageValue
type: Resource

View File

@@ -9,7 +9,7 @@ metadata:
namespace: medicalalert-web namespace: medicalalert-web
spec: spec:
progressDeadlineSeconds: 600 progressDeadlineSeconds: 600
replicas: 3 replicas: 1
revisionHistoryLimit: 10 revisionHistoryLimit: 10
selector: selector:
matchLabels: matchLabels:
@@ -84,7 +84,7 @@ spec:
resources: resources:
limits: limits:
cpu: 1000m cpu: 1000m
memory: 3072Mi memory: 1024Mi
requests: requests:
cpu: 300m cpu: 300m
memory: 700Mi memory: 700Mi

View File

@@ -1,4 +1,4 @@
apiVersion: autoscaling/v1 apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler kind: HorizontalPodAutoscaler
metadata: metadata:
name: medicalalert-web-hpa name: medicalalert-web-hpa
@@ -8,6 +8,12 @@ spec:
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
name: medicalalert-web name: medicalalert-web
minReplicas: 3 minReplicas: 1
maxReplicas: 6 maxReplicas: 2
targetCPUUtilizationPercentage: 70 metrics:
- resource:
name: cpu
target:
averageValue: "90"
type: AverageValue
type: Resource