Skip to content

Commit e9f4aed

Browse files
author
Michael Chmielewski
committed
Add the ability to define custom LUA filters
1 parent 382f909 commit e9f4aed

File tree

3 files changed

+28
-0
lines changed

3 files changed

+28
-0
lines changed

templates/configmap.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,6 @@ data:
1616
{{- if .Values.daemonset.customTsAuditd }}
1717
custom-tsauditd-config: {{ toYaml .Values.daemonset.customTsAuditd | indent 4 }}
1818
{{- end }}
19+
{{- if .Values.daemonset.customLuaFilters }}
20+
custom-luafilters-config: {{ toYaml .Values.daemonset.customLuaFilters | indent 4 }}
21+
{{- end }}

templates/daemonset.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,11 @@ spec:
132132
- name: custom-tsauditd-config
133133
mountPath: /opt/threatstack/etc/tsauditd-custom.cfg
134134
subPath: tsauditd-custom.cfg
135+
{{- end }}
136+
{{- if .Values.daemonset.customLuaFilters }}
137+
- name: custom-luafilters-config
138+
mountPath: /opt/threatstack/etc/tsauditd-custom.lua
139+
subPath: tsauditd-custom.lua
135140
{{- end }}
136141
volumes:
137142
- hostPath:
@@ -161,4 +166,12 @@ spec:
161166
items:
162167
- key: custom-tsauditd-config
163168
path: tsauditd-custom.cfg
169+
{{- end }}
170+
{{- if .Values.daemonset.customLuaFilters }}
171+
- name: custom-luafilters-config
172+
configMap:
173+
name: {{ include "threatstack-agent.name" . }}-config-args
174+
items:
175+
- key: custom-luafilters-config
176+
path: tsauditd-custom.lua
164177
{{- end }}

values.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,3 +223,15 @@ daemonset:
223223
# }
224224
#
225225
customTsAuditdConfig: ""
226+
227+
# Override this to provide custom lua filters to the agent.
228+
# Make sure to use | to ensure the custom rules data is
229+
# properly parsed and output.
230+
#
231+
# Example:
232+
# customLuaFilters: |
233+
# foo
234+
# bar
235+
# the end
236+
#
237+
customLuaFilters: ""

0 commit comments

Comments
 (0)