Browse Source

Passing in image parameter for tsb template

Eric Wolinetz 7 years ago
parent
commit
fc01d4f5fb

+ 4 - 2
roles/template_service_broker/tasks/install.yml

@@ -8,7 +8,9 @@
 
 - name: set ansible_service_broker facts
   set_fact:
-    template_service_broker_image: "{{ template_service_broker_image | default(__template_service_broker_image) }}"
+    template_service_broker_prefix: "{{ template_service_broker_prefix | default(__template_service_broker_prefix) }}"
+    template_service_broker_version: "{{ template_service_broker_version | default(__template_service_broker_version) }}"
+    template_service_broker_image_name: "{{ template_service_broker_image_name | default(__template_service_broker_image_name) }}"
 
 - oc_project:
     name: openshift-template-service-broker
@@ -28,7 +30,7 @@
 
 - name: Apply template file
   shell: >
-    oc process -f "{{ mktemp.stdout }}/{{ __tsb_template_file }}" --param API_SERVER_CONFIG="{{ lookup('file', __tsb_files_location ~ '/' ~ __tsb_config_file) }}" | kubectl apply -f -
+    oc process -f "{{ mktemp.stdout }}/{{ __tsb_template_file }}" --param API_SERVER_CONFIG="{{ lookup('file', __tsb_files_location ~ '/' ~ __tsb_config_file) }}" --param IMAGE="{{ template_service_broker_prefix }}{{ template_service_broker_image_name }}:{{ template_service_broker_version }}" | kubectl apply -f -
 
 # reconcile with rbac
 - name: Reconcile with RBAC file

+ 3 - 1
roles/template_service_broker/vars/default_images.yml

@@ -1,2 +1,4 @@
 ---
-__template_service_broker_image: ""
+__template_service_broker_prefix: "docker.io/openshift/"
+__template_service_broker_version: "latest"
+__template_service_broker_image_name: "origin"

+ 3 - 1
roles/template_service_broker/vars/openshift-enterprise.yml

@@ -1,2 +1,4 @@
 ---
-__template_service_broker_image: ""
+__template_service_broker_prefix: "registry.access.redhat.com/openshift3/"
+__template_service_broker_version: "v3.7"
+__template_service_broker_image_name: "ose"