From 848fc323dbe1be461ef75b0b659e2c1e83374a12 Mon Sep 17 00:00:00 2001 From: Wong Hoi Sing Edison Date: Wed, 28 Mar 2018 11:16:42 +0800 Subject: [PATCH] Fixup for #2523: - Rename template for /etc/cni/net.d/00-weave.conflist to 00-weave.conflist.j2 - Apply resources requests/limits to both container weave and weave-npc --- roles/network_plugin/weave/tasks/main.yml | 2 +- .../{weavenet.conflist.j2 => 00-weave.conflist.j2} | 0 roles/network_plugin/weave/templates/weave-net.yml.j2 | 6 +++++- 3 files changed, 6 insertions(+), 2 deletions(-) rename roles/network_plugin/weave/templates/{weavenet.conflist.j2 => 00-weave.conflist.j2} (100%) diff --git a/roles/network_plugin/weave/tasks/main.yml b/roles/network_plugin/weave/tasks/main.yml index a8dfa0586..c2c5d82c0 100644 --- a/roles/network_plugin/weave/tasks/main.yml +++ b/roles/network_plugin/weave/tasks/main.yml @@ -4,7 +4,7 @@ - name: template weavenet conflist template: - src: weavenet.conflist.j2 + src: 00-weave.conflist.j2 dest: /etc/cni/net.d/00-weave.conflist owner: kube diff --git a/roles/network_plugin/weave/templates/weavenet.conflist.j2 b/roles/network_plugin/weave/templates/00-weave.conflist.j2 similarity index 100% rename from roles/network_plugin/weave/templates/weavenet.conflist.j2 rename to roles/network_plugin/weave/templates/00-weave.conflist.j2 diff --git a/roles/network_plugin/weave/templates/weave-net.yml.j2 b/roles/network_plugin/weave/templates/weave-net.yml.j2 index 70b70b3f8..699ba3128 100644 --- a/roles/network_plugin/weave/templates/weave-net.yml.j2 +++ b/roles/network_plugin/weave/templates/weave-net.yml.j2 @@ -141,7 +141,11 @@ items: initialDelaySeconds: 30 resources: requests: - cpu: 10m + cpu: {{ weave_cpu_requests }} + memory: {{ weave_memory_requests }} + limits: + cpu: {{ weave_cpu_limits }} + memory: {{ weave_memory_limits }} securityContext: privileged: true volumeMounts: