From 5e952859247d28abe6d5efb794ff6a1f8639000d Mon Sep 17 00:00:00 2001 From: Jeff Cantrill Date: Wed, 8 Mar 2017 09:17:43 -0500 Subject: bug 1428249. Use ES hostmount storage if it exists --- roles/openshift_logging/templates/es-storage-emptydir.partial | 1 + roles/openshift_logging/templates/es-storage-hostpath.partial | 2 ++ roles/openshift_logging/templates/es-storage-pvc.partial | 2 ++ roles/openshift_logging/templates/es.j2 | 7 +------ 4 files changed, 6 insertions(+), 6 deletions(-) create mode 100644 roles/openshift_logging/templates/es-storage-emptydir.partial create mode 100644 roles/openshift_logging/templates/es-storage-hostpath.partial create mode 100644 roles/openshift_logging/templates/es-storage-pvc.partial (limited to 'roles/openshift_logging/templates') diff --git a/roles/openshift_logging/templates/es-storage-emptydir.partial b/roles/openshift_logging/templates/es-storage-emptydir.partial new file mode 100644 index 000000000..ccd01a816 --- /dev/null +++ b/roles/openshift_logging/templates/es-storage-emptydir.partial @@ -0,0 +1 @@ + emptyDir: {} diff --git a/roles/openshift_logging/templates/es-storage-hostpath.partial b/roles/openshift_logging/templates/es-storage-hostpath.partial new file mode 100644 index 000000000..07ddad9ba --- /dev/null +++ b/roles/openshift_logging/templates/es-storage-hostpath.partial @@ -0,0 +1,2 @@ + hostPath: + path: {{es_storage['path']}} diff --git a/roles/openshift_logging/templates/es-storage-pvc.partial b/roles/openshift_logging/templates/es-storage-pvc.partial new file mode 100644 index 000000000..fcbff68de --- /dev/null +++ b/roles/openshift_logging/templates/es-storage-pvc.partial @@ -0,0 +1,2 @@ + persistentVolumeClaim: + claimName: {{es_storage['pvc_claim']}} diff --git a/roles/openshift_logging/templates/es.j2 b/roles/openshift_logging/templates/es.j2 index 81ae070be..16185fc1d 100644 --- a/roles/openshift_logging/templates/es.j2 +++ b/roles/openshift_logging/templates/es.j2 @@ -103,9 +103,4 @@ spec: configMap: name: logging-elasticsearch - name: elasticsearch-storage -{% if pvc_claim is defined and pvc_claim | trim | length > 0 %} - persistentVolumeClaim: - claimName: {{pvc_claim}} -{% else %} - emptyDir: {} -{% endif %} +{% include 'es-storage-'+ es_storage['kind'] + '.partial' %} -- cgit v1.2.1