feat(cni): add preflight network resource support for custom_cni
parent
1968db9a52
commit
155fb83586
|
@ -49,3 +49,15 @@
|
|||
# custom_cni_chart_values:
|
||||
# cluster:
|
||||
# name: "cilium-demo"
|
||||
|
||||
## Preflight - Deploy network files prior to CNI
|
||||
## It can be used when preparatory work such as deploying CRDs is required
|
||||
## prior to CNI distribution, as if the `kubectl create -f` method (present)
|
||||
## or `kubectl apply -f` (latest) was used with it.
|
||||
#
|
||||
## List of Kubernetes network resource files
|
||||
## Example:
|
||||
# custom_cni_preflight_templates:
|
||||
# - path: https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/main/example/prometheus-operator-crd/monitoring.coreos.com_servicemonitors.yaml
|
||||
# namespace: "kube-system" # default: "kube-system"
|
||||
# state: present # options: [latest, present, absent]
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
---
|
||||
- name: Custom CNI | Preflight | Start Resources
|
||||
kube:
|
||||
namespace: "{{ item.namespace | default('kube-system') }}"
|
||||
kubectl: "{{ bin_dir }}/kubectl"
|
||||
filename: "{{ item.path }}"
|
||||
state: "{{ item.state }}"
|
||||
wait: true
|
||||
loop: "{{ custom_cni_preflight_templates }}"
|
||||
delegate_to: "{{ groups['kube_control_plane'] | first }}"
|
||||
run_once: true
|
|
@ -1,5 +1,7 @@
|
|||
---
|
||||
|
||||
custom_cni_preflight_templates: []
|
||||
|
||||
custom_cni_manifests: []
|
||||
|
||||
custom_cni_chart_namespace: kube-system
|
||||
|
|
|
@ -1,5 +1,13 @@
|
|||
---
|
||||
dependencies:
|
||||
- role: kubernetes-apps/network_plugin/custom_cni
|
||||
when:
|
||||
- inventory_hostname == groups['kube_control_plane'][0]
|
||||
- custom_cni_chart_release_name | length > 0
|
||||
environment:
|
||||
http_proxy: "{{ http_proxy | default('') }}"
|
||||
https_proxy: "{{ https_proxy | default('') }}"
|
||||
|
||||
- role: helm-apps
|
||||
when:
|
||||
- inventory_hostname == groups['kube_control_plane'][0]
|
||||
|
|
Loading…
Reference in New Issue