feat: add option to control the k3s cloud controller
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Robert Kaussow 2022-11-16 20:51:03 +01:00
parent 79da41d3b6
commit 1c20e20dec
Signed by: xoxys
GPG Key ID: 4E692A2EAECC03C0
3 changed files with 7 additions and 0 deletions

View File

@ -21,6 +21,7 @@ k3s_server_nodes:
- "{{ ansible_hostname }}" - "{{ ansible_hostname }}"
k3s_server_flannel_backend_enabled: True k3s_server_flannel_backend_enabled: True
k3s_server_network_policy_enabled: True k3s_server_network_policy_enabled: True
k3s_server_cloud_controller_enabled: True
k3s_server_feature_gates: [] k3s_server_feature_gates: []
k3s_server_manifests_templates: [] k3s_server_manifests_templates: []

View File

@ -1,2 +1,5 @@
#jinja2: lstrip_blocks: True #jinja2: lstrip_blocks: True
- config={{ __k3s_config_dir }}/kubelet.yaml - config={{ __k3s_config_dir }}/kubelet.yaml
{% if not k3s_server_cloud_controller_enabled | bool %}
- cloud-provider=external
{% endif %}

View File

@ -24,6 +24,9 @@ kube-apiserver-arg:
{% if not k3s_server_flannel_backend_enabled | bool %} {% if not k3s_server_flannel_backend_enabled | bool %}
flannel-backend: "none" flannel-backend: "none"
{% endif %} {% endif %}
{% if not k3s_server_cloud_controller_enabled | bool %}
disable-cloud-controller: true
{% endif %}
{% if not k3s_server_network_policy_enabled | bool %} {% if not k3s_server_network_policy_enabled | bool %}
disable-network-policy: True disable-network-policy: True
{% endif %} {% endif %}