Skip to content

Commit ceceb73

Browse files
author
Moussa Ouattara
committed
up
1 parent a940612 commit ceceb73

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

.github/workflows/helloworld.yml

+1
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ jobs:
6262
with:
6363
manifests: |
6464
${{ github.workspace }}/manifests/deployment.yaml
65+
${{ github.workspace }}/manifests/hpa.yaml
6566
${{ github.workspace }}/manifests/service.yaml
6667
images: ${{ env.REGISTRY_NAME }}.azurecr.io/${{ env.APP_NAME }}:${{ github.sha }}
6768
imagepullsecrets: |

manifests/deployment.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ kind: Deployment
33
metadata:
44
name: helloworld
55
spec:
6-
replicas: 1
6+
replicas: 2
77
selector:
88
matchLabels:
99
app: helloworld

manifests/hpa.yaml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
apiVersion: autoscaling/v1
2+
kind: HorizontalPodAutoscaler
3+
metadata:
4+
name: helloworld
5+
spec:
6+
maxReplicas: 10 # define max replica count
7+
minReplicas: 2 # define min replica count
8+
scaleTargetRef:
9+
apiVersion: apps/v1
10+
kind: Deployment
11+
name: helloworld
12+
targetCPUUtilizationPercentage: 50 # target CPU utilization

0 commit comments

Comments
 (0)