master.yaml 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. ---
  2. - name: Perform OpenShift ServiceAccount config
  3. include_tasks: serviceaccount.yaml
  4. run_once: true
  5. - name: Create kuryr manifests tempdir
  6. command: mktemp -d
  7. register: manifests_tmpdir
  8. - name: Create OpenShift node's ImageStreamTag manifest
  9. become: yes
  10. template:
  11. src: node-images.yaml.j2
  12. dest: "{{ manifests_tmpdir.stdout }}/node-images.yaml"
  13. - name: Create kuryr ConfigMap manifest
  14. become: yes
  15. template:
  16. src: configmap.yaml.j2
  17. dest: "{{ manifests_tmpdir.stdout }}/configmap.yaml"
  18. - name: Create kuryr-controller Deployment manifest
  19. become: yes
  20. template:
  21. src: controller-deployment.yaml.j2
  22. dest: "{{ manifests_tmpdir.stdout }}/controller-deployment.yaml"
  23. - name: Create kuryr-cni DaemonSet manifest
  24. become: yes
  25. template:
  26. src: cni-daemonset.yaml.j2
  27. dest: "{{ manifests_tmpdir.stdout }}/cni-daemonset.yaml"
  28. - name: Apply OpenShift node's ImageStreamTag manifest
  29. oc_obj:
  30. state: present
  31. kind: ImageStreamTag
  32. name: "node:v3.10"
  33. namespace: "{{ kuryr_namespace }}"
  34. files:
  35. - "{{ manifests_tmpdir.stdout }}/node-images.yaml"
  36. run_once: true
  37. ignore_errors: yes
  38. - name: Apply ConfigMap manifest
  39. oc_obj:
  40. state: present
  41. kind: ConfigMap
  42. name: "kuryr-config"
  43. namespace: "{{ kuryr_namespace }}"
  44. files:
  45. - "{{ manifests_tmpdir.stdout }}/configmap.yaml"
  46. run_once: true
  47. - name: Apply Controller Deployment manifest
  48. oc_obj:
  49. state: present
  50. kind: Deployment
  51. name: "kuryr-controller"
  52. namespace: "{{ kuryr_namespace }}"
  53. files:
  54. - "{{ manifests_tmpdir.stdout }}/controller-deployment.yaml"
  55. run_once: true
  56. - name: Apply kuryr-cni DaemonSet manifest
  57. oc_obj:
  58. state: present
  59. kind: DaemonSet
  60. name: "kuryr-cni-ds"
  61. namespace: "{{ kuryr_namespace }}"
  62. files:
  63. - "{{ manifests_tmpdir.stdout }}/cni-daemonset.yaml"
  64. run_once: true