Browse Source

Unify openshift_service_catalog image to standard format

This commit removes openshift_service_catalog_image_version
and openshift_service_catalog_image_prefix to simpler override
of openshift_service_catalog_image.  This will allow users to
utilize oreg_url for this component by default.
Michael Gugino 6 years ago
parent
commit
ac44b42eb5

+ 4 - 7
inventory/hosts.example

@@ -889,13 +889,10 @@ debug_level=2
 # Enable template service broker (requires service catalog to be enabled, above)
 #template_service_broker_install=true
 
-# Force a specific prefix (IE: registry) to use when pulling the service catalog image
-# NOTE: The registry all the way up to the start of the image name must be provided. Two examples
-# below are provided.
-#openshift_service_catalog_image_prefix=docker.io/openshift/origin-
-#openshift_service_catalog_image_prefix=registry.access.redhat.com/openshift3/ose-
-# Force a specific image version to use when pulling the service catalog image
-#openshift_service_catalog_image_version=v3.9
+# Specify an openshift_service_catalog image
+# (defaults for origin and openshift-enterprise, repsectively)
+#openshift_service_catalog_image="docker.io/openshift/origin-service-catalog:{{ openshift_image_tag }}""
+#openshift_service_catalog_image="registry.access.redhat.com/openshift3/ose-service-catalog:{{ openshift_image_tag }}"
 
 # TSB image tag
 #template_service_broker_version='v3.9'

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

@@ -5,3 +5,5 @@ openshift_service_catalog_async_bindings_enabled: true
 openshift_use_openshift_sdn: True
 # os_sdn_network_plugin_name: "{% if openshift_use_openshift_sdn %}redhat/openshift-ovs-subnet{% else %}{% endif %}"
 os_sdn_network_plugin_name: "redhat/openshift-ovs-subnet"
+
+openshift_service_catalog_image: "{{ l_os_registry_url | regex_replace('${component}' | regex_escape, 'service-catalog') }}"

+ 0 - 11
roles/openshift_service_catalog/tasks/install.yml

@@ -5,17 +5,6 @@
   register: mktemp
   changed_when: False
 
-- name: Set default image variables based on openshift_deployment_type
-  include_vars: "{{ item }}"
-  with_first_found:
-  - "{{ openshift_deployment_type }}.yml"
-  - "default_images.yml"
-
-- name: Set service_catalog image facts
-  set_fact:
-    openshift_service_catalog_image_prefix: "{{ openshift_service_catalog_image_prefix | default(__openshift_service_catalog_image_prefix) }}"
-    openshift_service_catalog_image_version: "{{ openshift_service_catalog_image_version | default(__openshift_service_catalog_image_version) }}"
-
 - name: Set Service Catalog namespace
   oc_project:
     state: present

+ 1 - 1
roles/openshift_service_catalog/templates/api_server.j2

@@ -47,7 +47,7 @@ spec:
         - KubernetesNamespaceLifecycle,DefaultServicePlan,ServiceBindingsLifecycle,ServicePlanChangeValidator,BrokerAuthSarCheck
         - --feature-gates
         - OriginatingIdentity=true
-        image: {{ openshift_service_catalog_image_prefix }}service-catalog:{{ openshift_service_catalog_image_version }}
+        image: {{ openshift_service_catalog_image }}
         command: ["/usr/bin/service-catalog"]
         imagePullPolicy: IfNotPresent
         name: apiserver

+ 1 - 1
roles/openshift_service_catalog/templates/controller_manager.j2

@@ -47,7 +47,7 @@ spec:
         - --feature-gates
         - AsyncBindingOperations=true
 {% endif %}
-        image: {{ openshift_service_catalog_image_prefix }}service-catalog:{{ openshift_service_catalog_image_version }}
+        image: {{ openshift_service_catalog_image }}
         command: ["/usr/bin/service-catalog"]
         imagePullPolicy: IfNotPresent
         name: controller-manager

+ 0 - 3
roles/openshift_service_catalog/vars/default_images.yml

@@ -1,3 +0,0 @@
----
-__openshift_service_catalog_image_prefix: "docker.io/openshift/origin-"
-__openshift_service_catalog_image_version: "{{ openshift_service_catalog_image_version | default('v0.1') }}"

+ 0 - 3
roles/openshift_service_catalog/vars/openshift-enterprise.yml

@@ -1,3 +0,0 @@
----
-__openshift_service_catalog_image_prefix: "registry.access.redhat.com/openshift3/ose-"
-__openshift_service_catalog_image_version: "{{ openshift_service_catalog_image_version | default(openshift_image_tag) }}"