-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature: added templates for horizontal pod autoscaling (#43)
* updated configmap name in all files * feature: updated postgres name * feature: updated server name, debugged changes * feature: updated ui name and debugged * feature: fixed worker name * feature: fixed temporal naming * feature: removed unnecessary acme challenge resources * revert namespace back to just multiwoven * change env name from suffix to prefix: configmap * change env name from suffix to prefix: ingress * change env name from suffix to prefix: postgresql deployment/service * change env name from suffix to prefix: postgresql pvc * change env name from suffix to prefix: server * change env name from suffix to prefix: ui * change env name from suffix to prefix: worker * change env name from suffix to prefix: temporal * change env name from suffix to prefix: temporal in ingress template * feature: added templates for horizontal pod autoscaling * feature: parameterize hpa values * fix: make hpa optional and better organized hpa values in values.yaml * feature: add hpa scaling behavior controls * feature: add labels for better management and organization * fix: decreased memory threshold for worker and server hpa * feature: parameterized temporalHost and postgresql default values * fix: added app env to workflow deployment names * feature: added hpa flags to helm upgrade command in workflow * fix: added tab for set flags to workflow * fix: fixed newline flag * fix: fixed hpa conditional statement and added app env prefix to target ref * fix: fixed value reference in server and ui templates * fix: fixed worker hpa target ref name * fix: removed hpa set flags from workflow * fix: remove appEnv prefix * fix: remove appEnv from workflow file * fix: add forward slack to workflow file * fix: remove appEnv from values file * fix: removed community from temporal hostname * fix: removed unused hpa values from values file * fix: update chart version * fix: upgraded default memory limits based on hpa output * fix: adjusting baseline values for efficient hpa
- Loading branch information
1 parent
f2e517d
commit 1ef4460
Showing
5 changed files
with
246 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
{{ if .Values.hpa.enabled }} | ||
apiVersion: autoscaling/v2 | ||
kind: HorizontalPodAutoscaler | ||
metadata: | ||
name: {{ include "chart.fullname" . }}-server-hpa | ||
namespace: {{ .Values.kubernetesNamespace }} | ||
labels: | ||
{{- include "chart.labels" . | nindent 4 }} | ||
app.kubernetes.io/component: server-hpa | ||
spec: | ||
scaleTargetRef: | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
name: {{ include "chart.fullname" . }}-server | ||
minReplicas: {{ .Values.hpa.multiwovenServer.minReplicas }} | ||
maxReplicas: {{ .Values.hpa.multiwovenServer.maxReplicas }} | ||
behavior: | ||
scaleDown: | ||
stabilizationWindowSeconds: {{ .Values.hpa.multiwovenServer.behavior.scaleDown.stabilizationWindowSeconds }} | ||
policies: | ||
- type: {{ .Values.hpa.multiwovenServer.behavior.scaleDown.policies.percentPolicy.type }} | ||
value: {{ .Values.hpa.multiwovenServer.behavior.scaleDown.policies.percentPolicy.value }} | ||
periodSeconds: {{ .Values.hpa.multiwovenServer.behavior.scaleDown.policies.percentPolicy.periodSeconds }} | ||
scaleUp: | ||
stabilizationWindowSeconds: {{ .Values.hpa.multiwovenServer.behavior.scaleUp.stabilizationWindowSeconds }} | ||
policies: | ||
- type: {{ .Values.hpa.multiwovenServer.behavior.scaleUp.policies.percentPolicy.type }} | ||
value: {{ .Values.hpa.multiwovenServer.behavior.scaleUp.policies.percentPolicy.value }} | ||
periodSeconds: {{ .Values.hpa.multiwovenServer.behavior.scaleUp.policies.percentPolicy.periodSeconds }} | ||
- type: {{ .Values.hpa.multiwovenServer.behavior.scaleUp.policies.podPolicy.type }} | ||
value: {{ .Values.hpa.multiwovenServer.behavior.scaleUp.policies.podPolicy.value }} | ||
periodSeconds: {{ .Values.hpa.multiwovenServer.behavior.scaleUp.policies.podPolicy.periodSeconds }} | ||
selectPolicy: {{ .Values.hpa.multiwovenServer.behavior.scaleUp.policies.selectPolicy }} | ||
metrics: | ||
- type: Resource | ||
resource: | ||
name: cpu | ||
target: | ||
type: Utilization | ||
averageUtilization: {{ .Values.hpa.multiwovenServer.cpuAverageUtilizationPercentageThreshold }} | ||
- type: Resource | ||
resource: | ||
name: memory | ||
target: | ||
type: Utilization | ||
averageUtilization: {{ .Values.hpa.multiwovenServer.memoryAverageUtilizationPercentageThreshold }} | ||
{{ end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
{{ if .Values.hpa.enabled }} | ||
apiVersion: autoscaling/v2 | ||
kind: HorizontalPodAutoscaler | ||
metadata: | ||
name: {{ include "chart.fullname" . }}-ui-hpa | ||
namespace: {{ .Values.kubernetesNamespace }} | ||
labels: | ||
{{- include "chart.labels" . | nindent 4 }} | ||
app.kubernetes.io/component: ui-hpa | ||
spec: | ||
scaleTargetRef: | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
name: {{ include "chart.fullname" . }}-ui | ||
minReplicas: {{ .Values.hpa.multiwovenUI.minReplicas }} | ||
maxReplicas: {{ .Values.hpa.multiwovenUI.maxReplicas }} | ||
behavior: | ||
scaleDown: | ||
stabilizationWindowSeconds: {{ .Values.hpa.multiwovenUI.behavior.scaleDown.stabilizationWindowSeconds }} | ||
policies: | ||
- type: {{ .Values.hpa.multiwovenUI.behavior.scaleDown.policies.percentPolicy.type }} | ||
value: {{ .Values.hpa.multiwovenUI.behavior.scaleDown.policies.percentPolicy.value }} | ||
periodSeconds: {{ .Values.hpa.multiwovenUI.behavior.scaleDown.policies.percentPolicy.periodSeconds }} | ||
scaleUp: | ||
stabilizationWindowSeconds: {{ .Values.hpa.multiwovenUI.behavior.scaleUp.stabilizationWindowSeconds }} | ||
policies: | ||
- type: {{ .Values.hpa.multiwovenUI.behavior.scaleUp.policies.percentPolicy.type }} | ||
value: {{ .Values.hpa.multiwovenUI.behavior.scaleUp.policies.percentPolicy.value }} | ||
periodSeconds: {{ .Values.hpa.multiwovenUI.behavior.scaleUp.policies.percentPolicy.periodSeconds }} | ||
- type: {{ .Values.hpa.multiwovenUI.behavior.scaleUp.policies.podPolicy.type }} | ||
value: {{ .Values.hpa.multiwovenUI.behavior.scaleUp.policies.podPolicy.value }} | ||
periodSeconds: {{ .Values.hpa.multiwovenUI.behavior.scaleUp.policies.podPolicy.periodSeconds }} | ||
selectPolicy: {{ .Values.hpa.multiwovenUI.behavior.scaleUp.policies.selectPolicy }} | ||
metrics: | ||
- type: Resource | ||
resource: | ||
name: cpu | ||
target: | ||
type: Utilization | ||
averageUtilization: {{ .Values.hpa.multiwovenUI.cpuAverageUtilizationPercentageThreshold }} | ||
- type: Resource | ||
resource: | ||
name: memory | ||
target: | ||
type: Utilization | ||
averageUtilization: {{ .Values.hpa.multiwovenUI.memoryAverageUtilizationPercentageThreshold }} | ||
{{ end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
{{ if .Values.hpa.enabled }} | ||
apiVersion: autoscaling/v2 | ||
kind: HorizontalPodAutoscaler | ||
metadata: | ||
name: {{ include "chart.fullname" . }}-worker-hpa | ||
namespace: {{ .Values.kubernetesNamespace }} | ||
labels: | ||
{{- include "chart.labels" . | nindent 4 }} | ||
app.kubernetes.io/component: worker-hpa | ||
spec: | ||
scaleTargetRef: | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
name: {{ include "chart.fullname" . }}-worker | ||
minReplicas: {{ .Values.hpa.multiwovenWorker.minReplicas }} | ||
maxReplicas: {{ .Values.hpa.multiwovenWorker.maxReplicas }} | ||
behavior: | ||
scaleDown: | ||
stabilizationWindowSeconds: {{ .Values.hpa.multiwovenWorker.behavior.scaleDown.stabilizationWindowSeconds }} | ||
policies: | ||
- type: {{ .Values.hpa.multiwovenWorker.behavior.scaleDown.policies.percentPolicy.type }} | ||
value: {{ .Values.hpa.multiwovenWorker.behavior.scaleDown.policies.percentPolicy.value }} | ||
periodSeconds: {{ .Values.hpa.multiwovenWorker.behavior.scaleDown.policies.percentPolicy.periodSeconds }} | ||
scaleUp: | ||
stabilizationWindowSeconds: {{ .Values.hpa.multiwovenWorker.behavior.scaleUp.stabilizationWindowSeconds }} | ||
policies: | ||
- type: {{ .Values.hpa.multiwovenWorker.behavior.scaleUp.policies.percentPolicy.type }} | ||
value: {{ .Values.hpa.multiwovenWorker.behavior.scaleUp.policies.percentPolicy.value }} | ||
periodSeconds: {{ .Values.hpa.multiwovenWorker.behavior.scaleUp.policies.percentPolicy.periodSeconds }} | ||
- type: {{ .Values.hpa.multiwovenWorker.behavior.scaleUp.policies.podPolicy.type }} | ||
value: {{ .Values.hpa.multiwovenWorker.behavior.scaleUp.policies.podPolicy.value }} | ||
periodSeconds: {{ .Values.hpa.multiwovenWorker.behavior.scaleUp.policies.podPolicy.periodSeconds }} | ||
selectPolicy: {{ .Values.hpa.multiwovenWorker.behavior.scaleUp.policies.selectPolicy }} | ||
metrics: | ||
- type: Resource | ||
resource: | ||
name: cpu | ||
target: | ||
type: Utilization | ||
averageUtilization: {{ .Values.hpa.multiwovenWorker.cpuAverageUtilizationPercentageThreshold }} | ||
- type: Resource | ||
resource: | ||
name: memory | ||
target: | ||
type: Utilization | ||
averageUtilization: {{ .Values.hpa.multiwovenWorker.memoryAverageUtilizationPercentageThreshold }} | ||
{{ end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters