Commit f5b10df5 authored by kaiyou's avatar kaiyou

Allow k3s port selection

parent 53d156d9
K3S_CLUSTER_SECRET={{ k3s_cluster_key }}
{% if not ansible_hostname in groups['master'] %}
K3S_URL=https://{{ k3s_master }}:6443
K3S_URL=https://{{ k3s_master }}:{{ k3s_port }}
{% endif %}
......@@ -24,7 +24,6 @@ ExecStartPre=-/sbin/modprobe overlay
Type=notify
ExecStartPre=-/usr/sbin/iptables -t nat -A OUTPUT -d 127.0.0.1 -p tcp --dport {{ k3s_port + 1 }} -j DNAT --to {{ wesher_address }}
ExecStartPost=-/usr/sbin/iptables -t nat -D OUTPUT -d 127.0.0.1 -p tcp --dport {{ k3s_port + 1 }} -j DNAT --to {{ wesher_address }}
ExecStart=/usr/local/sbin/k3s server --no-flannel --disable-network-policy --disable-cloud-controller --no-deploy traefik,servicelb,metrics-server -i {{ wesher_address }} --bind-address {{ wesher_address }} --https-listen-port {{ k3s_port }} --kube-apiserver-arg "bind-address={{ wesher_address }}" --kube-scheduler-arg "port=0" --kube-controller-manager-arg "port=0" --tls-san {{ k3s_master }} -d /var/lib/rancher/k3s-{{ cluster_slug }} {% if not k3s_master_agent %}--disable-agent{% endif %}
{% else %}
......
......@@ -22,6 +22,7 @@
path: "/sys/class/net/wg-{{ cluster_slug }}"
timeout: 60
state: present
when: groups['node']
- name: Update facts after wesher is up
setup:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment