Browse Source

Updating pattern for elasticsearch_proxy images

Eric Wolinetz 7 years ago
parent
commit
0aad4a9818

+ 0 - 3
roles/openshift_logging_elasticsearch/defaults/main.yml

@@ -40,9 +40,6 @@ openshift_logging_es_pvc_prefix: "{{ openshift_hosted_logging_elasticsearch_pvc_
 # config the es plugin to write kibana index based on the index mode
 openshift_logging_elasticsearch_kibana_index_mode: 'unique'
 
-openshift_logging_elasticsearch_proxy_image_prefix: "{{ openshift_logging_image_prefix | default(__openshift_logging_image_prefix) }}"
-openshift_logging_elasticsearch_proxy_image_version: "{{ openshift_logging_image_version | default('latest') }}"
-#openshift_logging_elasticsearch_proxy_image_version: "v1.0.0"
 openshift_logging_elasticsearch_proxy_cpu_limit: "100m"
 openshift_logging_elasticsearch_proxy_memory_limit: "64Mi"
 openshift_logging_elasticsearch_prometheus_sa: "system:serviceaccount:{{openshift_prometheus_namespace | default('prometheus')}}:prometheus"

+ 11 - 0
roles/openshift_logging_elasticsearch/tasks/main.yaml

@@ -17,6 +17,17 @@
 
 - include: determine_version.yaml
 
+- name: Set default image variables based on deployment_type
+  include_vars: "{{ item }}"
+  with_first_found:
+    - "{{ openshift_deployment_type | default(deployment_type) }}.yml"
+    - "default_images.yml"
+
+- name: Set elasticsearch_prefix image facts
+  set_fact:
+    openshift_logging_elasticsearch_proxy_image_prefix: "{{ openshift_logging_elasticsearch_proxy_image_prefix | default(__openshift_logging_elasticsearch_proxy_image_prefix) }}"
+    openshift_logging_elasticsearch_proxy_image_version: "{{ openshift_logging_elasticsearch_proxy_image_version | default(__openshift_logging_elasticsearch_proxy_image_version) }}"
+
 # allow passing in a tempdir
 - name: Create temp directory for doing work in
   command: mktemp -d /tmp/openshift-logging-ansible-XXXXXX

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

@@ -0,0 +1,3 @@
+---
+__openshift_logging_elasticsearch_proxy_image_prefix: "docker.io/openshift/"
+__openshift_logging_elasticsearch_proxy_image_version: "latest"

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

@@ -0,0 +1,3 @@
+---
+__openshift_logging_elasticsearch_proxy_image_prefix: "registry.access.redhat.com/openshift3/"
+__openshift_logging_elasticsearch_proxy_image_version: "v3.7"