Browse Source

Merge pull request #8003 from sdodson/fix-310-images

Fixes for OCP install
Scott Dodson 7 years ago
parent
commit
b38b8a1440

+ 1 - 7
roles/openshift_control_plane/defaults/main.yml

@@ -13,13 +13,7 @@ l_openshift_images_dict:
 l_osm_registry_url_default: "{{ l_openshift_images_dict[openshift_deployment_type] }}"
 l_os_registry_url: "{{ oreg_url_master | default(oreg_url) | default(l_osm_registry_url_default) | regex_replace('${version}' | regex_escape, openshift_image_tag | default('${version}')) }}"
 
-l_openshift_prefix_dict:
-  origin: 'origin-${component}'
-  openshift-enterprise: 'ose-${component}'
-l_os_prefix: "{{ l_openshift_prefix_dict[openshift_deployment_type] }}"
-l_os_prefix_base: "{{ l_openshift_prefix_dict[openshift_deployment_type] | regex_replace('-${component}' | regex_escape, '') }}"
-# TODO: we should publish oreg_url component=master
-osm_image: "{{ l_os_registry_url | regex_replace(l_os_prefix | regex_escape, l_os_prefix_base) }}"
+osm_image: "{{ l_os_registry_url | regex_replace('${component}' | regex_escape, 'control-plane') }}"
 
 system_images_registry_dict:
   openshift-enterprise: "registry.access.redhat.com"

+ 1 - 6
roles/openshift_node/defaults/main.yml

@@ -24,12 +24,7 @@ l_openshift_images_dict:
 l_osm_registry_url_default: "{{ l_openshift_images_dict[openshift_deployment_type] }}"
 l_os_registry_url: "{{ oreg_url | default(l_osm_registry_url_default) | regex_replace('${version}' | regex_escape, openshift_image_tag | default('${version}')) }}"
 
-l_openshift_prefix_dict:
-  origin: 'origin-${component}'
-  openshift-enterprise: 'ose-${component}'
-l_os_prefix: "{{ l_openshift_prefix_dict[openshift_deployment_type] }}"
-# TODO: we should publish oreg_url component=node
-osn_image_default: "{{ l_os_registry_url | regex_replace(l_os_prefix | regex_escape, 'node') }}"
+osn_image_default: "{{ l_os_registry_url | regex_replace('${component}' | regex_escape, 'node') }}"
 osn_image: "{{ (system_images_registry == 'docker') | ternary(osn_image_default, (osn_image_default.split('/')|length==2) | ternary(system_images_registry + '/' + osn_image_default, osn_image_default)) }}"
 system_osn_image: "{{ (system_images_registry == 'docker') | ternary('docker:' + osn_image, osn_image) }}"
 

+ 10 - 0
roles/openshift_node/tasks/upgrade/config_changes.yml

@@ -11,6 +11,15 @@
     path: "{{ openshift.common.config_base }}/node/pods"
     state: directory
     mode: 0755
+- name: Check for client-ca.crt
+  stat:
+    path: "{{ openshift_node_config_dir }}/client-ca.crt"
+  register: client_ca_crt
+
+- name: Ensure docker-registry directory exists
+  file:
+    state: directory
+    path: "/etc/docker/certs.d/docker-registry.default.svc:5000"
 
 - name: Update the docker-registry CA symlink
   file:
@@ -18,6 +27,7 @@
     dest: "/etc/docker/certs.d/docker-registry.default.svc:5000/node-client-ca.crt"
     state: link
     force: yes
+  when: client_ca_crt.stat.exists
 
 - name: Update node-config for static pods
   yedit:

+ 1 - 1
roles/openshift_sdn/defaults/main.yml

@@ -10,6 +10,6 @@ l_openshift_prefix_dict:
   openshift-enterprise: 'ose-${component}'
 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') }}"
+osn_image: "{{ l_os_registry_url | regex_replace('${component}' | regex_escape, 'node') }}"
 
 openshift_use_external_openvswitch: false