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:
Xan Manning 2020-03-07 14:23:09 +00:00
parent 2c09d4711b
commit f709caf371
3 changed files with 5 additions and 4 deletions

View File

@ -7,6 +7,7 @@
k3s_no_coredns: true
k3s_no_traefik: true
k3s_no_servicelb: true
k3s_no_flannel: true
k3s_no_local_storage: true
k3s_default_local_storage_path: false
k3s_no_metrics_server: true

View File

@ -74,4 +74,4 @@
and kubectl_get_nodes_result.stdout.find("NotReady") == -1
retries: 30
delay: 20
when: k3s_control_node
when: k3s_control_node and not k3s_no_flannel

View File

@ -28,10 +28,10 @@ ExecStart={{ k3s_install_dir }}/k3s
--disable-network-policy
{% endif %}
{% if k3s_no_flannel %}
{% if k3s_release_version is version_compare('1.0.0', '<') %}
--no-flannel
{% else %}
{% if (k3s_release_version | replace('v', '')) is version_compare('1.0.0', '>=') %}
--flannel-backend none
{% else %}
--no-flannel
{% endif %}
{% endif %}
{% if k3s_cluster_cidr is defined %}