Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion vizzy/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: extensions/v1beta1
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Chart.Name }}
Expand Down
19 changes: 19 additions & 0 deletions vizzy/templates/scaling.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{{- if .Values.horizontalPodAutoscaler.enabled -}}
apiVersion: autoscaling/v1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not everyone may want to use an HPA, so wrap all of this in an if?

kind: HorizontalPodAutoscaler
metadata:
name: {{ .Chart.Name }}
labels:
app: {{ .Chart.Name }}
chart: {{ .Chart.Name }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
maxReplicas: {{ .Values.maxReplica }}
minReplicas: {{ .Values.replicaCount }}
scaleTargetRef:
apiVersion: apps/v1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update the apiVersion in deployment.yaml

kind: Deployment
name: {{ .Chart.Name }}
targetCPUUtilizationPercentage: {{ .Values.horizontalPodAutoscaler.targetCPUUtilizationPercentage }}
{{- end }}
5 changes: 5 additions & 0 deletions vizzy/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# Declare variables to be passed into your templates.

replicaCount: 5
maxReplica: 15
image:
repository: scottcbishop/vizzy
tag: v3.1.1
Expand Down Expand Up @@ -38,6 +39,10 @@ service:
nginxIngress:
enabled: true

horizontalPodAutoscaler:
enabled: false
targetCPUUtilizationPercentage: 80

# Chart dependency
postgresql:
enabled: true
Expand Down