Skip to content

Commit 0222a2a

Browse files
authoredDec 31, 2024··
Add option to skip network plugin installation (#11844)
1 parent 57490d5 commit 0222a2a

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed
 

‎roles/kubernetes/preinstall/tasks/0040-verify-settings.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,20 @@
4242

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

5160
- name: Stop if unsupported version of Kubernetes
5261
assert:

‎roles/network_plugin/meta/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
dependencies:
33
- role: network_plugin/cni
4+
when: kube_network_plugin != 'none'
45

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

0 commit comments

Comments
 (0)
Please sign in to comment.