File tree Expand file tree Collapse file tree 4 files changed +18
-6
lines changed
Expand file tree Collapse file tree 4 files changed +18
-6
lines changed Original file line number Diff line number Diff line change 5252 - name: payroll
5353 secrets:
5454 USERNAME: opszero
55+ autoscaling:
56+ enabled: true
57+ minReplicas: 2
58+ maxReplicas: 4
59+ targetCPUUtilizationPercentage: 75
60+ targetMemoryUtilizationPercentage: 75
5561 service:
5662 enabled: true
5763 type: ClusterIP
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ type: application
1515# This is the chart version. This version number should be incremented each time you make changes
1616# to the chart and its templates, including the app version.
1717# Versions are expected to follow Semantic Versioning (https://semver.org/)
18- version : 0.5.4
18+ version : 0.5.5
1919
2020# This is the version number of the application being deployed. This version number should be
2121# incremented each time you make changes to the application. Versions are not expected to
@@ -26,4 +26,4 @@ dependencies:
2626 - name : redis
2727 version : 17.3.11
2828 repository : https://charts.bitnami.com/bitnami
29- condition : redis.enabled
29+ condition : redis.enabled
Original file line number Diff line number Diff line change @@ -52,6 +52,9 @@ metadata:
5252 labels :
5353 {{- include "opszero.selectorLabels" $ | nindent 4 }}-{{ $app.name }}
5454spec :
55+ {{- if not $app.autoscaling.enabled }}
56+ replicas : {{ $.Values.replicaCount }}
57+ {{- end }}
5558 selector :
5659 matchLabels :
5760 {{- include "opszero.selectorLabels" $ | nindent 6 }}-{{ $app.name }}
@@ -106,6 +109,7 @@ stringData:
106109{{- end }}
107110{{- end }}
108111
112+ {{- if $app.autoscaling.enabled }}
109113---
110114apiVersion : keda.sh/v1alpha1
111115kind : ScaledObject
@@ -117,18 +121,19 @@ spec:
117121 scaleTargetRef :
118122 name : {{ include "opszero.fullname" $ }}-{{ $app.name }}
119123 kind : Deployment
120- minReplicaCount : {{ $.Values.autoscaling.minReplicas }}
121- maxReplicaCount : {{ $.Values.autoscaling.maxReplicas }}
124+ minReplicaCount : {{ default $.Values.autoscaling.minReplicas $app .autoscaling.minReplicas }}
125+ maxReplicaCount : {{ default $.Values.autoscaling.maxReplicas $app .autoscaling.maxReplicas }}
122126 cooldownPeriod : 60
123127 triggers :
124128 - type : cpu
125129 metadata :
126130 type : Utilization
127- value : {{ $.Values.autoscaling.targetCPUUtilizationPercentage | quote }}
131+ value : {{ default $.Values.autoscaling.CPUUtilizationPercentage $app .autoscaling.targetCPUUtilizationPercentage | quote }}
128132 - type : memory
129133 metadata :
130134 type : Utilization
131- value : {{ $.Values.autoscaling.targetMemoryUtilizationPercentage | quote }}
135+ value : {{ default $.Values.autoscaling.targetMemoryUtilizationPercentage $app.autoscaling.targetMemoryUtilizationPercentage | quote }}
136+ {{- end }}
132137---
133138apiVersion : networking.k8s.io/v1
134139kind : Ingress
Original file line number Diff line number Diff line change 11defaultImage : " "
22imagePullSecrets : []
33nameOverride : " "
4+ replicaCount : 1
45
56serviceAccount :
67 # Specifies whether a service account should be created
You can’t perform that action at this time.
0 commit comments