2023-03-03 16:23:08 +08:00
|
|
|
---
|
2023-11-16 07:32:21 +08:00
|
|
|
- name: Custom CNI | Manifest deployment
|
|
|
|
when: not custom_cni_chart_release_name | length > 0
|
|
|
|
block:
|
|
|
|
- name: Custom CNI | Check Custom CNI Manifests
|
|
|
|
assert:
|
|
|
|
that:
|
2023-03-03 16:23:08 +08:00
|
|
|
- "custom_cni_manifests | length > 0"
|
2023-11-16 07:32:21 +08:00
|
|
|
msg: "custom_cni_manifests should not be empty"
|
2023-03-03 16:23:08 +08:00
|
|
|
|
2023-11-16 07:32:21 +08:00
|
|
|
- name: Custom CNI | Copy Custom manifests
|
|
|
|
template:
|
|
|
|
src: "{{ item }}"
|
|
|
|
dest: "{{ kube_config_dir }}/{{ item | basename | replace('.j2', '') }}"
|
2024-07-26 09:42:20 +08:00
|
|
|
mode: "0644"
|
2023-11-16 07:32:21 +08:00
|
|
|
loop: "{{ custom_cni_manifests }}"
|
|
|
|
delegate_to: "{{ groups['kube_control_plane'] | first }}"
|
|
|
|
run_once: true
|
2023-03-03 16:23:08 +08:00
|
|
|
|
2023-11-16 07:32:21 +08:00
|
|
|
- name: Custom CNI | Start Resources
|
|
|
|
kube:
|
|
|
|
namespace: "kube-system"
|
|
|
|
kubectl: "{{ bin_dir }}/kubectl"
|
|
|
|
filename: "{{ kube_config_dir }}/{{ item | basename | replace('.j2', '') }}"
|
|
|
|
state: "latest"
|
|
|
|
wait: true
|
|
|
|
loop: "{{ custom_cni_manifests }}"
|
|
|
|
delegate_to: "{{ groups['kube_control_plane'] | first }}"
|
|
|
|
run_once: true
|