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
9 changes: 9 additions & 0 deletions azul/example-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@ pluginHPA:
# If using the internal scaler, the maximum backlog for a plugin before scaling occurs
maxQueueLength: 50

pluginSyncHPA:
minReplicas: 2
maxReplicas: 15
averageUtilization: 80

scaler:
# Use in conjunction with useSmartScaler - see above
enabled: true
Expand Down Expand Up @@ -478,11 +483,15 @@ plugins:
syncPeriod: 600 # Interval to poll the remote repo for changes, in seconds.

yara-x:
hpa:
maxReplicas: 22
image: plugin-yara
livenessProbeInitialDelaySeconds: 60 # initial delay for liveness probe in seconds
livenessProbePeriodSeconds: 30 # period for liveness probe in seconds
sources:
example:
hpa:
minReplicas: 11
enabled: true
repo: pass
branch: pass
Expand Down
8 changes: 7 additions & 1 deletion azul/templates/plugins/reusable/sources-maco.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,13 @@ spec:
defaultMode: 0400
secretName: {{ $source.secretSSH }}
{{- end }}
{{- include "hpa" (dict "root" $ "name" $plugin "min" $root.pluginSyncHPA.minReplicas "max" $root.pluginSyncHPA.maxReplicas "avgUtil" $root.pluginSyncHPA.averageUtilization "useSmartScaler" $.Values.pluginSyncHPA.useSmartScaler "includeHistoric" $.Values.pluginSyncHPA.includeHistoric "maxQueueLength" $.Values.pluginSyncHPA.maxQueueLength) | nindent 0 }}
{{- /* Merge all the HPAs first do the default then override with any values from group then override from source */ -}}
{{- $defaultHpa := $root.pluginSyncHPA | default dict }}
{{- $groupHpa := (hasKey $group "hpa") | ternary $group.hpa dict }}
{{- $sourceHpa := (hasKey $source "hpa") | ternary $source.hpa dict }}
{{- $mergedHpa := merge $sourceHpa $groupHpa $defaultHpa }}

{{- include "hpa" (dict "root" $ "name" $plugin "min" $mergedHpa.minReplicas "max" $mergedHpa.maxReplicas "avgUtil" $mergedHpa.averageUtilization "useSmartScaler" $mergedHpa.useSmartScaler "includeHistoric" $mergedHpa.includeHistoric "maxQueueLength" $mergedHpa.maxQueueLength) | nindent 0 }}
{{- end }}
{{- end }}
{{- end }}
9 changes: 8 additions & 1 deletion azul/templates/plugins/reusable/sources-suricata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,14 @@ spec:
defaultMode: 0400
secretName: {{ $source.secretSSH }}
{{- end }}
{{- include "hpa" (dict "root" $ "name" $plugin "min" $root.pluginSyncHPA.minReplicas "max" $root.pluginSyncHPA.maxReplicas "avgUtil" $root.pluginSyncHPA.averageUtilization "useSmartScaler" $.Values.pluginSyncHPA.useSmartScaler "includeHistoric" $.Values.pluginSyncHPA.includeHistoric "maxQueueLength" $.Values.pluginSyncHPA.maxQueueLength) | nindent 0 }}

{{- /* Merge all the HPAs first do the default then override with any values from group then override from source */ -}}
{{- $defaultHpa := $root.pluginSyncHPA | default dict }}
{{- $groupHpa := (hasKey $group "hpa") | ternary $group.hpa dict }}
{{- $sourceHpa := (hasKey $source "hpa") | ternary $source.hpa dict }}
{{- $mergedHpa := merge $sourceHpa $groupHpa $defaultHpa }}

{{- include "hpa" (dict "root" $ "name" $plugin "min" $mergedHpa.minReplicas "max" $mergedHpa.maxReplicas "avgUtil" $mergedHpa.averageUtilization "useSmartScaler" $mergedHpa.useSmartScaler "includeHistoric" $mergedHpa.includeHistoric "maxQueueLength" $mergedHpa.maxQueueLength) | nindent 0 }}
{{- end }}
{{- end }}
{{- end }}
9 changes: 8 additions & 1 deletion azul/templates/plugins/reusable/sources-yara-x.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,14 @@ spec:
defaultMode: 0400
secretName: {{ $source.secretSSH }}
{{- end }}
{{- include "hpa" (dict "root" $ "name" $plugin "min" $root.pluginSyncHPA.minReplicas "max" $root.pluginSyncHPA.maxReplicas "avgUtil" $root.pluginSyncHPA.averageUtilization "useSmartScaler" $.Values.pluginSyncHPA.useSmartScaler "includeHistoric" $.Values.pluginSyncHPA.includeHistoric "maxQueueLength" $.Values.pluginSyncHPA.maxQueueLength) | nindent 0 }}

{{- /* Merge all the HPAs first do the default then override with any values from group then override from source */ -}}
{{- $defaultHpa := $root.pluginSyncHPA | default dict }}
{{- $groupHpa := (hasKey $group "hpa") | ternary $group.hpa dict }}
{{- $sourceHpa := (hasKey $source "hpa") | ternary $source.hpa dict }}
{{- $mergedHpa := merge $sourceHpa $groupHpa $defaultHpa }}

{{- include "hpa" (dict "root" $ "name" $plugin "min" $mergedHpa.minReplicas "max" $mergedHpa.maxReplicas "avgUtil" $mergedHpa.averageUtilization "useSmartScaler" $mergedHpa.useSmartScaler "includeHistoric" $mergedHpa.includeHistoric "maxQueueLength" $mergedHpa.maxQueueLength) | nindent 0 }}
{{- end }}
{{- end }}
{{- end }}
Expand Down
3 changes: 3 additions & 0 deletions azul/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -2671,6 +2671,9 @@
"blacklist": {
"description": "A comma separated string of files or filepaths to ignore.",
"type": "string"
},
"hpa": {
"$ref": "#/definitions/hpa"
}
},
"required": ["enabled"],
Expand Down