Skip to content

Commit

Permalink
Add option to skip network plugin installation (#11844)
Browse files Browse the repository at this point in the history
  • Loading branch information
ant31 authored Dec 31, 2024
1 parent 57490d5 commit 0222a2a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
11 changes: 10 additions & 1 deletion roles/kubernetes/preinstall/tasks/0040-verify-settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,20 @@

- name: Stop if unknown network plugin
assert:
that: kube_network_plugin in ['calico', 'flannel', 'weave', 'cloud', 'cilium', 'cni', 'kube-ovn', 'kube-router', 'macvlan', 'custom_cni']
that: kube_network_plugin in ['calico', 'flannel', 'weave', 'cloud', 'cilium', 'cni', 'kube-ovn', 'kube-router', 'macvlan', 'custom_cni', 'none']
msg: "{{ kube_network_plugin }} is not supported"
when:
- kube_network_plugin is defined
- not ignore_assert_errors
- name: Warn the user if they are still using `etcd_kubeadm_enabled`
debug:
msg: >
"WARNING! => `kube_network_plugin` is set to `none`. The network configuration will be skipped.
The cluster won't be ready to use, we recommend to select one of the available plugins"
changed_when: true
when:
- kube_network_plugin is defined
- kube_network_plugin == 'none'

- name: Stop if unsupported version of Kubernetes
assert:
Expand Down
1 change: 1 addition & 0 deletions roles/network_plugin/meta/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
dependencies:
- role: network_plugin/cni
when: kube_network_plugin != 'none'

- role: network_plugin/cilium
when: kube_network_plugin == 'cilium' or cilium_deploy_additionally | default(false) | bool
Expand Down

0 comments on commit 0222a2a

Please sign in to comment.