Skip to content

Commit

Permalink
added HPA to svc section
Browse files Browse the repository at this point in the history
  • Loading branch information
naasir-ansar committed Jan 9, 2024
1 parent 2d61efb commit 6d68acb
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 46 deletions.
23 changes: 1 addition & 22 deletions deployments/node-version-blue.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,26 +51,5 @@ spec:
key: ENV
resources: {}
status: {}
---
apiVersion: "autoscaling/v2"
kind: "HorizontalPodAutoscaler"
metadata:
name: "node-app-hpa-wvpn"
namespace: "default"
labels:
app: "node-app"
spec:
scaleTargetRef:
kind: "Deployment"
name: "node-app-blue"
apiVersion: "apps/v1"
minReplicas: 1
maxReplicas: 5
metrics:
- type: "Resource"
resource:
name: "cpu"
target:
type: "Utilization"
averageUtilization: 80


22 changes: 0 additions & 22 deletions deployments/node-version-green.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,25 +51,3 @@ spec:
key: ENV
resources: {}
status: {}
---
apiVersion: "autoscaling/v2"
kind: "HorizontalPodAutoscaler"
metadata:
name: "node-app-hpa-wvpn"
namespace: "default"
labels:
app: "node-app"
spec:
scaleTargetRef:
kind: "Deployment"
name: "node-app-green"
apiVersion: "apps/v1"
minReplicas: 1
maxReplicas: 5
metrics:
- type: "Resource"
resource:
name: "cpu"
target:
type: "Utilization"
averageUtilization: 80
25 changes: 24 additions & 1 deletion deployments/svc-blue.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,27 @@ spec:
version: "blue"
type: NodePort
status:
loadBalancer: {}
loadBalancer: {}

---
apiVersion: "autoscaling/v2"
kind: "HorizontalPodAutoscaler"
metadata:
name: "node-app-hpa-wvpn"
namespace: "default"
labels:
app: "node-app"
spec:
scaleTargetRef:
kind: "Deployment"
name: "node-app-blue"
apiVersion: "apps/v1"
minReplicas: 1
maxReplicas: 5
metrics:
- type: "Resource"
resource:
name: "cpu"
target:
type: "Utilization"
averageUtilization: 80
24 changes: 23 additions & 1 deletion deployments/svc-green.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,26 @@ spec:
version: "green"
type: NodePort
status:
loadBalancer: {}
loadBalancer: {}
---
apiVersion: "autoscaling/v2"
kind: "HorizontalPodAutoscaler"
metadata:
name: "node-app-hpa-wvpn"
namespace: "default"
labels:
app: "node-app"
spec:
scaleTargetRef:
kind: "Deployment"
name: "node-app-green"
apiVersion: "apps/v1"
minReplicas: 1
maxReplicas: 5
metrics:
- type: "Resource"
resource:
name: "cpu"
target:
type: "Utilization"
averageUtilization: 80

0 comments on commit 6d68acb

Please sign in to comment.