From 04375f5e398f77135f8c6d20c2dd0fa11d48671a Mon Sep 17 00:00:00 2001 From: Martin Friedrich Date: Mon, 26 Oct 2020 10:38:21 +0100 Subject: [PATCH 1/3] add support for advertise ip, this was needed to advertise using the internal-ip's of my nodes --- templates/k3s.service.j2 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/templates/k3s.service.j2 b/templates/k3s.service.j2 index 4d86782..308c13c 100644 --- a/templates/k3s.service.j2 +++ b/templates/k3s.service.j2 @@ -19,6 +19,9 @@ ExecStart={{ k3s_install_dir }}/k3s {% if k3s_bind_address is defined %} --bind-address {{ k3s_bind_address }} {% endif %} + {% if k3s_advertise_address is defined %} + --advertise-address {{ k3s_advertise_address }} + {% endif %} {% if k3s_non_root is defined and k3s_non_root %} --rootless {% endif %} From edc98a6d6e2756879bf70d22c88afe388c6740ed Mon Sep 17 00:00:00 2001 From: Martin Friedrich Date: Mon, 26 Oct 2020 10:43:36 +0100 Subject: [PATCH 2/3] add advertise address to readme --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 83bd7a6..1bb30f9 100644 --- a/README.md +++ b/README.md @@ -222,6 +222,7 @@ Below are variables that are set against specific hosts in your inventory. | `k3s_node_name` | Define the name of this node. | `$(hostname)` | | `k3s_node_id` | Define the ID of this node. | _NULL_ | | `k3s_flannel_interface` | Define the flannel proxy interface for this node. | _NULL_ | +| `k3s_advertise_address` | Define the advertise address for this node. | _NULL_ | | `k3s_bind_address` | Define the bind address for this node. | localhost | | `k3s_node_ip_address` | IP Address to advertise for this node. | _NULL_ | | `k3s_node_external_address` | External IP Address to advertise for this node. | _NULL_ | From 4ed0727411607f1bd47584bc46c15335b377bc7d Mon Sep 17 00:00:00 2001 From: Martin Friedrich Date: Mon, 26 Oct 2020 11:24:11 +0100 Subject: [PATCH 3/3] add missing host-gw to flannel backend comment --- defaults/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/defaults/main.yml b/defaults/main.yml index 56821a0..d823b49 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -80,7 +80,7 @@ k3s_use_docker: false # Disable flannel, you will need to install your own CNI driver. k3s_no_flannel: false -# Flannel backend ('none', 'vxlan', 'ipsec', or 'wireguard') +# Flannel backend ('none', 'vxlan', 'ipsec', 'host-gw' or 'wireguard') # k3s_flannel_backend: vxlan # Disable CoreDNS, you will need to install your own DNS provider.