From 49e1eeb2e108557d0501dd095fdfdfc098196ae0 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Sun, 9 Apr 2023 12:51:30 +0200 Subject: [PATCH] feat: add option to disable kube-proxy --- defaults/main.yml | 1 + templates/etc/rancher/k3s/config.yaml.j2 | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/defaults/main.yml b/defaults/main.yml index 4259442..720dc8c 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -24,6 +24,7 @@ k3s_server_nodes: k3s_server_flannel_backend_enabled: True k3s_server_network_policy_enabled: True k3s_server_cloud_controller_enabled: True +k3s_server_kube_proxy_enabled: True k3s_server_workload_enabled: True k3s_server_feature_gates: [] diff --git a/templates/etc/rancher/k3s/config.yaml.j2 b/templates/etc/rancher/k3s/config.yaml.j2 index 2a12d2c..503174d 100644 --- a/templates/etc/rancher/k3s/config.yaml.j2 +++ b/templates/etc/rancher/k3s/config.yaml.j2 @@ -39,11 +39,14 @@ kube-controller-manager-arg: flannel-backend: "none" {% endif %} {% if not k3s_server_cloud_controller_enabled | bool %} -disable-cloud-controller: true +disable-cloud-controller: True {% endif %} {% if not k3s_server_network_policy_enabled | bool %} disable-network-policy: True {% endif %} +{% if not k3s_server_kube_proxy_enabled | bool %} +disable-kube-proxy: True +{% endif %} {% else %} server: "https://{{ __k3s_server_ip }}:6443" {% endif %}