mirror of
https://github.com/PyratLabs/ansible-role-k3s
synced 2025-01-07 18:20:19 +01:00
Skip final checks when no-flannel option is used.
Fixes #16 This is because without a CNI, nodes will never be ready and the task will fail. You need to deploy your choice of CNI manually (such as Calico) then check the state of the cluster using `kubectl get nodes`.
This commit is contained in:
parent
2c09d4711b
commit
f709caf371
3 changed files with 5 additions and 4 deletions
|
@ -7,6 +7,7 @@
|
||||||
k3s_no_coredns: true
|
k3s_no_coredns: true
|
||||||
k3s_no_traefik: true
|
k3s_no_traefik: true
|
||||||
k3s_no_servicelb: true
|
k3s_no_servicelb: true
|
||||||
|
k3s_no_flannel: true
|
||||||
k3s_no_local_storage: true
|
k3s_no_local_storage: true
|
||||||
k3s_default_local_storage_path: false
|
k3s_default_local_storage_path: false
|
||||||
k3s_no_metrics_server: true
|
k3s_no_metrics_server: true
|
||||||
|
|
|
@ -74,4 +74,4 @@
|
||||||
and kubectl_get_nodes_result.stdout.find("NotReady") == -1
|
and kubectl_get_nodes_result.stdout.find("NotReady") == -1
|
||||||
retries: 30
|
retries: 30
|
||||||
delay: 20
|
delay: 20
|
||||||
when: k3s_control_node
|
when: k3s_control_node and not k3s_no_flannel
|
||||||
|
|
|
@ -28,10 +28,10 @@ ExecStart={{ k3s_install_dir }}/k3s
|
||||||
--disable-network-policy
|
--disable-network-policy
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if k3s_no_flannel %}
|
{% if k3s_no_flannel %}
|
||||||
{% if k3s_release_version is version_compare('1.0.0', '<') %}
|
{% if (k3s_release_version | replace('v', '')) is version_compare('1.0.0', '>=') %}
|
||||||
--no-flannel
|
|
||||||
{% else %}
|
|
||||||
--flannel-backend none
|
--flannel-backend none
|
||||||
|
{% else %}
|
||||||
|
--no-flannel
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if k3s_cluster_cidr is defined %}
|
{% if k3s_cluster_cidr is defined %}
|
||||||
|
|
Loading…
Reference in a new issue