Skip to content

Commit b7d9ab6

Browse files
Add support for Hubble flowlogs config
1 parent 6f74ef1 commit b7d9ab6

File tree

3 files changed

+31
-0
lines changed

3 files changed

+31
-0
lines changed

roles/network_plugin/cilium/defaults/main.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,3 +348,5 @@ cilium_certgen_args:
348348
cilium_clusterrole_rules_operator_extra_vars: []
349349
cilium_enable_host_firewall: false
350350
cilium_policy_audit_mode: false
351+
352+
# hubble_flowlogs_config: {}

roles/network_plugin/cilium/templates/cilium/config.yml.j2

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,11 @@ data:
281281
enable-bgp-control-plane: "{{ cilium_enable_bgp_control_plane }}"
282282

283283
disable-cnp-status-updates: "{{ cilium_disable_cnp_status_updates }}"
284+
285+
{% if hubble_flowlogs_config is defined %}
286+
hubble-flowlogs-config-path: /flowlog-config/flowlogs.yaml
287+
{% endif %}
288+
284289
{% if cilium_ip_masq_agent_enable %}
285290
---
286291
apiVersion: v1
@@ -297,3 +302,15 @@ data:
297302
masqLinkLocal: {{ cilium_masq_link_local | bool }}
298303
resyncInterval: "{{ cilium_ip_masq_resync_interval }}"
299304
{% endif %}
305+
306+
{% if hubble_flowlogs_config is defined %}
307+
---
308+
apiVersion: v1
309+
kind: ConfigMap
310+
metadata:
311+
name: cilium-flowlog-config
312+
namespace: kube-system
313+
data:
314+
flowlogs.yaml: |
315+
{{ hubble_flowlogs_config | to_yaml | indent(4) }}
316+
{% endif %}

roles/network_plugin/cilium/templates/cilium/ds.yml.j2

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,13 @@ spec:
192192
mountPath: /var/lib/cilium/tls/hubble
193193
readOnly: true
194194
{% endif %}
195+
196+
{% if hubble_flowlogs_config is defined %}
197+
- mountPath: /flowlog-config
198+
name: flowlog-config
199+
readOnly: true
200+
{% endif %}
201+
195202
{% for volume_mount in cilium_agent_extra_volume_mounts %}
196203
- {{ volume_mount | to_nice_yaml(indent=2) | indent(10) }}
197204
{% endfor %}
@@ -346,6 +353,11 @@ spec:
346353
tolerations:
347354
- operator: Exists
348355
volumes:
356+
{% if hubble_flowlogs_config is defined %}
357+
- name: flowlog-config
358+
configMap:
359+
name: cilium-flowlog-config
360+
{% endif %}
349361
# To keep state between restarts / upgrades
350362
- name: cilium-run
351363
hostPath:

0 commit comments

Comments
 (0)