Skip to content
Merged
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 charts/event-worker/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
description: EcoVadis Helm chart for K8s Event driven Deployment
name: charts-event-worker
type: application
version: 1.5.2
version: 1.6.0
dependencies:
- name: charts-core
version: 2.7.0
Expand Down
38 changes: 38 additions & 0 deletions charts/event-worker/templates/hpa.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{{- if not .Values.global.keda.enabled }}
{{- if .Values.global.autoscaling.enabled }}
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: {{ include "charts-event-worker.fullname" . }}
labels:
{{- include "charts-event-worker.labels" . | nindent 4 }}
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: {{ include "charts-event-worker.fullname" . }}
minReplicas: {{ .Values.global.replicaCount }}
{{- if .Values.global.autoscaling.enabled }}
maxReplicas: {{ .Values.global.autoscaling.maxReplicas }}
{{ else }}
maxReplicas: {{ .Values.global.replicaCount }}
{{- end }}
metrics:
{{- if .Values.global.autoscaling.targetCPUUtilizationPercentage }}
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: {{ .Values.global.autoscaling.targetCPUUtilizationPercentage }}
{{- end }}
{{- if .Values.global.autoscaling.targetMemoryUtilizationPercentage }}
- type: Resource
resource:
name: memory
target:
type: Utilization
averageUtilization: {{ .Values.global.autoscaling.targetMemoryUtilizationPercentage }}
{{- end }}
{{- end }}
{{- end }}
4 changes: 3 additions & 1 deletion charts/event-worker/templates/scaled-object.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.global.keda.enabled }}
apiVersion: keda.sh/v1alpha1
kind: ScaledObject
metadata:
Expand Down Expand Up @@ -47,4 +48,5 @@ spec:
{{- end }}
cloud: AzurePublicCloud
{{- end }}
{{- end }}
{{- end }}
{{- end }}
2 changes: 2 additions & 0 deletions charts/event-worker/templates/trigger-authentication.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{- if .Values.global.keda.enabled }}
{{- if .Values.global.keda.triggers.azureServiceBus.triggers }}
apiVersion: keda.sh/v1alpha1
kind: TriggerAuthentication
Expand Down Expand Up @@ -27,3 +28,4 @@ spec:
provider: azure-workload
{{ end }}
{{ end }}
{{ end }}
7 changes: 7 additions & 0 deletions charts/event-worker/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ global:

# https://keda.sh/docs/latest/reference/scaledobject-spec/
keda:
enabled: true
autoscalingPaused: false # If true, KEDA will not scale the worker
pollingInterval: 30 # Polling interval in seconds
minReplicaCount: 2 # Minimum number of instances to run at the same time
Expand All @@ -185,6 +186,12 @@ global:
messageCount: 5 # Optional. Count of messages to trigger scaling out: 1 -> N. Default: 5 messages
activationMessageCount: # Target value for activating the scaler: 0 -> 1. Default: 0

# Can only used when keda scaling is disabled
autoscaling:
enabled: false
maxReplicas: 4
targetCPUUtilizationPercentage: 70

# Setting to enable or disable creation of Persistent Volume Claims
# Each entry creates a separate PVC and a corresponding volume mount in the deployment.
# persistentVolumes:
Expand Down
Loading