Skip to content

Commit e0ef39a

Browse files
author
Michael Chmielewski
committed
Add low-power mode setting to configuration
1 parent d6f2d91 commit e0ef39a

File tree

4 files changed

+24
-1
lines changed

4 files changed

+24
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ The following kubernetes objects are created when the chart is installed:
5757
| daemonset.customTsAuditdConfig | string | `""` | |
5858
| daemonset.enableContainerd | bool | `unset` | Configures the daemonset agents to listen to the containerd daemon socket. **By default in agent 2.4.0+, the agent detects if containerd is running at startup** |
5959
| daemonset.enableDocker | bool | `unset` | Configures the daemonset agents to listen to the docker daemon socket. **By default in agent 2.4.0+, the agent detects if docker is running at startup** |
60+
| daemonset.enableLowPowerMode | bool | false | Configures the daemonset agents to perform better in tightly-resourced environments. The agent trades some telemetry reporting for reduced CPU and memory consumption. Ref: https://threatstack.zendesk.com/hc/en-us/articles/360016132692-Threat-Stack-Kubernetes-Deployment |
6061
| daemonset.nodeSelector | object | `{}` | |
6162
| daemonset.podAnnotations."container.apparmor.security.beta.kubernetes.io/threatstack-agent" | string | `"unconfined"` | |
6263
| daemonset.priorityClassName | string | `""` | Optionally set the priority class name for the daemonset pods. Note that priority classes are not created via this helm chart. Ref: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/ |

templates/_helpers.tpl

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,3 +87,16 @@ Return runtime config if containerd is disabled
8787
{{- end -}}
8888
{{- end -}}
8989
{{- end -}}
90+
91+
{{/*
92+
Return low-power config if setting is enabled
93+
*/}}
94+
{{- define "threatstack-agent.daemonset-lowpower-config" -}}
95+
{{- if kindIs "invalid" .Values.daemonset.enableLowPowerMode -}}
96+
{{- else -}}
97+
{{- if eq .Values.daemonset.enableLowPowerMode false -}}
98+
{{- else -}}
99+
{{- default "--low-power=true" -}}
100+
{{- end -}}
101+
{{- end -}}
102+
{{- end -}}

templates/secrets.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@ metadata:
1010
app.kubernetes.io/managed-by: {{ .Release.Service }}
1111
type: Opaque
1212
stringData:
13-
ts-setup-args: "--deploy-key {{ .Values.agentDeployKey }} --ruleset '{{ .Values.rulesets }}' {{ .Values.additionalSetupConfig }}"
13+
ts-setup-args: "--deploy-key {{ .Values.agentDeployKey }} --ruleset '{{ .Values.rulesets }}' {{ include "threatstack-agent.daemonset-lowpower-config" . }} {{ .Values.additionalSetupConfig }}"
1414
{{- end -}}

values.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,15 @@ daemonset:
169169
# enableDocker: false
170170
# enableContainerd: false
171171

172+
# Enable low-power mode
173+
# Configures the daemonset agents to perform better in
174+
# tightly-resourced environments. The agent trades some telemetry
175+
# reporting for reduced CPU and memory consumption.
176+
#
177+
# Ref: https://threatstack.zendesk.com/hc/en-us/articles/360016132692-Threat-Stack-Kubernetes-Deployment
178+
#
179+
enableLowPowerMode: true
180+
172181
additionalRuntimeConfig: "log.level info"
173182
# Override the agent's liveness probe logic from the default:
174183
# In case of issues with the probe, you can disable it with the

0 commit comments

Comments
 (0)