Skip to content

Commit e23abc6

Browse files
committed
Incorporating changes from the master branch
1 parent 916b03f commit e23abc6

File tree

2 files changed

+17
-6
lines changed

2 files changed

+17
-6
lines changed

templates/_helpers.tpl

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,17 @@ Return eBPF configuration required if enabled
8686
{{- end -}}
8787
{{- end -}}
8888

89+
{{/*
90+
Return Low Power Mode configuration required if enabled
91+
*/}}
92+
{{- define "threatstack-agent.daemonset-lowPowerMode-config" -}}
93+
{{- if .Values.daemonset.enableLowPowerMode -}}
94+
{{- "low_power true" -}}
95+
{{- else -}}
96+
{{- "low_power false" -}}
97+
{{- end -}}
98+
{{- end -}}
99+
89100
{{/*
90101
Return runtime config if docker is disabled
91102
*/}}
@@ -128,11 +139,11 @@ Return Service Account Name if rbac is enabled
128139
{{/*
129140
Return Additional Runtime Config for Daemonset
130141
*/}}
131-
{{- define "threatstack-agent.daemonset-RuntimeConfig" -}}
132-
{{- $runtimeConfig := list (include "threatstack-agent.docker-config" .) (include "threatstack-agent.containerd-config" .) (include "threatstack-agent.daemonset-ebpf-config" .) -}}
133-
{{- if .Values.daemonset.enableLowPowerMode -}}
134-
{{- $runtimeConfig = append $runtimeConfig "low_power true" -}}
135-
{{- end -}}
142+
{{- define "threatstack-agent.daemonset-runtimeConfig" -}}
143+
{{- $runtimeConfig := list (include "threatstack-agent.docker-config" .) (include "threatstack-agent.containerd-config" .) -}}
144+
{{- $runtimeConfig = append $runtimeConfig (include "threatstack-agent.daemonset-lowPowerMode-config" .) -}}
145+
{{- $runtimeConfig = append $runtimeConfig (include "threatstack-agent.daemonset-ebpf-config" .) -}}
136146
{{- $runtimeConfig = append $runtimeConfig .Values.daemonset.additionalRuntimeConfig -}}
147+
137148
{{ $runtimeConfig | join " " }}
138149
{{- end -}}

templates/configmap.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ metadata:
3030
app.kubernetes.io/instance: {{ .Release.Name }}
3131
app.kubernetes.io/managed-by: {{ .Release.Service }}
3232
data:
33-
config-args: {{ include "threatstack-agent.daemonset-RuntimeConfig" . }}
33+
config-args: {{ include "threatstack-agent.daemonset-runtimeConfig" . }}
3434
kubernetes-api-config-args: enable_kubes_master 1 {{ .Values.apiReader.additionalRuntimeConfig }}
3535
{{- if .Values.daemonset.customAuditRules }}
3636
custom-audit-rules-content: {{ toYaml .Values.daemonset.customAuditRules | indent 4 }}

0 commit comments

Comments
 (0)