Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.4 - Updating registry-console image version during a post_control_plane u… #4154

Merged
merged 1 commit into from
May 13, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions playbooks/common/openshift-cluster/upgrades/post_control_plane.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
openshift_deployment_type: "{{ deployment_type }}"
registry_image: "{{ openshift.master.registry_url | replace( '${component}', 'docker-registry' ) | 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 ) }}"
oc_cmd: "{{ openshift.common.client_binary }} --config={{ openshift.common.config_base }}/master/admin.kubeconfig"
roles:
- openshift_manageiq
Expand Down Expand Up @@ -61,6 +62,24 @@
'{"spec":{"template":{"spec":{"containers":[{"name":"registry","image":"{{ registry_image }}"}]}}}}'
--api-version=v1

- name: Check for registry-console
command: >
{{ oc_cmd }} get -n default dc/registry-console
register: _registry_console
failed_when: false
changed_when: false
when:
- openshift.common.deployment_type != 'origin'

- name: Update registry-console image to current version
when: _registry_console.rc == 0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Multiple when's on this task.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

opening a follow up for this, thanks for catching that @abutcher

command: >
{{ oc_cmd }} patch dc/registry-console -n default -p
'{"spec":{"template":{"spec":{"containers":[{"name":"registry-console","image":"{{ registry_console_image }}"}]}}}}'
--api-version=v1
when:
- openshift.common.deployment_type != 'origin'

# Check for warnings to be printed at the end of the upgrade:
- name: Check for warnings
hosts: oo_masters_to_config
Expand Down