|
| 1 | +suite: Test enabling the agent local forwarder |
| 2 | +templates: |
| 3 | + - configmap.yaml |
| 4 | + - configmap-local-forwarder.yaml |
| 5 | + - daemonset.yaml |
| 6 | +tests: |
| 7 | + - it: Check the enabling the forwarder |
| 8 | + set: |
| 9 | + localForwarder: |
| 10 | + enabled: true |
| 11 | + integrations: |
| 12 | + - channels: |
| 13 | + - SECURE_EVENTS_POLICIES |
| 14 | + - ACTIVITY_AUDIT |
| 15 | + configuration: |
| 16 | + output: stdout |
| 17 | + type: LOCAL |
| 18 | + asserts: |
| 19 | + - equal: |
| 20 | + path: data["local_forwarder_config.yaml"] |
| 21 | + value: | |
| 22 | + integrations: |
| 23 | + - channels: |
| 24 | + - SECURE_EVENTS_POLICIES |
| 25 | + - ACTIVITY_AUDIT |
| 26 | + configuration: |
| 27 | + output: stdout |
| 28 | + type: LOCAL |
| 29 | + template: configmap-local-forwarder.yaml |
| 30 | + - matchRegex: |
| 31 | + path: data["dragent.yaml"] |
| 32 | + pattern: | |
| 33 | + local_forwarder: |
| 34 | + enabled: true |
| 35 | + transmit_message_types: |
| 36 | + - POLICY_EVENTS |
| 37 | + - SECURE_AUDIT |
| 38 | + template: configmap.yaml |
| 39 | + - contains: |
| 40 | + path: spec.template.spec.volumes |
| 41 | + content: |
| 42 | + name: local-forwarder-config |
| 43 | + configMap: |
| 44 | + name: sysdig-agent-local-forwarder |
| 45 | + optional: true |
| 46 | + template: daemonset.yaml |
| 47 | + - contains: |
| 48 | + path: spec.template.spec.containers[0].volumeMounts |
| 49 | + content: |
| 50 | + mountPath: /opt/draios/etc/local_forwarder_config.yaml |
| 51 | + subPath: local_forwarder_config.yaml |
| 52 | + name: local-forwarder-config |
| 53 | + template: daemonset.yaml |
| 54 | + - it: Ensure items are absent if local forwarder is disabled |
| 55 | + set: |
| 56 | + localForwarder: |
| 57 | + enabled: false |
| 58 | + asserts: |
| 59 | + - notMatchRegex: |
| 60 | + path: data["dragent.yaml"] |
| 61 | + pattern: | |
| 62 | + local_forwarder: |
| 63 | + enabled: true |
| 64 | + transmit_message_types: |
| 65 | + - POLICY_EVENTS |
| 66 | + - SECURE_AUDIT |
| 67 | + template: configmap.yaml |
| 68 | + - notContains: |
| 69 | + path: spec.template.spec.volumes |
| 70 | + content: |
| 71 | + name: local-forwarder-config |
| 72 | + configMap: |
| 73 | + name: sysdig-agent-local-forwarder |
| 74 | + optional: true |
| 75 | + template: daemonset.yaml |
| 76 | + - notContains: |
| 77 | + path: spec.template.spec.containers[0].volumeMounts |
| 78 | + content: |
| 79 | + mountPath: /opt/draios/etc/local_forwarder_config.yaml |
| 80 | + subPath: local_forwarder_config.yaml |
| 81 | + name: local-forwarder-config |
| 82 | + template: daemonset.yaml |
| 83 | + - it: Customize the forwarded message types |
| 84 | + set: |
| 85 | + localForwarder: |
| 86 | + enabled: true |
| 87 | + transmitMessageTypes: |
| 88 | + - POLICY_EVENTS |
| 89 | + integrations: |
| 90 | + - channels: |
| 91 | + - SECURE_EVENTS_POLICIES |
| 92 | + - ACTIVITY_AUDIT |
| 93 | + configuration: |
| 94 | + output: stdout |
| 95 | + type: LOCAL |
| 96 | + asserts: |
| 97 | + - matchRegex: |
| 98 | + path: data["dragent.yaml"] |
| 99 | + pattern: | |
| 100 | + local_forwarder: |
| 101 | + enabled: true |
| 102 | + transmit_message_types: |
| 103 | + - POLICY_EVENTS |
| 104 | + template: configmap.yaml |
0 commit comments