Skip to content

Commit

Permalink
flexibility in the configuration of resources for cilium
Browse files Browse the repository at this point in the history
  • Loading branch information
pbromb committed Apr 3, 2024
1 parent 3067e56 commit ca72198
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions roles/network_plugin/cilium/templates/cilium/ds.yml.j2
Expand Up @@ -121,13 +121,27 @@ spec:
exec:
command:
- /cni-uninstall.sh
{% if cilium_cpu_limit or cilium_memory_limit or cilium_cpu_requests or cilium_memory_requests %}
resources:
{% if cilium_cpu_limit or cilium_memory_limit %}
limits:
{% if cilium_cpu_limit %}
cpu: {{ cilium_cpu_limit }}
{% endif %}
{% if cilium_memory_limit %}
memory: {{ cilium_memory_limit }}
{% endif %}
{% endif %}
{% if cilium_cpu_requests or cilium_memory_requests %}
requests:
{% if cilium_cpu_requests %}
cpu: {{ cilium_cpu_requests }}
{% endif %}
{% if cilium_memory_requests %}
memory: {{ cilium_memory_requests }}
{% endif %}
{% endif %}
{% endif %}
{% if cilium_enable_prometheus or cilium_enable_hubble_metrics %}
ports:
{% endif %}
Expand Down

0 comments on commit ca72198

Please sign in to comment.