diff --git a/README.md b/README.md index 0ea757b..b8ccf2a 100644 --- a/README.md +++ b/README.md @@ -143,9 +143,12 @@ rke2_install_script_dir: /var/tmp rke2_channel: stable # Do not deploy packaged components and delete any deployed components -# Valid items: rke2-canal, rke2-coredns, rke2-ingress-nginx, rke2-kube-proxy, rke2-metrics-server +# Valid items: rke2-canal, rke2-coredns, rke2-ingress-nginx, rke2-metrics-server rke2_disable: +# Option to disable kube-proxy +# disable_kube_proxy: true + # Path to custom manifests deployed during the RKE2 installation # It is possible to use Jinja2 templating in the manifests rke2_custom_manifests: @@ -196,7 +199,6 @@ rke2_etcd_snapshot_destination_dir: "{{ rke2_data_path }}/server/db/snapshots" # endpoint_ca: "" # optional. Can skip if using defaults # region: "" # optional - defaults to us-east-1 # folder: "" # optional - defaults to top level of bucket - # Override default containerd snapshotter rke2_snapshooter: overlayfs diff --git a/defaults/main.yml b/defaults/main.yml index 9aa10a2..f408012 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -106,9 +106,12 @@ rke2_install_script_dir: /var/tmp rke2_channel: stable # Do not deploy packaged components and delete any deployed components -# Valid items: rke2-canal, rke2-coredns, rke2-ingress-nginx, rke2-kube-proxy, rke2-metrics-server +# Valid items: rke2-canal, rke2-coredns, rke2-ingress-nginx, rke2-metrics-server rke2_disable: +# Option to disable kube-proxy +# disable_kube_proxy: true + # 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 5de27fd..bdabea9 100644 --- a/templates/config.yaml.j2 +++ b/templates/config.yaml.j2 @@ -40,6 +40,9 @@ node-label: {% endif %} snapshotter: {{ rke2_snapshooter }} node-name: {{ inventory_hostname }} +{% if ( disable_kube_proxy | bool ) %} +disable-kube-proxy: true +{% endif %} {% if 'cis' in rke2_cis_profile %} profile: {{ rke2_cis_profile }} {%endif%}