From 964fa7f759608deaa6d6ca008ada19a849d6b7fd Mon Sep 17 00:00:00 2001
From: ewolinetz <ewolinet@redhat.com>
Date: Wed, 10 May 2017 15:31:11 -0500
Subject: Updating registry-console image version during a post_control_plane
 upgrade

---
 .../upgrades/post_control_plane.yml                | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

(limited to 'playbooks/common/openshift-cluster/upgrades')

diff --git a/playbooks/common/openshift-cluster/upgrades/post_control_plane.yml b/playbooks/common/openshift-cluster/upgrades/post_control_plane.yml
index 0d7cdb227..fdbbbeb5b 100644
--- a/playbooks/common/openshift-cluster/upgrades/post_control_plane.yml
+++ b/playbooks/common/openshift-cluster/upgrades/post_control_plane.yml
@@ -9,6 +9,8 @@
                          replace ( '${version}', openshift_image_tag ) }}"
     router_image: "{{ openshift.master.registry_url | replace( '${component}', 'haproxy-router' ) |
                       replace ( '${version}', openshift_image_tag ) }}"
+    registry_console_image: "{{ openshift.master.registry_url | replace ( '${component}', 'registry-console') |
+                                replace ( '${version}', openshift.common.short_version ) }}"
 
   pre_tasks:
   - name: Load lib_openshift modules
@@ -61,6 +63,26 @@
     when:
     - _default_registry.results.results[0] != {}
 
+  - name: Check for registry-console
+    oc_obj:
+      state: list
+      kind: dc
+      name: registry-console
+    register: _registry_console
+    when:
+    - openshift.common.deployment_type != 'origin'
+
+  - name: Update registry-console image to current version
+    oc_edit:
+      kind: dc
+      name: registry-console
+      namespace: default
+      content:
+        spec.template.spec.containers[0].image: "{{ registry_console_image }}"
+    when:
+    - openshift.common.deployment_type != 'origin'
+    - _registry_console.results.results[0] != {}
+
   roles:
   - openshift_manageiq
   # Create the new templates shipped in 3.2, existing templates are left
-- 
cgit v1.2.3