You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
1.4 KiB

  1. ---
  2. - name: Cilium | Ensure BFPFS mounted
  3. mount:
  4. fstype: bpf
  5. path: /sys/fs/bpf
  6. src: bpffs
  7. state: mounted
  8. - name: Cilium | Create Cilium certs directory
  9. file:
  10. dest: "{{ cilium_cert_dir }}"
  11. state: directory
  12. mode: 0750
  13. owner: root
  14. group: root
  15. - name: Cilium | Link etcd certificates for cilium
  16. file:
  17. src: "{{ etcd_cert_dir }}/{{ item.s }}"
  18. dest: "{{ cilium_cert_dir }}/{{ item.d }}"
  19. state: hard
  20. force: yes
  21. with_items:
  22. - {s: "{{ kube_etcd_cacert_file }}", d: "ca_cert.crt"}
  23. - {s: "{{ kube_etcd_cert_file }}", d: "cert.crt"}
  24. - {s: "{{ kube_etcd_key_file }}", d: "key.pem"}
  25. - name: Cilium | Create Cilium node manifests
  26. template:
  27. src: "{{ item.file }}.j2"
  28. dest: "{{ kube_config_dir }}/{{ item.file }}"
  29. with_items:
  30. - {name: cilium, file: cilium-config.yml, type: cm}
  31. - {name: cilium, file: cilium-crb.yml, type: clusterrolebinding}
  32. - {name: cilium, file: cilium-cr.yml, type: clusterrole}
  33. - {name: cilium, file: cilium-ds.yml, type: ds}
  34. - {name: cilium, file: cilium-deploy.yml, type: deploy}
  35. - {name: cilium, file: cilium-sa.yml, type: sa}
  36. register: cilium_node_manifests
  37. when:
  38. - inventory_hostname in groups['kube-master']
  39. - name: Cilium | Enable portmap addon
  40. template:
  41. src: 000-cilium-portmap.conflist.j2
  42. dest: /etc/cni/net.d/000-cilium-portmap.conflist
  43. when: cilium_enable_portmap