Skip to content

Commit

Permalink
Add autoscaler to kustomize flavour
Browse files Browse the repository at this point in the history
  • Loading branch information
snickell committed Sep 6, 2023
1 parent ee2e813 commit bbb8206
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
24 changes: 24 additions & 0 deletions k8s/code.org/kustomize/production/autoscaler.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: dashboard
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: dashboard
minReplicas: 1
maxReplicas: 10
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 50
- type: Resource
resource:
name: memory
target:
type: Utilization
averageUtilization: 50
1 change: 1 addition & 0 deletions k8s/code.org/kustomize/production/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ bases:

resources:
- locals.yaml
- dashboard-autoscaler.yaml

0 comments on commit bbb8206

Please sign in to comment.