refactor/dynamic-role-loading-network (#12933)

Signed-off-by: Tushar Sharma <tusharkumargzb6@gmail.com>
This commit is contained in:
Tushar240503
2026-02-03 21:58:29 +05:30
committed by GitHub
parent c5c2cf16a0
commit bf69e67240
2 changed files with 47 additions and 44 deletions

View File

@@ -1,44 +0,0 @@
---
dependencies:
- role: network_plugin/cni
when: kube_network_plugin != 'none'
- role: network_plugin/cilium
when: kube_network_plugin == 'cilium' or cilium_deploy_additionally
tags:
- cilium
- role: network_plugin/calico
when: kube_network_plugin == 'calico'
tags:
- calico
- role: network_plugin/flannel
when: kube_network_plugin == 'flannel'
tags:
- flannel
- role: network_plugin/macvlan
when: kube_network_plugin == 'macvlan'
tags:
- macvlan
- role: network_plugin/kube-ovn
when: kube_network_plugin == 'kube-ovn'
tags:
- kube-ovn
- role: network_plugin/kube-router
when: kube_network_plugin == 'kube-router'
tags:
- kube-router
- role: network_plugin/custom_cni
when: kube_network_plugin == 'custom_cni'
tags:
- custom_cni
- role: network_plugin/multus
when: kube_network_plugin_multus
tags:
- multus

View File

@@ -0,0 +1,47 @@
---
- name: Container Network Interface plugin
include_role:
name: network_plugin/cni
when: kube_network_plugin != 'none'
- name: Network plugin
include_role:
name: "network_plugin/{{ kube_network_plugin }}"
apply:
tags:
- "{{ kube_network_plugin }}"
- network
when:
- kube_network_plugin != 'none'
tags:
- cilium
- calico
- flannel
- macvlan
- kube-ovn
- kube-router
- custom_cni
- name: Cilium additional
include_role:
name: network_plugin/cilium
apply:
tags:
- cilium
- network
when:
- kube_network_plugin != 'cilium'
- cilium_deploy_additionally
tags:
- cilium
- name: Multus
include_role:
name: network_plugin/multus
apply:
tags:
- multus
- network
when: kube_network_plugin_multus
tags:
- multus