From 66147859c5f94e6de6f12a84d05238fbca1a91e1 Mon Sep 17 00:00:00 2001 From: Alexander Zhilko <49622006+strelok899@users.noreply.github.com> Date: Wed, 6 Mar 2024 19:55:12 +0200 Subject: [PATCH 1/3] adding option to disable builtin cloud controller --- README.md | 3 +++ defaults/main.yml | 3 +++ templates/config.yaml.j2 | 4 ++++ 3 files changed, 10 insertions(+) diff --git a/README.md b/README.md index 7a374a2..6b1d8f7 100644 --- a/README.md +++ b/README.md @@ -184,6 +184,9 @@ rke2_disable: # Option to disable kube-proxy disable_kube_proxy: false +# Option to disable builtin cloud controller - mostly for onprem +rke2_disable_cloud_controller: false + # Path to custom manifests deployed during the RKE2 installation # It is possible to use Jinja2 templating in the manifests rke2_custom_manifests: diff --git a/defaults/main.yml b/defaults/main.yml index 46bc930..b2ff1cf 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -145,6 +145,9 @@ rke2_disable: # Option to disable kube-proxy disable_kube_proxy: false +# Option to disable builtin cloud controller - mostly for onprem +rke2_disable_cloud_controller: false + # Path to custom manifests deployed during the RKE2 installation # It is possible to use Jinja2 templating in the manifests rke2_custom_manifests: diff --git a/templates/config.yaml.j2 b/templates/config.yaml.j2 index 12022b5..9e7d930 100644 --- a/templates/config.yaml.j2 +++ b/templates/config.yaml.j2 @@ -77,3 +77,7 @@ kubelet-arg: - {{ argument }} {% endfor %} {% endif %} +{% if (rke2_disable_cloud_controller | bool ) %} +disable-cloud-controller : true +{% endif %} + From 73ca3ad9002a9af62bccff5586e6a903d70bbb55 Mon Sep 17 00:00:00 2001 From: Alexander Zhilko <49622006+strelok899@users.noreply.github.com> Date: Wed, 6 Mar 2024 23:23:11 +0200 Subject: [PATCH 2/3] fixing typo and adding cloud provider name --- README.md | 4 ++++ defaults/main.yml | 4 ++++ templates/config.yaml.j2 | 3 ++- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6b1d8f7..311ce43 100644 --- a/README.md +++ b/README.md @@ -187,6 +187,10 @@ disable_kube_proxy: false # Option to disable builtin cloud controller - mostly for onprem rke2_disable_cloud_controller: false +# Cloud provider to use for the cluster (aws, azure, gce, openstack, vsphere, external) +# applicable only if rke2_disable_cloud_controller is true +rke2_cloud_provider_name: "rke2" + # Path to custom manifests deployed during the RKE2 installation # It is possible to use Jinja2 templating in the manifests rke2_custom_manifests: diff --git a/defaults/main.yml b/defaults/main.yml index b2ff1cf..4f31345 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -148,6 +148,10 @@ disable_kube_proxy: false # Option to disable builtin cloud controller - mostly for onprem rke2_disable_cloud_controller: false +# Cloud provider to use for the cluster (aws, azure, gce, openstack, vsphere, external) +# applicable only if rke2_disable_cloud_controller is true +rke2_cloud_provider_name: "external" + # Path to custom manifests deployed during the RKE2 installation # It is possible to use Jinja2 templating in the manifests rke2_custom_manifests: diff --git a/templates/config.yaml.j2 b/templates/config.yaml.j2 index 9e7d930..342bf77 100644 --- a/templates/config.yaml.j2 +++ b/templates/config.yaml.j2 @@ -78,6 +78,7 @@ kubelet-arg: {% endfor %} {% endif %} {% if (rke2_disable_cloud_controller | bool ) %} -disable-cloud-controller : true +disable-cloud-controller: true +cloud-provider-name: "{{ rke2_cloud_provider_name }}" {% endif %} From aa42f038c7f6661e7b3e4503dc3dcb348aada005 Mon Sep 17 00:00:00 2001 From: Alexander Zhilko <49622006+strelok899@users.noreply.github.com> Date: Mon, 18 Mar 2024 14:18:27 +0200 Subject: [PATCH 3/3] fixing trailing spaces --- README.md | 4 ++-- defaults/main.yml | 4 ++-- templates/config.yaml.j2 | 1 - 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 311ce43..8e684f4 100644 --- a/README.md +++ b/README.md @@ -184,10 +184,10 @@ rke2_disable: # Option to disable kube-proxy disable_kube_proxy: false -# Option to disable builtin cloud controller - mostly for onprem +# Option to disable builtin cloud controller - mostly for onprem rke2_disable_cloud_controller: false -# Cloud provider to use for the cluster (aws, azure, gce, openstack, vsphere, external) +# Cloud provider to use for the cluster (aws, azure, gce, openstack, vsphere, external) # applicable only if rke2_disable_cloud_controller is true rke2_cloud_provider_name: "rke2" diff --git a/defaults/main.yml b/defaults/main.yml index 4f31345..ddf0a8d 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -145,10 +145,10 @@ rke2_disable: # Option to disable kube-proxy disable_kube_proxy: false -# Option to disable builtin cloud controller - mostly for onprem +# Option to disable builtin cloud controller - mostly for onprem rke2_disable_cloud_controller: false -# Cloud provider to use for the cluster (aws, azure, gce, openstack, vsphere, external) +# Cloud provider to use for the cluster (aws, azure, gce, openstack, vsphere, external) # applicable only if rke2_disable_cloud_controller is true rke2_cloud_provider_name: "external" diff --git a/templates/config.yaml.j2 b/templates/config.yaml.j2 index 342bf77..ff0fe3b 100644 --- a/templates/config.yaml.j2 +++ b/templates/config.yaml.j2 @@ -81,4 +81,3 @@ kubelet-arg: disable-cloud-controller: true cloud-provider-name: "{{ rke2_cloud_provider_name }}" {% endif %} -