Просмотр исходного кода

Allow for using an external openvswitch

Commit d20421a56e8c1912f2b4e7bb1baf0e43419e7a05 added the ability to use
an external openvswitch instance. Unfortunately, the switch to the
`openshift_sdn` role removed this functionality.

This commit adds it back using the same logic as the previous one. We'll
keep running the SDN containers but allow for consumers to rely on an
externally managed ovs instance.
Flavio Percoco 7 лет назад
Родитель
Сommit
725abba0a8
2 измененных файлов с 4 добавлено и 0 удалено
  1. 2 0
      roles/openshift_sdn/defaults/main.yml
  2. 2 0
      roles/openshift_sdn/tasks/main.yml

+ 2 - 0
roles/openshift_sdn/defaults/main.yml

@@ -11,3 +11,5 @@ l_openshift_prefix_dict:
 l_os_prefix: "{{ l_openshift_prefix_dict[openshift_deployment_type] }}"
 l_os_prefix: "{{ l_openshift_prefix_dict[openshift_deployment_type] }}"
 # TODO: we should publish oreg_url component=node
 # TODO: we should publish oreg_url component=node
 osn_image: "{{ l_os_registry_url | regex_replace(l_os_prefix | regex_escape, 'node') }}"
 osn_image: "{{ l_os_registry_url | regex_replace(l_os_prefix | regex_escape, 'node') }}"
+
+openshift_use_external_openvswitch: false

+ 2 - 0
roles/openshift_sdn/tasks/main.yml

@@ -24,6 +24,8 @@
     dest: "{{ mktemp.stdout }}/{{ item | basename }}"
     dest: "{{ mktemp.stdout }}/{{ item | basename }}"
   with_fileglob:
   with_fileglob:
     - "files/*.yaml"
     - "files/*.yaml"
+  when:
+    - not ((item | basename == 'sdn-ovs.yaml') and openshift_use_external_openvswitch)
 
 
 - name: Update the image tag
 - name: Update the image tag
   yedit:
   yedit: