-
Notifications
You must be signed in to change notification settings - Fork 128
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(agent): Add Local Forwarder support for Agent (#1458)
Co-authored-by: Marco Vito Moscaritolo <[email protected]>
- Loading branch information
1 parent
cf079ae
commit 445f3c0
Showing
10 changed files
with
245 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{{- if .Values.localForwarder.enabled }} | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: {{ include "agent.localForwarderConfigMapName" . }} | ||
namespace: {{ include "agent.namespace" . }} | ||
labels: | ||
{{ (include "agent.labels" .) | indent 4 }} | ||
data: | ||
local_forwarder_config.yaml: | | ||
integrations: | ||
{{- toYaml .Values.localForwarder.integrations | nindent 6 }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
suite: Test enabling the agent local forwarder | ||
templates: | ||
- configmap.yaml | ||
- configmap-local-forwarder.yaml | ||
- daemonset.yaml | ||
tests: | ||
- it: Check the enabling the forwarder | ||
set: | ||
localForwarder: | ||
enabled: true | ||
integrations: | ||
- channels: | ||
- SECURE_EVENTS_POLICIES | ||
- ACTIVITY_AUDIT | ||
configuration: | ||
output: stdout | ||
type: LOCAL | ||
asserts: | ||
- equal: | ||
path: data["local_forwarder_config.yaml"] | ||
value: | | ||
integrations: | ||
- channels: | ||
- SECURE_EVENTS_POLICIES | ||
- ACTIVITY_AUDIT | ||
configuration: | ||
output: stdout | ||
type: LOCAL | ||
template: configmap-local-forwarder.yaml | ||
- matchRegex: | ||
path: data["dragent.yaml"] | ||
pattern: | | ||
local_forwarder: | ||
enabled: true | ||
transmit_message_types: | ||
- POLICY_EVENTS | ||
- SECURE_AUDIT | ||
template: configmap.yaml | ||
- contains: | ||
path: spec.template.spec.volumes | ||
content: | ||
name: local-forwarder-config | ||
configMap: | ||
name: sysdig-agent-local-forwarder | ||
optional: true | ||
template: daemonset.yaml | ||
- contains: | ||
path: spec.template.spec.containers[0].volumeMounts | ||
content: | ||
mountPath: /opt/draios/etc/local_forwarder_config.yaml | ||
subPath: local_forwarder_config.yaml | ||
name: local-forwarder-config | ||
template: daemonset.yaml | ||
- it: Ensure items are absent if local forwarder is disabled | ||
set: | ||
localForwarder: | ||
enabled: false | ||
asserts: | ||
- notMatchRegex: | ||
path: data["dragent.yaml"] | ||
pattern: | | ||
local_forwarder: | ||
enabled: true | ||
transmit_message_types: | ||
- POLICY_EVENTS | ||
- SECURE_AUDIT | ||
template: configmap.yaml | ||
- notContains: | ||
path: spec.template.spec.volumes | ||
content: | ||
name: local-forwarder-config | ||
configMap: | ||
name: sysdig-agent-local-forwarder | ||
optional: true | ||
template: daemonset.yaml | ||
- notContains: | ||
path: spec.template.spec.containers[0].volumeMounts | ||
content: | ||
mountPath: /opt/draios/etc/local_forwarder_config.yaml | ||
subPath: local_forwarder_config.yaml | ||
name: local-forwarder-config | ||
template: daemonset.yaml | ||
- it: Customize the forwarded message types | ||
set: | ||
localForwarder: | ||
enabled: true | ||
transmitMessageTypes: | ||
- POLICY_EVENTS | ||
integrations: | ||
- channels: | ||
- SECURE_EVENTS_POLICIES | ||
- ACTIVITY_AUDIT | ||
configuration: | ||
output: stdout | ||
type: LOCAL | ||
asserts: | ||
- matchRegex: | ||
path: data["dragent.yaml"] | ||
pattern: | | ||
local_forwarder: | ||
enabled: true | ||
transmit_message_types: | ||
- POLICY_EVENTS | ||
template: configmap.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ apiVersion: v2 | |
name: sysdig-deploy | ||
description: A chart with various Sysdig components for Kubernetes | ||
type: application | ||
version: 1.30.1 | ||
version: 1.31.0 | ||
maintainers: | ||
- name: AlbertoBarba | ||
email: [email protected] | ||
|
@@ -26,7 +26,7 @@ dependencies: | |
- name: agent | ||
# repository: https://charts.sysdig.com | ||
repository: file://../agent | ||
version: ~1.16.0 | ||
version: ~1.17.0 | ||
alias: agent | ||
condition: agent.enabled | ||
- name: common | ||
|