Browse Source
Don't create calico CNI dir when not using calico (#10156)
Signed-off-by: Pat Riehecky <riehecky@fnal.gov>
pull/10174/head
Pat Riehecky
1 year ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
16 additions and
1 deletions
-
roles/kubernetes/preinstall/tasks/0050-create_directories.yml
|
|
@ -76,7 +76,6 @@ |
|
|
|
with_items: |
|
|
|
- "/etc/cni/net.d" |
|
|
|
- "/opt/cni/bin" |
|
|
|
- "/var/lib/calico" |
|
|
|
when: |
|
|
|
- kube_network_plugin in ["calico", "weave", "flannel", "cilium", "kube-ovn", "kube-router", "macvlan"] |
|
|
|
- inventory_hostname in groups['k8s_cluster'] |
|
|
@ -89,6 +88,22 @@ |
|
|
|
- kube-router |
|
|
|
- bootstrap-os |
|
|
|
|
|
|
|
- name: Create calico cni directories |
|
|
|
file: |
|
|
|
path: "{{ item }}" |
|
|
|
state: directory |
|
|
|
owner: "{{ kube_owner }}" |
|
|
|
mode: 0755 |
|
|
|
with_items: |
|
|
|
- "/var/lib/calico" |
|
|
|
when: |
|
|
|
- kube_network_plugin == "calico" |
|
|
|
- inventory_hostname in groups['k8s_cluster'] |
|
|
|
tags: |
|
|
|
- network |
|
|
|
- calico |
|
|
|
- bootstrap-os |
|
|
|
|
|
|
|
- name: Create local volume provisioner directories |
|
|
|
file: |
|
|
|
path: "{{ local_volume_provisioner_storage_classes[item].host_dir }}" |
|
|
|