Skip to content

Commit

Permalink
Weave: add extra_args for weave-npc (kubernetes-sigs#8140)
Browse files Browse the repository at this point in the history
* add weave_npc_extra_args in template

* add defaults weave_npc_extra_args

* add sample for weave_npc_extra_args
  • Loading branch information
brainfair authored Oct 28, 2021
1 parent 539c9e0 commit 465ffa3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions inventory/sample/group_vars/k8s_cluster/k8s-net-weave.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,6 @@
# Extra variables that passing to launch.sh, useful for enabling seed mode, see
# https://www.weave.works/docs/net/latest/tasks/ipam/ipam/
# weave_extra_args: ~

# Extra variables for weave_npc that passing to launch.sh, useful for change log level, ex --log-level=error
# weave_npc_extra_args: ~
3 changes: 3 additions & 0 deletions roles/network_plugin/weave/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,6 @@ weave_iptables_backend: ~
# Extra variables that passing to launch.sh, useful for enabling seed mode, see
# https://www.weave.works/docs/net/latest/tasks/ipam/ipam/
weave_extra_args: ~

# Extra variables for weave_npc that passing to launch.sh, useful for change log level, ex --log-level=error
weave_npc_extra_args: ~
4 changes: 4 additions & 0 deletions roles/network_plugin/weave/templates/weave-net.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,10 @@ items:
fieldRef:
apiVersion: v1
fieldPath: spec.nodeName
{% if weave_npc_extra_args %}
- name: EXTRA_ARGS
value: "{{ weave_npc_extra_args }}"
{% endif %}
image: {{ weave_npc_image_repo }}:{{ weave_npc_image_tag }}
imagePullPolicy: {{ k8s_image_pull_policy }}
resources:
Expand Down

0 comments on commit 465ffa3

Please sign in to comment.