master.yaml 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  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: Create kuryrnet CRD manifest
  29. become: yes
  30. template:
  31. src: kuryrnet.yaml.j2
  32. dest: "{{ manifests_tmpdir.stdout }}/kuryrnet.yaml"
  33. when: openshift_kuryr_subnet_driver|default("default") == 'namespace'
  34. - name: Apply OpenShift node's ImageStreamTag manifest
  35. oc_obj:
  36. state: present
  37. kind: ImageStreamTag
  38. name: "node:v3.10"
  39. namespace: "{{ kuryr_namespace }}"
  40. files:
  41. - "{{ manifests_tmpdir.stdout }}/node-images.yaml"
  42. run_once: true
  43. ignore_errors: yes
  44. - name: Apply ConfigMap manifest
  45. oc_obj:
  46. state: present
  47. kind: ConfigMap
  48. name: "kuryr-config"
  49. namespace: "{{ kuryr_namespace }}"
  50. files:
  51. - "{{ manifests_tmpdir.stdout }}/configmap.yaml"
  52. run_once: true
  53. - name: Apply Controller Deployment manifest
  54. oc_obj:
  55. state: present
  56. kind: Deployment
  57. name: "kuryr-controller"
  58. namespace: "{{ kuryr_namespace }}"
  59. files:
  60. - "{{ manifests_tmpdir.stdout }}/controller-deployment.yaml"
  61. run_once: true
  62. - name: Apply kuryr-cni DaemonSet manifest
  63. oc_obj:
  64. state: present
  65. kind: DaemonSet
  66. name: "kuryr-cni-ds"
  67. namespace: "{{ kuryr_namespace }}"
  68. files:
  69. - "{{ manifests_tmpdir.stdout }}/cni-daemonset.yaml"
  70. run_once: true
  71. - name: Apply kuryrnet CRD manifest
  72. oc_obj:
  73. state: present
  74. kind: CustomResourceDefinition
  75. name: "kuryrnets"
  76. files:
  77. - "{{ manifests_tmpdir.stdout }}/kuryrnet.yaml"
  78. run_once: true
  79. when: openshift_kuryr_subnet_driver|default("default") == 'namespace'