Browse Source

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 years ago
parent
commit
725abba0a8
2 changed files with 4 additions and 0 deletions
  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] }}"
 # TODO: we should publish oreg_url component=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 }}"
   with_fileglob:
     - "files/*.yaml"
+  when:
+    - not ((item | basename == 'sdn-ovs.yaml') and openshift_use_external_openvswitch)
 
 - name: Update the image tag
   yedit: